Slight rework of the gui system, should fix some issues with wrenching. Should fix #1264 fixes #988 + a handful of weird gui de-syncs

This commit is contained in:
modmuss50 2017-09-06 13:46:12 +01:00
parent 8588a40474
commit 094b67e050
44 changed files with 183 additions and 229 deletions

View file

@ -33,6 +33,7 @@ import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import prospector.shootingstar.ShootingStar;
import prospector.shootingstar.model.ModelCompound;
import reborncore.api.tile.IMachineGuiHandler;
import reborncore.common.blocks.BlockMachineBase;
import techreborn.Core;
import techreborn.client.EGui;
@ -54,12 +55,7 @@ public class BlockElectricFurnace extends BlockMachineBase {
}
@Override
public boolean onBlockActivated(final World world, final BlockPos pos, final IBlockState state,
final EntityPlayer player, final EnumHand hand, final EnumFacing side,
final float hitX, final float hitY, final float hitZ) {
if (!player.isSneaking()) {
player.openGui(Core.INSTANCE, EGui.ELECTRIC_FURNACE.ordinal(), world, pos.getX(), pos.getY(), pos.getZ());
}
return true;
public IMachineGuiHandler getGui() {
return EGui.ELECTRIC_FURNACE;
}
}