Slight rework of the gui system, should fix some issues with wrenching. Should fix fixes + 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
src/main/java/techreborn/client

View file

@ -24,7 +24,13 @@
package techreborn.client;
public enum EGui {
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import reborncore.api.tile.IMachineGuiHandler;
import techreborn.Core;
public enum EGui implements IMachineGuiHandler {
THERMAL_GENERATOR(true),
QUANTUM_TANK(true),
@ -76,4 +82,12 @@ public enum EGui {
public boolean useContainerBuilder() {
return this.containerBuilder;
}
@Override
public void open(EntityPlayer player, BlockPos pos, World world) {
if(!world.isRemote){
player.openGui(Core.INSTANCE, this.ordinal(), world, pos.getX(), pos.getY(), pos.getZ());
}
}
}