Skip to content

Commit

Permalink
Fix plate roller
Browse files Browse the repository at this point in the history
  • Loading branch information
cam72cam committed Mar 24, 2018
1 parent 1182af6 commit e58f287
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import cam72cam.immersiverailroading.library.Gauge;
import cam72cam.immersiverailroading.library.GuiText;
import cam72cam.immersiverailroading.library.PlateType;
import cam72cam.immersiverailroading.multiblock.PlateRollerMultiblock.PlateRollerInstance;
import cam72cam.immersiverailroading.registry.EntityRollingStockDefinition;
import cam72cam.immersiverailroading.tile.TileMultiblock;
import net.minecraft.client.gui.GuiButton;
Expand All @@ -32,7 +31,7 @@ public class PlateRollerGUI extends GuiScreen {

public PlateRollerGUI(TileMultiblock te) {
this.tile = te;
currentItem = ((PlateRollerInstance) te.getMultiblock()).getCraftItem();
currentItem = te.getCraftItem();
if (currentItem == null || currentItem.isEmpty()) {
currentItem = new ItemStack(IRItems.ITEM_PLATE, 1);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public boolean onBlockActivated(EntityPlayer player, EnumHand hand, BlockPos off
}

if (world.isRemote) {
BlockPos pos = getPos(offset);
BlockPos pos = getPos(crafter);
player.openGui(ImmersiveRailroading.instance, GuiTypes.PLATE_ROLLER.ordinal(), world, pos.getX(), pos.getY(), pos.getZ());
}
return true;
Expand Down Expand Up @@ -222,13 +222,5 @@ public boolean hasPower() {
return energy.getEnergyStored() > 32;

}

public ItemStack getCraftItem() {
TileMultiblock craftingTe = getTile(crafter);
if (craftingTe == null) {
return ItemStack.EMPTY;
}
return craftingTe.getCraftItem();
}
}
}

0 comments on commit e58f287

Please sign in to comment.