Fix #592 Some Crates are missing a recipe

This commit is contained in:
mezz committed 2015-04-05 20:22:21 -07:00
1 parent 803911e10a
commit c82dd0fbfb
18 files changed
+454 -599

No files matched your search

@@ -22,17 +22,15 @@ import forestry.plugins.PluginStorage;
public class CrateRegistry implements ICrateRegistry {
private void registerCrate(ItemStack stack, String uid, boolean useOreDict) {
if (PluginManager.getStage() != PluginManager.Stage.INIT) {
throw new RuntimeException("Tried to make a crate outside of Init");
}
private static void registerCrate(ItemStack stack, String uid, boolean useOreDict) {
if (stack == null || stack.getItem() == null) {
throw new RuntimeException("Tried to make a crate without an item");
Proxies.log.severe("Tried to make a crate without an item");
return;
}
if (uid == null) {
throw new RuntimeException("Tried to make a crate without a uid");
Proxies.log.severe("Tried to make a crate without a uid");
return;
}
ItemCrated crate = new ItemCrated(stack, useOreDict);
@@ -15,6 +15,7 @@ import net.minecraft.item.ItemStack;
import forestry.api.core.ForestryAPI;
import forestry.api.storage.EnumBackpackType;
import forestry.api.storage.IBackpackDefinition;
import forestry.plugins.PluginApiculture;
import forestry.plugins.PluginLepidopterology;
import forestry.storage.BackpackDefinition;
@@ -47,7 +48,7 @@ public class ItemNaturalistBackpack extends ItemBackpack {
private final int guiId;
public ItemNaturalistBackpack(int guiId, BackpackDefinition definition) {
public ItemNaturalistBackpack(int guiId, IBackpackDefinition definition) {
super(definition, EnumBackpackType.APIARIST);
this.guiId = guiId;
}
@@ -20,7 +20,7 @@ public class ClientProxyStorage extends ProxyStorage {
private static final CrateRenderingHandler crateRenderer = new CrateRenderingHandler();
@Override
public void registerCrate(ItemCrated crate) {
public void registerCrateForRendering(ItemCrated crate) {
MinecraftForgeClient.registerItemRenderer(crate, crateRenderer);
}
}
@@ -14,7 +14,7 @@ import forestry.core.items.ItemCrated;
public class ProxyStorage {
public void registerCrate(ItemCrated crate) {
public void registerCrateForRendering(ItemCrated crate) {
}
}