mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-18 11:19:28 +00:00
Fix #258 crash when disabling storage module
This commit is contained in:
1 parent
270147ce36
commit
bbcfa7bf2b
4 files changed
+64
-56
No files matched your search
@@ -224,9 +224,8 @@ public class PluginCore extends ForestryPlugin {
|
||||
new OverlayInfo("ex-8", 0xffffff, 0x444444), new OverlayInfo("ex-9", 0xffffff, 0xbfffdd), new OverlayInfo("ex-10", 0xffffff, 0x68ccee),
|
||||
new OverlayInfo("ex-11", 0xffffff, 0x1c57c6)), "thermionicTubes");
|
||||
|
||||
// / CRATES AND CARTONS
|
||||
// / CARTONS
|
||||
ForestryItem.carton.registerItem((new ItemForestry()), "carton");
|
||||
ForestryItem.crate.registerItem((new ItemForestry()), "crate");
|
||||
|
||||
// / CRAFTING CARPENTER
|
||||
ForestryItem.stickImpregnated.registerItem((new ItemForestry()), "oakStick");
|
||||
|
||||
@@ -427,59 +427,60 @@ public class PluginFactory extends ForestryPlugin {
|
||||
RecipeManagers.carpenterManager.addRecipe(null, ForestryItem.ingotBronze.getItemStack(), new Object[]{"#", '#', ForestryItem.brokenBronzeShovel});
|
||||
|
||||
// Crating and uncrating condensed
|
||||
RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedWood.getItemStack());
|
||||
RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedCobblestone.getItemStack());
|
||||
RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedDirt.getItemStack());
|
||||
RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedStone.getItemStack());
|
||||
RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedBrick.getItemStack());
|
||||
RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedCacti.getItemStack());
|
||||
RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedSand.getItemStack());
|
||||
RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedObsidian.getItemStack());
|
||||
RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedNetherrack.getItemStack());
|
||||
RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedSoulsand.getItemStack());
|
||||
RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedSandstone.getItemStack());
|
||||
RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedBogearth.getItemStack());
|
||||
RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedHumus.getItemStack());
|
||||
RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedNetherbrick.getItemStack());
|
||||
RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedPeat.getItemStack());
|
||||
RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedApatite.getItemStack());
|
||||
RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedFertilizer.getItemStack());
|
||||
((RecipeManager) RecipeManagers.carpenterManager).addCrating("ingotTin", ForestryItem.ingotTin.getItemStack(), ForestryItem.cratedTin.getItemStack());
|
||||
((RecipeManager) RecipeManagers.carpenterManager).addCrating("ingotCopper", ForestryItem.ingotCopper.getItemStack(), ForestryItem.cratedCopper.getItemStack());
|
||||
((RecipeManager) RecipeManagers.carpenterManager).addCrating("ingotBronze", ForestryItem.ingotBronze.getItemStack(), ForestryItem.cratedBronze.getItemStack());
|
||||
RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedWheat.getItemStack());
|
||||
RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedMycelium.getItemStack());
|
||||
RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedMulch.getItemStack());
|
||||
RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedCookies.getItemStack());
|
||||
if (PluginManager.Module.STORAGE.isEnabled()) {
|
||||
RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedWood.getItemStack());
|
||||
RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedCobblestone.getItemStack());
|
||||
RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedDirt.getItemStack());
|
||||
RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedStone.getItemStack());
|
||||
RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedBrick.getItemStack());
|
||||
RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedCacti.getItemStack());
|
||||
RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedSand.getItemStack());
|
||||
RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedObsidian.getItemStack());
|
||||
RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedNetherrack.getItemStack());
|
||||
RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedSoulsand.getItemStack());
|
||||
RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedSandstone.getItemStack());
|
||||
RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedBogearth.getItemStack());
|
||||
RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedHumus.getItemStack());
|
||||
RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedNetherbrick.getItemStack());
|
||||
RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedPeat.getItemStack());
|
||||
RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedApatite.getItemStack());
|
||||
RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedFertilizer.getItemStack());
|
||||
RecipeManagers.carpenterManager.addCrating("ingotTin", ForestryItem.ingotTin.getItemStack(), ForestryItem.cratedTin.getItemStack());
|
||||
RecipeManagers.carpenterManager.addCrating("ingotCopper", ForestryItem.ingotCopper.getItemStack(), ForestryItem.cratedCopper.getItemStack());
|
||||
RecipeManagers.carpenterManager.addCrating("ingotBronze", ForestryItem.ingotBronze.getItemStack(), ForestryItem.cratedBronze.getItemStack());
|
||||
RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedWheat.getItemStack());
|
||||
RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedMycelium.getItemStack());
|
||||
RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedMulch.getItemStack());
|
||||
RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedCookies.getItemStack());
|
||||
|
||||
RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedHoneycombs.getItemStack());
|
||||
RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedBeeswax.getItemStack());
|
||||
RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedPollen.getItemStack());
|
||||
RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedPropolis.getItemStack());
|
||||
RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedHoneydew.getItemStack());
|
||||
RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedRoyalJelly.getItemStack());
|
||||
RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedCocoaComb.getItemStack());
|
||||
RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedRedstone.getItemStack());
|
||||
RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedLapis.getItemStack());
|
||||
RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedReeds.getItemStack());
|
||||
RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedClay.getItemStack());
|
||||
RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedGlowstone.getItemStack());
|
||||
RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedApples.getItemStack());
|
||||
RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedNetherwart.getItemStack());
|
||||
|
||||
RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedSimmeringCombs.getItemStack());
|
||||
RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedStringyCombs.getItemStack());
|
||||
RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedFrozenCombs.getItemStack());
|
||||
RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedDrippingCombs.getItemStack());
|
||||
RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedRefractoryWax.getItemStack());
|
||||
RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedPhosphor.getItemStack());
|
||||
RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedAsh.getItemStack());
|
||||
RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedCharcoal.getItemStack());
|
||||
RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedGravel.getItemStack());
|
||||
RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedCoal.getItemStack());
|
||||
RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedSeeds.getItemStack());
|
||||
RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedSaplings.getItemStack());
|
||||
RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedHoneycombs.getItemStack());
|
||||
RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedBeeswax.getItemStack());
|
||||
RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedPollen.getItemStack());
|
||||
RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedPropolis.getItemStack());
|
||||
RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedHoneydew.getItemStack());
|
||||
RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedRoyalJelly.getItemStack());
|
||||
RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedCocoaComb.getItemStack());
|
||||
RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedRedstone.getItemStack());
|
||||
RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedLapis.getItemStack());
|
||||
RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedReeds.getItemStack());
|
||||
RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedClay.getItemStack());
|
||||
RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedGlowstone.getItemStack());
|
||||
RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedApples.getItemStack());
|
||||
RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedNetherwart.getItemStack());
|
||||
|
||||
RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedSimmeringCombs.getItemStack());
|
||||
RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedStringyCombs.getItemStack());
|
||||
RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedFrozenCombs.getItemStack());
|
||||
RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedDrippingCombs.getItemStack());
|
||||
RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedRefractoryWax.getItemStack());
|
||||
RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedPhosphor.getItemStack());
|
||||
RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedAsh.getItemStack());
|
||||
RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedCharcoal.getItemStack());
|
||||
RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedGravel.getItemStack());
|
||||
RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedCoal.getItemStack());
|
||||
RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedSeeds.getItemStack());
|
||||
RecipeManagers.carpenterManager.addCrating(ForestryItem.cratedSaplings.getItemStack());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -218,8 +218,12 @@ public class PluginManager {
|
||||
for (Module m : loadedModules) {
|
||||
ForestryPlugin plugin = m.instance;
|
||||
Proxies.log.fine("Init Start: {0}", plugin);
|
||||
plugin.registerBackpackItems();
|
||||
plugin.registerCrates();
|
||||
|
||||
if (Module.STORAGE.isEnabled()) {
|
||||
plugin.registerBackpackItems();
|
||||
plugin.registerCrates();
|
||||
}
|
||||
|
||||
plugin.doInit();
|
||||
Proxies.log.fine("Init Complete: {0}", plugin);
|
||||
}
|
||||
|
||||
@@ -63,6 +63,7 @@ import forestry.core.interfaces.IOreDictionaryHandler;
|
||||
import forestry.core.interfaces.IPickupHandler;
|
||||
import forestry.core.interfaces.IResupplyHandler;
|
||||
import forestry.core.interfaces.ISaveEventHandler;
|
||||
import forestry.core.items.ItemForestry;
|
||||
import forestry.core.network.GuiId;
|
||||
import forestry.core.proxy.Proxies;
|
||||
import forestry.core.utils.LiquidHelper;
|
||||
@@ -71,7 +72,6 @@ import forestry.storage.BackpackHelper;
|
||||
import forestry.storage.GuiHandlerStorage;
|
||||
import forestry.storage.PickupHandlerStorage;
|
||||
import forestry.storage.ResupplyHandler;
|
||||
import forestry.storage.items.ItemBackpack;
|
||||
import forestry.storage.items.ItemNaturalistBackpack;
|
||||
import forestry.storage.items.ItemNaturalistBackpack.BackpackDefinitionApiarist;
|
||||
import forestry.storage.items.ItemNaturalistBackpack.BackpackDefinitionLepidopterist;
|
||||
@@ -240,6 +240,10 @@ public class PluginStorage extends ForestryPlugin implements IOreDictionaryHandl
|
||||
|
||||
@Override
|
||||
protected void registerItems() {
|
||||
// CRATE
|
||||
ForestryItem.crate.registerItem((new ItemForestry()), "crate");
|
||||
|
||||
// BACKPACKS
|
||||
BackpackDefinition definition = new BackpackDefinitionApiarist("apiarist", 0xc4923d);
|
||||
BackpackManager.definitions.put(definition.getKey(), definition);
|
||||
ForestryItem.apiaristBackpack.registerItem(new ItemNaturalistBackpack(GuiId.ApiaristBackpackGUI.ordinal(), definition).setCreativeTab(Tabs.tabApiculture), "apiaristBag");
|
||||
|
||||
Reference in new issue
Block a user