mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-14 01:04:12 +00:00
Fix #826 Biomes O Plenty module crashes with disabled Storage Module
This commit is contained in:
1 parent
e0ccc28d55
commit
cf2050d77a
1 file changed
+9
-12
@@ -72,7 +72,6 @@ public class PluginBiomesOPlenty extends ForestryPlugin {
|
||||
addFarmCrops();
|
||||
addFermenterRecipes();
|
||||
addSqueezerRecipes();
|
||||
addBlocksToBackpack();
|
||||
}
|
||||
|
||||
private static void addFarmCrops() {
|
||||
@@ -173,7 +172,8 @@ public class PluginBiomesOPlenty extends ForestryPlugin {
|
||||
}
|
||||
}
|
||||
|
||||
private static void addBlocksToBackpack() {
|
||||
@Override
|
||||
protected void registerBackpackItems() {
|
||||
// most blocks are covered by the oreDictionary
|
||||
|
||||
final int MINER = 0;
|
||||
@@ -206,16 +206,13 @@ public class PluginBiomesOPlenty extends ForestryPlugin {
|
||||
|
||||
private static void addBlocksToBackpack(int backpackId, String... blockNames) {
|
||||
for (String blockName : blockNames) {
|
||||
addBlockToBackpack(backpackId, blockName, OreDictionary.WILDCARD_VALUE);
|
||||
}
|
||||
}
|
||||
|
||||
private static void addBlockToBackpack(int backpackId, String blockName, int meta) {
|
||||
Block block = GameRegistry.findBlock(BoP, blockName);
|
||||
if (block != null) {
|
||||
BackpackManager.backpackItems[backpackId].add(new ItemStack(block, 1, meta));
|
||||
} else {
|
||||
Proxies.log.warning("Missing block: ", blockName);
|
||||
Block block = GameRegistry.findBlock(BoP, blockName);
|
||||
if (block != null) {
|
||||
ItemStack blockStack = new ItemStack(block, 1, OreDictionary.WILDCARD_VALUE);
|
||||
BackpackManager.backpackItems[backpackId].add(blockStack);
|
||||
} else {
|
||||
Proxies.log.warning("Missing block: ", blockName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user