Skip to content

Commit

Permalink
v0.4.5: Restore RS 1.6.16 compat
Browse files Browse the repository at this point in the history
  • Loading branch information
raoulvdberge committed Apr 26, 2020
1 parent 195c654 commit f35708f
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 13 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Refined Storage Addons Changelog

### 0.4.5
- Refined Storage 1.6.16 compatibility (raoulvdberge)

### 0.4.4
- Refined Storage 1.6.13 compatibility (raoulvdberge)

Expand Down
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ apply plugin: 'net.minecraftforge.gradle.forge'
apply plugin: 'maven'
apply plugin: 'maven-publish'

version = "0.4.4"
version = "0.4.5"
def env = System.getenv()
if (env.BUILD_NUMBER) {
version = version + "-" + "${env.BUILD_NUMBER}"
Expand All @@ -24,7 +24,7 @@ sourceCompatibility = 1.8
targetCompatibility = 1.8

minecraft {
version = "1.12.2-14.23.4.2703"
version = "1.12.2-14.23.5.2838"
runDir = "run"
useDepAts = true
mappings = "snapshot_20180714"
Expand All @@ -40,7 +40,7 @@ repositories {
}

dependencies {
deobfCompile "refinedstorage:refinedstorage:1.6.13-373"
deobfCompile "refinedstorage:refinedstorage:1.6.16-386"
}

processResources {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public final class RSAddons {

public static final String ID = "refinedstorageaddons";
public static final String VERSION = "@version@";
public static final String DEPENDENCIES = "required-after:refinedstorage@[1.6.9,);";
public static final String DEPENDENCIES = "required-after:refinedstorage@[1.6.16,);";
public static final String GUI_FACTORY = "com.raoulvdberge.refinedstorageaddons.gui.config.ModGuiFactory";

@Mod.Instance
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
public class WirelessCraftingGridFactory implements IGridFactory {
@Nullable
@Override
public IGrid createFromStack(EntityPlayer player, ItemStack stack) {
return new WirelessCraftingGrid(stack, !player.getEntityWorld().isRemote);
public IGrid createFromStack(EntityPlayer player, ItemStack stack, int slotId) {
return new WirelessCraftingGrid(stack, !player.getEntityWorld().isRemote, slotId);
}

@Nullable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,15 @@ public class NetworkItemWirelessCraftingGrid extends NetworkItemWirelessGrid {
private INetworkItemHandler handler;
private ItemStack stack;
private EntityPlayer player;
private int slotId;

public NetworkItemWirelessCraftingGrid(INetworkItemHandler handler, EntityPlayer player, ItemStack stack) {
super(handler, player, stack);
public NetworkItemWirelessCraftingGrid(INetworkItemHandler handler, EntityPlayer player, ItemStack stack, int slotId) {
super(handler, player, stack, slotId);

this.handler = handler;
this.player = player;
this.stack = stack;
this.slotId = slotId;
}

@Override
Expand All @@ -40,7 +42,7 @@ public boolean onOpen(INetwork network) {
return false;
}

API.instance().getGridManager().openGrid(WirelessCraftingGrid.ID, (EntityPlayerMP) player, stack);
API.instance().getGridManager().openGrid(WirelessCraftingGrid.ID, (EntityPlayerMP) player, stack, slotId);

drainEnergy(RSAddons.INSTANCE.config.wirelessCraftingGridOpenUsage);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public ItemWirelessCraftingGrid() {

@Override
@Nonnull
public INetworkItem provide(INetworkItemHandler handler, EntityPlayer player, ItemStack stack) {
return new NetworkItemWirelessCraftingGrid(handler, player, stack);
public INetworkItem provide(INetworkItemHandler handler, EntityPlayer player, ItemStack stack, int slotId) {
return new NetworkItemWirelessCraftingGrid(handler, player, stack, slotId);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ public void onCraftMatrixChanged(IInventory inventory) {
private boolean server;
private Set<IGridCraftingListener> craftingListeners = new HashSet<>();

public WirelessCraftingGrid(ItemStack stack, boolean server) {
super(stack);
public WirelessCraftingGrid(ItemStack stack, boolean server, int slotId) {
super(stack, slotId);

this.controllerDimension = ItemWirelessCraftingGrid.getDimensionId(stack);
this.server = server;
Expand Down

0 comments on commit f35708f

Please sign in to comment.