diff --git a/src/main/java/me/planetguy/remaininmotion/core/ClientSetup.java b/src/main/java/me/planetguy/remaininmotion/core/ClientSetup.java index bb10894..f1dc38f 100644 --- a/src/main/java/me/planetguy/remaininmotion/core/ClientSetup.java +++ b/src/main/java/me/planetguy/remaininmotion/core/ClientSetup.java @@ -1,6 +1,9 @@ package me.planetguy.remaininmotion.core; import me.planetguy.remaininmotion.base.TileEntityRiM; +import me.planetguy.remaininmotion.drive.gui.GuiDirectional; +import me.planetguy.remaininmotion.drive.gui.GuiDriveCommon; +import me.planetguy.remaininmotion.drive.gui.GuiTranslocator; import me.planetguy.remaininmotion.render.CarriageDriveRenderer; import me.planetguy.remaininmotion.render.CarriageRenderer; import me.planetguy.remaininmotion.render.MotiveSpectreRenderer; @@ -36,40 +39,14 @@ public void Execute() { new CarriageDriveRenderer(); } - - /* - * IItemRenderer renderer=new IItemRenderer(){ - * - * @Override public boolean handleRenderType(ItemStack item, - * ItemRenderType type) { return true; } - * - * @Override public boolean shouldUseRenderHelper(ItemRenderType type, - * ItemStack item, ItemRendererHelper helper) { return false; } - * - * @Override public void renderItem(ItemRenderType t, ItemStack item, - * Object... data) { GL11.glPushMatrix(); if(t == ItemRenderType.ENTITY) - * GL11.glScaled(0.5, 0.5, 0.5); if(t == ItemRenderType.INVENTORY || t - * == ItemRenderType.ENTITY) GL11.glTranslatef(-0.5F, -0.5F, -0.5F); - * - * IMicroMaterial material = - * MicroMaterialRegistry.getMaterial("planks"); MicroblockClass mcrClass - * = MicroblockClassRegistry.getMicroClass(item.getItemDamage()); - * if(material==null || mcrClass == null) return; - * - * CCRenderState.reset(); TextureUtils.bindAtlas(0); - * CCRenderState.useNormals(true); CCRenderState.useModelColours(true); - * CCRenderState.pullLightmap(); CCRenderState.startDrawing(7); - * FMPCarriage part=(FMPCarriage) Items.hollowCarriage.newPart(item, - * Minecraft.getMinecraft().thePlayer, - * Minecraft.getMinecraft().thePlayer.worldObj, null, 0, null); - * part.renderStatic(new Vector3(0.5, 0.5, - * 0.5).subtract(part.getBounds().center()), null, 0); - * CCRenderState.draw(); GL11.glPopMatrix(); } - * - * }; - * - * MinecraftForgeClient.registerItemRenderer(Items.hollowCarriageId, - * renderer); - */ } + + public Class[] clientClasses(){ + return new Class[]{ + GuiDriveCommon.class, + GuiTranslocator.class, + GuiDirectional.class, + }; + } + } diff --git a/src/main/java/me/planetguy/remaininmotion/core/ClientSetupProxy.java b/src/main/java/me/planetguy/remaininmotion/core/ClientSetupProxy.java index 0f4a1bd..9a49a21 100644 --- a/src/main/java/me/planetguy/remaininmotion/core/ClientSetupProxy.java +++ b/src/main/java/me/planetguy/remaininmotion/core/ClientSetupProxy.java @@ -10,4 +10,7 @@ public class ClientSetupProxy { public static ClientSetupProxy Instance; public void Execute() {} + + public Class[] clientClasses(){return new Class[0];} + } diff --git a/src/main/java/me/planetguy/remaininmotion/core/ModRiM.java b/src/main/java/me/planetguy/remaininmotion/core/ModRiM.java index db5e895..4a06812 100644 --- a/src/main/java/me/planetguy/remaininmotion/core/ModRiM.java +++ b/src/main/java/me/planetguy/remaininmotion/core/ModRiM.java @@ -73,15 +73,13 @@ public void PostInit(FMLPostInitializationEvent Event) { Core.HandlePostInit(); + GuiHandlerPrefab.create(this, new Class[]{ ContainerDrive.class, ContainerDrive.class, ContainerDrive.class, - }, new Class[]{ - GuiDriveCommon.class, - GuiTranslocator.class, - GuiDirectional.class, - }); + }, + ClientSetupProxy.Instance.clientClasses()); } @EventHandler