#806 Fix server crash from trying to load chest renderer

This commit is contained in:
mezz committed 2015-09-25 15:30:25 -07:00
1 parent 4234c38d69
commit 65f876cf4a
5 files changed
+14 -6

No files matched your search

@@ -48,6 +48,10 @@ public class ProxyRender {
return null;
}
public IBlockRenderer getRenderChest(String textureName) {
return null;
}
public short registerItemTexUID(IIconRegister register, short uid, String ident) {
return uid;
}
@@ -27,6 +27,7 @@ import forestry.core.render.RenderBlock;
import forestry.core.render.RenderEscritoire;
import forestry.core.render.RenderMachine;
import forestry.core.render.RenderMill;
import forestry.core.render.RenderNaturalistChest;
import forestry.core.render.TextureManager;
import forestry.core.render.TileRendererIndex;
import forestry.core.tiles.MachineDefinition;
@@ -74,6 +75,11 @@ public class ProxyRenderClient extends ProxyRender {
return new RenderEscritoire();
}
@Override
public IBlockRenderer getRenderChest(String textureName) {
return new RenderNaturalistChest(textureName);
}
public static boolean shouldSpawnParticle(World world) {
if (!Config.enableParticleFX) {
return false;
@@ -148,7 +148,6 @@ import forestry.core.items.ItemScoop;
import forestry.core.network.IPacketHandler;
import forestry.core.proxy.Proxies;
import forestry.core.recipes.ShapedRecipeCustom;
import forestry.core.render.RenderNaturalistChest;
import forestry.core.tiles.MachineDefinition;
import forestry.core.tiles.TileAnalyzer;
import forestry.core.utils.ItemStackUtil;
@@ -234,7 +233,7 @@ public class PluginApiculture extends ForestryPlugin {
definitionChestLegacy = ((BlockBase) ForestryBlock.apiculture.block()).addDefinition(new MachineDefinition(Constants.DEFINITION_APIARISTCHEST_LEGACY_META, "forestry.ApiaristChest", TileApiaristChest.class).setLegacy());
definitionChest = ((BlockBase) ForestryBlock.apicultureChest.block()).addDefinition(new MachineDefinition(Constants.DEFINITION_APIARISTCHEST_META, "forestry.ApiaristChestNew", TileApiaristChest.class, new RenderNaturalistChest("apiaristchest"),
definitionChest = ((BlockBase) ForestryBlock.apicultureChest.block()).addDefinition(new MachineDefinition(Constants.DEFINITION_APIARISTCHEST_META, "forestry.ApiaristChestNew", TileApiaristChest.class, Proxies.render.getRenderChest("apiaristchest"),
ShapedRecipeCustom.createShapedRecipe(ForestryBlock.apicultureChest.getItemStack(1, Constants.DEFINITION_APIARISTCHEST_META),
" # ",
"XYX",
@@ -94,7 +94,6 @@ import forestry.core.proxy.Proxies;
import forestry.core.recipes.RecipeUtil;
import forestry.core.recipes.ShapedRecipeCustom;
import forestry.core.recipes.ShapelessRecipeCustom;
import forestry.core.render.RenderNaturalistChest;
import forestry.core.tiles.MachineDefinition;
import forestry.factory.recipes.FabricatorRecipe;
@@ -187,7 +186,7 @@ public class PluginArboriculture extends ForestryPlugin {
ForestryBlock.arboriculture.block().setCreativeTab(Tabs.tabArboriculture);
definitionChest = ((BlockBase) ForestryBlock.arboriculture.block()).addDefinition(new MachineDefinition(Constants.DEFINITION_ARBCHEST_META,
"forestry.ArbChest", TileArboristChest.class, new RenderNaturalistChest("arbchest"),
"forestry.ArbChest", TileArboristChest.class, Proxies.render.getRenderChest("arbchest"),
ShapedRecipeCustom.createShapedRecipe(ForestryBlock.arboriculture.getItemStack(1, Constants.DEFINITION_ARBCHEST_META),
" # ",
"XYX",
@@ -42,8 +42,8 @@ import forestry.core.fluids.Fluids;
import forestry.core.genetics.Branch;
import forestry.core.genetics.alleles.Allele;
import forestry.core.items.ItemBlockForestry;
import forestry.core.proxy.Proxies;
import forestry.core.recipes.ShapedRecipeCustom;
import forestry.core.render.RenderNaturalistChest;
import forestry.core.tiles.MachineDefinition;
import forestry.core.utils.EntityUtil;
import forestry.core.utils.Log;
@@ -124,7 +124,7 @@ public class PluginLepidopterology extends ForestryPlugin {
registerTemplates();
BlockBase lepidopterology = ((BlockBase) ForestryBlock.lepidopterology.block());
MachineDefinition definitionChest = lepidopterology.addDefinition(new MachineDefinition(Constants.DEFINITION_LEPICHEST_META, "forestry.LepiChest", TileLepidopteristChest.class, new RenderNaturalistChest("lepichest"),
MachineDefinition definitionChest = lepidopterology.addDefinition(new MachineDefinition(Constants.DEFINITION_LEPICHEST_META, "forestry.LepiChest", TileLepidopteristChest.class, Proxies.render.getRenderChest("lepichest"),
ShapedRecipeCustom.createShapedRecipe(
ForestryBlock.lepidopterology.getItemStack(1, Constants.DEFINITION_LEPICHEST_META),
" # ",