mirror of
https://github.com/GTNewHorizons/StorageDrawers.git
synced 2026-11-26 15:03:09 +00:00
Merge pull request #192 from codewarrior0/issue-190-RR-NPE
Fix NPE in PackFactory.registerResolver when RR is not installed.
This commit is contained in:
commit
0409437358
1 file changed
+7
-6
@@ -17,6 +17,7 @@ import com.jaquadro.minecraft.storagedrawers.item.pack.ItemDrawersPack;
|
||||
import com.jaquadro.minecraft.storagedrawers.item.pack.ItemSortingDrawersPack;
|
||||
import com.jaquadro.minecraft.storagedrawers.item.pack.ItemSortingTrimPack;
|
||||
import com.jaquadro.minecraft.storagedrawers.item.pack.ItemTrimPack;
|
||||
import cpw.mods.fml.common.Loader;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -91,32 +92,32 @@ public class PackFactory implements IPackBlockFactory
|
||||
ConfigManager config = StorageDrawers.config;
|
||||
if (config.isBlockEnabled("fulldrawers1")) {
|
||||
StorageDrawers.blockRegistry.register(BlockConfiguration.BasicFull1, resolver);
|
||||
if (config.cache.enableRefinedRelocationIntegration)
|
||||
if (Loader.isModLoaded("RefinedRelocation") && config.cache.enableRefinedRelocationIntegration)
|
||||
StorageDrawers.blockRegistry.register(BlockConfiguration.SortingFull1, resolver);
|
||||
}
|
||||
if (config.isBlockEnabled("fulldrawers2")) {
|
||||
StorageDrawers.blockRegistry.register(BlockConfiguration.BasicFull2, resolver);
|
||||
if (config.cache.enableRefinedRelocationIntegration)
|
||||
if (Loader.isModLoaded("RefinedRelocation") && config.cache.enableRefinedRelocationIntegration)
|
||||
StorageDrawers.blockRegistry.register(BlockConfiguration.SortingFull2, resolver);
|
||||
}
|
||||
if (config.isBlockEnabled("fulldrawers4")) {
|
||||
StorageDrawers.blockRegistry.register(BlockConfiguration.BasicFull4, resolver);
|
||||
if (config.cache.enableRefinedRelocationIntegration)
|
||||
if (Loader.isModLoaded("RefinedRelocation") && config.cache.enableRefinedRelocationIntegration)
|
||||
StorageDrawers.blockRegistry.register(BlockConfiguration.SortingFull4, resolver);
|
||||
}
|
||||
if (config.isBlockEnabled("halfdrawers2")) {
|
||||
StorageDrawers.blockRegistry.register(BlockConfiguration.BasicHalf2, resolver);
|
||||
if (config.cache.enableRefinedRelocationIntegration)
|
||||
if (Loader.isModLoaded("RefinedRelocation") && config.cache.enableRefinedRelocationIntegration)
|
||||
StorageDrawers.blockRegistry.register(BlockConfiguration.SortingHalf2, resolver);
|
||||
}
|
||||
if (config.isBlockEnabled("halfdrawers4")) {
|
||||
StorageDrawers.blockRegistry.register(BlockConfiguration.BasicHalf4, resolver);
|
||||
if (config.cache.enableRefinedRelocationIntegration)
|
||||
if (Loader.isModLoaded("RefinedRelocation") && config.cache.enableRefinedRelocationIntegration)
|
||||
StorageDrawers.blockRegistry.register(BlockConfiguration.SortingHalf4, resolver);
|
||||
}
|
||||
if (config.isBlockEnabled("trim")) {
|
||||
StorageDrawers.blockRegistry.register(BlockConfiguration.Trim, resolver);
|
||||
if (config.cache.enableRefinedRelocationIntegration)
|
||||
if (Loader.isModLoaded("RefinedRelocation") && config.cache.enableRefinedRelocationIntegration)
|
||||
StorageDrawers.blockRegistry.register(BlockConfiguration.TrimSorting, resolver);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user