Cleanup and some changes...

This commit is contained in:
fewizz committed 2016-03-16 17:49:28 +03:00
1 parent a39ac3bd74
commit 7b6ec78cd7
125 files changed
+971 -955

No files matched your search

+59
View File
@@ -0,0 +1,59 @@
package emt.proxy;
import cpw.mods.fml.common.network.IGuiHandler;
import emt.client.gui.GuiEtherealMacerator;
import emt.client.gui.GuiIndustrialWandRecharger;
import emt.client.gui.container.ContainerEtheralMacerator;
import emt.client.gui.container.ContainerIndustrialWandRecharge;
import emt.tile.TileEntityEtherealMacerator;
import emt.tile.TileEntityIndustrialWandRecharge;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
public class CommonProxy implements IGuiHandler {
public void load() {
registerRenders();
}
public void registerRenders() {
/* Empty in base proxy */
}
@Override
public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {
TileEntity entity = world.getTileEntity(x, y, z);
switch (ID) {
case 0:
if (entity != null && entity instanceof TileEntityIndustrialWandRecharge) {
return new ContainerIndustrialWandRecharge(player.inventory, (TileEntityIndustrialWandRecharge) entity);
}
case 1:
if (entity != null && entity instanceof TileEntityEtherealMacerator) {
return new ContainerEtheralMacerator(player.inventory, (TileEntityEtherealMacerator) entity);
}
default:
return null;
}
}
@Override
public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {
TileEntity entity = world.getTileEntity(x, y, z);
switch (ID) {
case 0:
if (entity != null && entity instanceof TileEntityIndustrialWandRecharge) {
return new GuiIndustrialWandRecharger(player.inventory, (TileEntityIndustrialWandRecharge) entity);
}
case 1:
if (entity != null && entity instanceof TileEntityEtherealMacerator) {
return new GuiEtherealMacerator(player.inventory, (TileEntityEtherealMacerator) entity);
}
default:
return null;
}
}
}