Skip to content

Commit

Permalink
Fixed client-side dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
planetguy32 committed May 25, 2015
1 parent 30d00b1 commit dcf8d24
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 40 deletions.
47 changes: 12 additions & 35 deletions src/main/java/me/planetguy/remaininmotion/core/ClientSetup.java
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -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,
};
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,7 @@ public class ClientSetupProxy {
public static ClientSetupProxy Instance;

public void Execute() {}

public Class[] clientClasses(){return new Class[0];}

}
8 changes: 3 additions & 5 deletions src/main/java/me/planetguy/remaininmotion/core/ModRiM.java
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit dcf8d24

Please sign in to comment.