Fixed a startup crash.

This commit is contained in:
SirSengir 2012-08-18 11:29:57 +02:00
parent c3579a70c6
commit 316e2a5019
2 changed files with 17 additions and 18 deletions

View file

@ -8,6 +8,7 @@
package buildcraft;
import cpw.mods.fml.client.registry.ClientRegistry;
import buildcraft.mod_BuildCraftCore;
import buildcraft.core.DefaultProps;
import buildcraft.core.ProxyCore;
@ -32,6 +33,10 @@ import buildcraft.factory.TilePump;
import buildcraft.factory.TileQuarry;
import buildcraft.factory.TileRefinery;
import buildcraft.factory.TileTank;
import buildcraft.factory.render.RenderHopper;
import buildcraft.factory.render.RenderRefinery;
import buildcraft.factory.render.RenderTank;
import buildcraft.mod_BuildCraftCore.EntityRenderIndex;
import buildcraft.silicon.TileLaser;
import net.minecraft.src.Block;
import net.minecraft.src.Item;
@ -148,6 +153,18 @@ public class BuildCraftFactory {
ProxyCore.proxy.registerTileEntity(TileHopper.class, "net.minecraft.src.buildcraft.factory.TileHopper");
}
/// FIXME: Render registration needs to move into a client side proxy.
ClientRegistry.bindTileEntitySpecialRenderer(TileTank.class, new RenderTank());
ClientRegistry.bindTileEntitySpecialRenderer(TileRefinery.class, new RenderRefinery());
mod_BuildCraftCore.blockByEntityRenders.put(new EntityRenderIndex(BuildCraftFactory.refineryBlock, 0),
new RenderRefinery());
if(!hopperDisabled) {
ClientRegistry.bindTileEntitySpecialRenderer(TileHopper.class, new RenderHopper());
mod_BuildCraftCore.blockByEntityRenders.put(new EntityRenderIndex(BuildCraftFactory.hopperBlock, 0), new RenderHopper());
}
drillTexture = 2 * 16 + 1;
BuildCraftCore.mainConfiguration.save();

View file

@ -23,15 +23,8 @@ import buildcraft.BuildCraftFactory;
import buildcraft.core.DefaultProps;
import buildcraft.core.render.RenderVoid;
import buildcraft.factory.EntityMechanicalArm;
import buildcraft.factory.TileHopper;
import buildcraft.factory.TileRefinery;
import buildcraft.factory.TileTank;
import buildcraft.factory.gui.GuiAutoCrafting;
import buildcraft.factory.network.PacketHandlerFactory;
import buildcraft.factory.render.RenderHopper;
import buildcraft.factory.render.RenderRefinery;
import buildcraft.factory.render.RenderTank;
import buildcraft.mod_BuildCraftCore.EntityRenderIndex;
import net.minecraft.src.ModLoader;
@ -59,17 +52,6 @@ public class mod_BuildCraftFactory {
// CoreProxy.registerGUI(this,
// Utils.packetIdToInt(PacketIds.AutoCraftingGUI));
ModLoader.registerTileEntity(TileTank.class, "net.minecraft.src.buildcraft.factory.TileTank", new RenderTank());
ModLoader.registerTileEntity(TileRefinery.class, "net.minecraft.src.buildcraft.factory.Refinery", new RenderRefinery());
mod_BuildCraftCore.blockByEntityRenders.put(new EntityRenderIndex(BuildCraftFactory.refineryBlock, 0),
new RenderRefinery());
ModLoader.registerTileEntity(TileHopper.class, "net.minecraft.src.buildcraft.factory.TileHopper", new RenderHopper());
mod_BuildCraftCore.blockByEntityRenders.put(new EntityRenderIndex(BuildCraftFactory.hopperBlock, 0), new RenderHopper());
// Detect the presence of NEI and add overlay for the Autocrafting Table
try {
Class<?> neiRenderer = Class.forName("codechicken.nei.DefaultOverlayRenderer");