mirror of
https://github.com/GTNewHorizons/StorageDrawers.git
synced 2026-11-18 11:29:31 +00:00
Update BoP pack to demonstrate new pack API.
This commit is contained in:
1 parent
ee1042200d
commit
fa8a640193
10 files changed
+68
-322
No files matched your search
+7
@@ -1,6 +1,9 @@
|
||||
package com.jaquadro.minecraft.storagedrawers.packs.bop;
|
||||
|
||||
import com.jaquadro.minecraft.storagedrawers.api.pack.IPackDataResolver;
|
||||
import com.jaquadro.minecraft.storagedrawers.api.pack.StandardDataResolver;
|
||||
import com.jaquadro.minecraft.storagedrawers.packs.bop.core.ModBlocks;
|
||||
import com.jaquadro.minecraft.storagedrawers.packs.bop.core.ModCreativeTabs;
|
||||
import com.jaquadro.minecraft.storagedrawers.packs.bop.core.ModRecipes;
|
||||
import com.jaquadro.minecraft.storagedrawers.packs.bop.core.RefinedRelocation;
|
||||
import cpw.mods.fml.common.Mod;
|
||||
@@ -17,6 +20,10 @@ public class StorageDrawersPack
|
||||
public static final String MOD_VERSION = "@VERSION@";
|
||||
public static final String SOURCE_PATH = "com.jaquadro.minecraft.storagedrawers.packs.bop.";
|
||||
|
||||
public IPackDataResolver resolver = new StandardDataResolver(MOD_ID, new String[] {
|
||||
"sacredoak", "cherry", "dark", "fir", "ethereal", "magic", "mangrove", "palm", "redwood", "willow", null, "pine", "hellbark", "jacaranda", "mahogany"
|
||||
}, ModCreativeTabs.tabStorageDrawers);
|
||||
|
||||
public ModBlocks blocks = new ModBlocks();
|
||||
public ModRecipes recipes = new ModRecipes();
|
||||
|
||||
|
||||
-70
@@ -1,70 +0,0 @@
|
||||
package com.jaquadro.minecraft.storagedrawers.packs.bop.block;
|
||||
|
||||
import com.jaquadro.minecraft.storagedrawers.StorageDrawers;
|
||||
import com.jaquadro.minecraft.storagedrawers.block.BlockDrawers;
|
||||
import com.jaquadro.minecraft.storagedrawers.packs.bop.StorageDrawersPack;
|
||||
import com.jaquadro.minecraft.storagedrawers.packs.bop.core.ModCreativeTabs;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class BlockDrawersPack extends BlockDrawers
|
||||
{
|
||||
public static String[] textureNames = new String[] { "sacredoak", "cherry", "dark", "fir", "ethereal", "magic", "mangrove", "palm", "redwood", "willow", null, "pine", "hellbark", "jacaranda", "mahogany" };
|
||||
|
||||
public BlockDrawersPack (String blockName, int drawerCount, boolean halfDepth) {
|
||||
super(Material.wood, blockName, drawerCount, halfDepth);
|
||||
|
||||
if (StorageDrawers.config.cache.addonSeparateVanilla)
|
||||
setCreativeTab(ModCreativeTabs.tabStorageDrawers);
|
||||
else
|
||||
setCreativeTab(com.jaquadro.minecraft.storagedrawers.core.ModCreativeTabs.tabStorageDrawers);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getSubBlocks (Item item, CreativeTabs creativeTabs, List list) {
|
||||
if (!StorageDrawers.config.cache.addonShowVanilla)
|
||||
return;
|
||||
|
||||
for (int i = 0; i < textureNames.length; i++) {
|
||||
if (textureNames[i] != null)
|
||||
list.add(new ItemStack(item, 1, i));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons (IIconRegister register) {
|
||||
super.registerBlockIcons(register);
|
||||
|
||||
String[] subtex = textureNames;
|
||||
|
||||
iconSide = new IIcon[subtex.length];
|
||||
iconSideH = new IIcon[subtex.length];
|
||||
iconSideV = new IIcon[subtex.length];
|
||||
iconFront1 = new IIcon[subtex.length];
|
||||
iconFront2 = new IIcon[subtex.length];
|
||||
iconFront4 = new IIcon[subtex.length];
|
||||
iconTrim = new IIcon[subtex.length];
|
||||
|
||||
for (int i = 0; i < subtex.length; i++) {
|
||||
if (subtex[i] == null)
|
||||
continue;
|
||||
|
||||
iconFront1[i] = register.registerIcon(StorageDrawersPack.MOD_ID + ":drawers_" + subtex[i] + "_front_1");
|
||||
iconFront2[i] = register.registerIcon(StorageDrawersPack.MOD_ID + ":drawers_" + subtex[i] + "_front_2");
|
||||
iconFront4[i] = register.registerIcon(StorageDrawersPack.MOD_ID + ":drawers_" + subtex[i] + "_front_4");
|
||||
iconSide[i] = register.registerIcon(StorageDrawersPack.MOD_ID + ":drawers_" + subtex[i] + "_side");
|
||||
iconSideV[i] = register.registerIcon(StorageDrawersPack.MOD_ID + ":drawers_" + subtex[i] + "_side_v");
|
||||
iconSideH[i] = register.registerIcon(StorageDrawersPack.MOD_ID + ":drawers_" + subtex[i] + "_side_h");
|
||||
iconTrim[i] = register.registerIcon(StorageDrawersPack.MOD_ID + ":drawers_" + subtex[i] + "_trim");
|
||||
}
|
||||
}
|
||||
}
|
||||
-69
@@ -1,69 +0,0 @@
|
||||
package com.jaquadro.minecraft.storagedrawers.packs.bop.block;
|
||||
|
||||
import com.jaquadro.minecraft.storagedrawers.StorageDrawers;
|
||||
import com.jaquadro.minecraft.storagedrawers.integration.refinedrelocation.BlockSortingDrawers;
|
||||
import com.jaquadro.minecraft.storagedrawers.packs.bop.core.ModCreativeTabs;
|
||||
import com.jaquadro.minecraft.storagedrawers.packs.bop.StorageDrawersPack;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class BlockSortingDrawersPack extends BlockSortingDrawers
|
||||
{
|
||||
public BlockSortingDrawersPack (String blockName, int drawerCount, boolean halfDepth) {
|
||||
super(blockName, drawerCount, halfDepth);
|
||||
|
||||
if (StorageDrawers.config.cache.addonSeparateVanilla)
|
||||
setCreativeTab(ModCreativeTabs.tabStorageDrawers);
|
||||
else
|
||||
setCreativeTab(com.jaquadro.minecraft.storagedrawers.core.ModCreativeTabs.tabStorageDrawers);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getSubBlocks (Item item, CreativeTabs creativeTabs, List list) {
|
||||
if (!StorageDrawers.config.cache.addonShowVanilla)
|
||||
return;
|
||||
|
||||
for (int i = 0; i < BlockDrawersPack.textureNames.length; i++) {
|
||||
if (BlockDrawersPack.textureNames[i] != null)
|
||||
list.add(new ItemStack(item, 1, i));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons (IIconRegister register) {
|
||||
super.registerBlockIcons(register);
|
||||
|
||||
String[] subtex = BlockDrawersPack.textureNames;
|
||||
|
||||
iconSide = new IIcon[subtex.length];
|
||||
iconSideH = new IIcon[subtex.length];
|
||||
iconSideV = new IIcon[subtex.length];
|
||||
iconFront1 = new IIcon[subtex.length];
|
||||
iconFront2 = new IIcon[subtex.length];
|
||||
iconFront4 = new IIcon[subtex.length];
|
||||
iconTrim = new IIcon[subtex.length];
|
||||
iconSort = new IIcon[subtex.length];
|
||||
|
||||
for (int i = 0; i < subtex.length; i++) {
|
||||
if (subtex[i] == null)
|
||||
continue;
|
||||
|
||||
iconFront1[i] = register.registerIcon(StorageDrawersPack.MOD_ID + ":drawers_" + subtex[i] + "_front_1");
|
||||
iconFront2[i] = register.registerIcon(StorageDrawersPack.MOD_ID + ":drawers_" + subtex[i] + "_front_2");
|
||||
iconFront4[i] = register.registerIcon(StorageDrawersPack.MOD_ID + ":drawers_" + subtex[i] + "_front_4");
|
||||
iconSide[i] = register.registerIcon(StorageDrawersPack.MOD_ID + ":drawers_" + subtex[i] + "_side");
|
||||
iconSideV[i] = register.registerIcon(StorageDrawersPack.MOD_ID + ":drawers_" + subtex[i] + "_side_v");
|
||||
iconSideH[i] = register.registerIcon(StorageDrawersPack.MOD_ID + ":drawers_" + subtex[i] + "_side_h");
|
||||
iconTrim[i] = register.registerIcon(StorageDrawersPack.MOD_ID + ":drawers_" + subtex[i] + "_trim");
|
||||
iconSort[i] = register.registerIcon(StorageDrawersPack.MOD_ID + ":drawers_" + subtex[i] + "_sort");
|
||||
}
|
||||
}
|
||||
}
|
||||
-43
@@ -1,43 +0,0 @@
|
||||
package com.jaquadro.minecraft.storagedrawers.packs.bop.block;
|
||||
|
||||
import com.jaquadro.minecraft.storagedrawers.StorageDrawers;
|
||||
import com.jaquadro.minecraft.storagedrawers.block.BlockTrim;
|
||||
import com.jaquadro.minecraft.storagedrawers.packs.bop.core.ModBlocks;
|
||||
import com.jaquadro.minecraft.storagedrawers.packs.bop.core.ModCreativeTabs;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class BlockTrimPack extends BlockTrim
|
||||
{
|
||||
public BlockTrimPack (String name) {
|
||||
super(name);
|
||||
|
||||
if (StorageDrawers.config.cache.addonSeparateVanilla)
|
||||
setCreativeTab(ModCreativeTabs.tabStorageDrawers);
|
||||
else
|
||||
setCreativeTab(com.jaquadro.minecraft.storagedrawers.core.ModCreativeTabs.tabStorageDrawers);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getSubBlocks (Item item, CreativeTabs creativeTabs, List list) {
|
||||
if (!StorageDrawers.config.cache.addonShowVanilla)
|
||||
return;
|
||||
|
||||
for (int i = 0; i < BlockDrawersPack.textureNames.length; i++) {
|
||||
if (BlockDrawersPack.textureNames[i] != null)
|
||||
list.add(new ItemStack(item, 1, i));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon (int side, int meta) {
|
||||
return ModBlocks.fullDrawers1.getIcon(0, meta);
|
||||
}
|
||||
}
|
||||
+25
-24
@@ -1,49 +1,50 @@
|
||||
package com.jaquadro.minecraft.storagedrawers.packs.bop.core;
|
||||
|
||||
import com.jaquadro.minecraft.storagedrawers.StorageDrawers;
|
||||
import com.jaquadro.minecraft.storagedrawers.block.*;
|
||||
import com.jaquadro.minecraft.storagedrawers.api.StorageDrawersApi;
|
||||
import com.jaquadro.minecraft.storagedrawers.api.pack.BlockConfiguration;
|
||||
import com.jaquadro.minecraft.storagedrawers.api.pack.IPackBlockFactory;
|
||||
import com.jaquadro.minecraft.storagedrawers.api.pack.IPackDataResolver;
|
||||
import com.jaquadro.minecraft.storagedrawers.config.ConfigManager;
|
||||
import com.jaquadro.minecraft.storagedrawers.integration.notenoughitems.NEIStorageDrawersConfig;
|
||||
import com.jaquadro.minecraft.storagedrawers.packs.bop.block.BlockDrawersPack;
|
||||
import com.jaquadro.minecraft.storagedrawers.packs.bop.item.ItemDrawersPack;
|
||||
import com.jaquadro.minecraft.storagedrawers.packs.bop.item.ItemTrimPack;
|
||||
import com.jaquadro.minecraft.storagedrawers.packs.bop.StorageDrawersPack;
|
||||
import com.jaquadro.minecraft.storagedrawers.packs.bop.block.BlockTrimPack;
|
||||
import cpw.mods.fml.common.registry.GameData;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import net.minecraft.block.Block;
|
||||
|
||||
public class ModBlocks
|
||||
{
|
||||
public static BlockDrawers fullDrawers1;
|
||||
public static BlockDrawers fullDrawers2;
|
||||
public static BlockDrawers fullDrawers4;
|
||||
public static BlockDrawers halfDrawers2;
|
||||
public static BlockDrawers halfDrawers4;
|
||||
public static BlockTrim trim;
|
||||
public static Block fullDrawers1;
|
||||
public static Block fullDrawers2;
|
||||
public static Block fullDrawers4;
|
||||
public static Block halfDrawers2;
|
||||
public static Block halfDrawers4;
|
||||
public static Block trim;
|
||||
|
||||
public void init () {
|
||||
fullDrawers1 = new BlockDrawersPack(makeName("fullDrawers1"), 1, false);
|
||||
fullDrawers2 = new BlockDrawersPack(makeName("fullDrawers2"), 2, false);
|
||||
fullDrawers4 = new BlockDrawersPack(makeName("fullDrawers4"), 4, false);
|
||||
halfDrawers2 = new BlockDrawersPack(makeName("halfDrawers2"), 2, true);
|
||||
halfDrawers4 = new BlockDrawersPack(makeName("halfDrawers4"), 4, true);
|
||||
trim = new BlockTrimPack(makeName("trim"));
|
||||
IPackBlockFactory factory = StorageDrawersApi.instance().packFactory();
|
||||
IPackDataResolver resolver = StorageDrawersPack.instance.resolver;
|
||||
|
||||
fullDrawers1 = factory.createBlock(BlockConfiguration.BasicFull1, resolver);
|
||||
fullDrawers2 = factory.createBlock(BlockConfiguration.BasicFull2, resolver);
|
||||
fullDrawers4 = factory.createBlock(BlockConfiguration.BasicFull4, resolver);
|
||||
halfDrawers2 = factory.createBlock(BlockConfiguration.BasicHalf2, resolver);
|
||||
halfDrawers4 = factory.createBlock(BlockConfiguration.BasicHalf4, resolver);
|
||||
trim = factory.createBlock(BlockConfiguration.Trim, resolver);
|
||||
|
||||
ConfigManager config = StorageDrawers.config;
|
||||
|
||||
if (config.isBlockEnabled("fulldrawers1"))
|
||||
GameRegistry.registerBlock(fullDrawers1, ItemDrawersPack.class, "fullDrawers1");
|
||||
factory.registerBlock(fullDrawers1, "fullDrawers1");
|
||||
if (config.isBlockEnabled("fulldrawers2"))
|
||||
GameRegistry.registerBlock(fullDrawers2, ItemDrawersPack.class, "fullDrawers2");
|
||||
factory.registerBlock(fullDrawers2, "fullDrawers2");
|
||||
if (config.isBlockEnabled("fulldrawers4"))
|
||||
GameRegistry.registerBlock(fullDrawers4, ItemDrawersPack.class, "fullDrawers4");
|
||||
factory.registerBlock(fullDrawers4, "fullDrawers4");
|
||||
if (config.isBlockEnabled("halfdrawers2"))
|
||||
GameRegistry.registerBlock(halfDrawers2, ItemDrawersPack.class, "halfDrawers2");
|
||||
factory.registerBlock(halfDrawers2, "halfDrawers2");
|
||||
if (config.isBlockEnabled("halfdrawers4"))
|
||||
GameRegistry.registerBlock(halfDrawers4, ItemDrawersPack.class, "halfDrawers4");
|
||||
factory.registerBlock(halfDrawers4, "halfDrawers4");
|
||||
if (config.isBlockEnabled("trim"))
|
||||
GameRegistry.registerBlock(trim, ItemTrimPack.class, "trim");
|
||||
factory.registerBlock(trim, "trim");
|
||||
|
||||
if (!config.cache.addonShowNEI) {
|
||||
NEIStorageDrawersConfig.hideBlock(getQualifiedName(fullDrawers1));
|
||||
|
||||
+6
-3
@@ -1,9 +1,10 @@
|
||||
package com.jaquadro.minecraft.storagedrawers.packs.bop.core;
|
||||
|
||||
import com.jaquadro.minecraft.storagedrawers.StorageDrawers;
|
||||
import com.jaquadro.minecraft.storagedrawers.api.pack.IPackDataResolver;
|
||||
import com.jaquadro.minecraft.storagedrawers.config.ConfigManager;
|
||||
import com.jaquadro.minecraft.storagedrawers.core.ModItems;
|
||||
import com.jaquadro.minecraft.storagedrawers.packs.bop.block.BlockDrawersPack;
|
||||
import com.jaquadro.minecraft.storagedrawers.packs.bop.StorageDrawersPack;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.init.Blocks;
|
||||
@@ -20,8 +21,10 @@ public class ModRecipes
|
||||
Block slab1 = GameRegistry.findBlock("BiomesOPlenty", "woodenSingleSlab1");
|
||||
Block slab2 = GameRegistry.findBlock("BiomesOPlenty", "woodenSingleSlab2");
|
||||
|
||||
for (int i = 0; i < BlockDrawersPack.textureNames.length; i++) {
|
||||
if (BlockDrawersPack.textureNames[i] == null)
|
||||
IPackDataResolver resolver = StorageDrawersPack.instance.resolver;
|
||||
|
||||
for (int i = 0; i < 16; i++) {
|
||||
if (!resolver.isValidMetaValue(i))
|
||||
continue;
|
||||
|
||||
if (planks != null) {
|
||||
|
||||
+30
-19
@@ -1,35 +1,41 @@
|
||||
package com.jaquadro.minecraft.storagedrawers.packs.bop.core;
|
||||
|
||||
import com.jaquadro.minecraft.storagedrawers.StorageDrawers;
|
||||
import com.jaquadro.minecraft.storagedrawers.api.StorageDrawersApi;
|
||||
import com.jaquadro.minecraft.storagedrawers.api.pack.BlockConfiguration;
|
||||
import com.jaquadro.minecraft.storagedrawers.api.pack.IPackBlockFactory;
|
||||
import com.jaquadro.minecraft.storagedrawers.api.pack.IPackDataResolver;
|
||||
import com.jaquadro.minecraft.storagedrawers.config.ConfigManager;
|
||||
import com.jaquadro.minecraft.storagedrawers.integration.notenoughitems.NEIStorageDrawersConfig;
|
||||
import com.jaquadro.minecraft.storagedrawers.integration.refinedrelocation.*;
|
||||
import com.jaquadro.minecraft.storagedrawers.packs.bop.block.BlockDrawersPack;
|
||||
import com.jaquadro.minecraft.storagedrawers.packs.bop.block.BlockSortingDrawersPack;
|
||||
import com.jaquadro.minecraft.storagedrawers.packs.bop.item.ItemSortingDrawersPack;
|
||||
import com.jaquadro.minecraft.storagedrawers.packs.bop.StorageDrawersPack;
|
||||
import cpw.mods.fml.common.Loader;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class RefinedRelocation
|
||||
{
|
||||
public static BlockSortingDrawersPack fullDrawers1;
|
||||
public static BlockSortingDrawersPack fullDrawers2;
|
||||
public static BlockSortingDrawersPack fullDrawers4;
|
||||
public static BlockSortingDrawersPack halfDrawers2;
|
||||
public static BlockSortingDrawersPack halfDrawers4;
|
||||
public static Block fullDrawers1;
|
||||
public static Block fullDrawers2;
|
||||
public static Block fullDrawers4;
|
||||
public static Block halfDrawers2;
|
||||
public static Block halfDrawers4;
|
||||
|
||||
public static void init () {
|
||||
ConfigManager config = StorageDrawers.config;
|
||||
if (!Loader.isModLoaded("RefinedRelocation") || !config.cache.enableRefinedRelocationIntegration)
|
||||
return;
|
||||
|
||||
fullDrawers1 = new BlockSortingDrawersPack(ModBlocks.makeName("fullDrawers1"), 1, false);
|
||||
fullDrawers2 = new BlockSortingDrawersPack(ModBlocks.makeName("fullDrawers2"), 2, false);
|
||||
fullDrawers4 = new BlockSortingDrawersPack(ModBlocks.makeName("fullDrawers4"), 4, false);
|
||||
halfDrawers2 = new BlockSortingDrawersPack(ModBlocks.makeName("halfDrawers2"), 2, true);
|
||||
halfDrawers4 = new BlockSortingDrawersPack(ModBlocks.makeName("halfDrawers4"), 4, true);
|
||||
IPackBlockFactory factory = StorageDrawersApi.instance().packFactory();
|
||||
IPackDataResolver resolver = StorageDrawersPack.instance.resolver;
|
||||
|
||||
fullDrawers1 = factory.createBlock(BlockConfiguration.SortingFull1, resolver);
|
||||
fullDrawers2 = factory.createBlock(BlockConfiguration.SortingFull2, resolver);
|
||||
fullDrawers4 = factory.createBlock(BlockConfiguration.SortingFull4, resolver);
|
||||
halfDrawers2 = factory.createBlock(BlockConfiguration.SortingHalf2, resolver);
|
||||
halfDrawers4 = factory.createBlock(BlockConfiguration.SortingHalf4, resolver);
|
||||
|
||||
SortingBlockRegistry.register(ModBlocks.fullDrawers1, fullDrawers1);
|
||||
SortingBlockRegistry.register(ModBlocks.fullDrawers2, fullDrawers2);
|
||||
@@ -38,15 +44,15 @@ public class RefinedRelocation
|
||||
SortingBlockRegistry.register(ModBlocks.halfDrawers4, halfDrawers4);
|
||||
|
||||
if (config.isBlockEnabled("fulldrawers1"))
|
||||
GameRegistry.registerBlock(fullDrawers1, ItemSortingDrawersPack.class, "fullDrawersSort1");
|
||||
factory.registerBlock(fullDrawers1, "fullDrawersSort1");
|
||||
if (config.isBlockEnabled("fulldrawers2"))
|
||||
GameRegistry.registerBlock(fullDrawers2, ItemSortingDrawersPack.class, "fullDrawersSort2");
|
||||
factory.registerBlock(fullDrawers2, "fullDrawersSort2");
|
||||
if (config.isBlockEnabled("fulldrawers4"))
|
||||
GameRegistry.registerBlock(fullDrawers4, ItemSortingDrawersPack.class, "fullDrawersSort4");
|
||||
factory.registerBlock(fullDrawers4, "fullDrawersSort4");
|
||||
if (config.isBlockEnabled("halfdrawers2"))
|
||||
GameRegistry.registerBlock(halfDrawers2, ItemSortingDrawersPack.class, "halfDrawersSort2");
|
||||
factory.registerBlock(halfDrawers2, "halfDrawersSort2");
|
||||
if (config.isBlockEnabled("halfdrawers4"))
|
||||
GameRegistry.registerBlock(halfDrawers4, ItemSortingDrawersPack.class, "halfDrawersSort4");
|
||||
factory.registerBlock(halfDrawers4, "halfDrawersSort4");
|
||||
|
||||
if (!config.cache.addonShowNEI) {
|
||||
NEIStorageDrawersConfig.hideBlock(ModBlocks.getQualifiedName(fullDrawers1));
|
||||
@@ -62,7 +68,12 @@ public class RefinedRelocation
|
||||
if (!Loader.isModLoaded("RefinedRelocation") || !config.cache.enableRefinedRelocationIntegration)
|
||||
return;
|
||||
|
||||
for (int i = 0; i < BlockDrawersPack.textureNames.length; i++) {
|
||||
IPackDataResolver resolver = StorageDrawersPack.instance.resolver;
|
||||
|
||||
for (int i = 0; i < 16; i++) {
|
||||
if (!resolver.isValidMetaValue(i))
|
||||
continue;
|
||||
|
||||
if (config.isBlockEnabled("fulldrawers1"))
|
||||
GameRegistry.addRecipe(new ItemStack(fullDrawers1, 1, i), "x x", " y ", "x x",
|
||||
'x', Items.gold_nugget, 'y', new ItemStack(ModBlocks.fullDrawers1, 1, i));
|
||||
|
||||
-33
@@ -1,33 +0,0 @@
|
||||
package com.jaquadro.minecraft.storagedrawers.packs.bop.item;
|
||||
|
||||
import com.jaquadro.minecraft.storagedrawers.StorageDrawers;
|
||||
import com.jaquadro.minecraft.storagedrawers.config.ConfigManager;
|
||||
import com.jaquadro.minecraft.storagedrawers.item.ItemDrawers;
|
||||
import com.jaquadro.minecraft.storagedrawers.packs.bop.block.BlockDrawersPack;
|
||||
import com.jaquadro.minecraft.storagedrawers.packs.bop.core.ModBlocks;
|
||||
import net.minecraft.block.Block;
|
||||
|
||||
public class ItemDrawersPack extends ItemDrawers
|
||||
{
|
||||
public ItemDrawersPack (Block block) {
|
||||
super(block, BlockDrawersPack.textureNames);
|
||||
}
|
||||
|
||||
protected int getCapacityForBlock (Block block) {
|
||||
ConfigManager config = StorageDrawers.config;
|
||||
int count = 0;
|
||||
|
||||
if (block == ModBlocks.fullDrawers1)
|
||||
count = config.getBlockBaseStorage("fulldrawers1");
|
||||
else if (block == ModBlocks.fullDrawers2)
|
||||
count = config.getBlockBaseStorage("fulldrawers2");
|
||||
else if (block == ModBlocks.fullDrawers4)
|
||||
count = config.getBlockBaseStorage("fulldrawers4");
|
||||
else if (block == ModBlocks.halfDrawers2)
|
||||
count = config.getBlockBaseStorage("halfdrawers2");
|
||||
else if (block == ModBlocks.halfDrawers4)
|
||||
count = config.getBlockBaseStorage("halfdrawers4");
|
||||
|
||||
return count;
|
||||
}
|
||||
}
|
||||
-49
@@ -1,49 +0,0 @@
|
||||
package com.jaquadro.minecraft.storagedrawers.packs.bop.item;
|
||||
|
||||
import com.jaquadro.minecraft.storagedrawers.StorageDrawers;
|
||||
import com.jaquadro.minecraft.storagedrawers.config.ConfigManager;
|
||||
import com.jaquadro.minecraft.storagedrawers.packs.bop.core.RefinedRelocation;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ItemSortingDrawersPack extends ItemDrawersPack
|
||||
{
|
||||
public ItemSortingDrawersPack (Block block) {
|
||||
super(block);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation (ItemStack itemStack, EntityPlayer player, List list, boolean par4) {
|
||||
super.addInformation(itemStack, player, list, par4);
|
||||
|
||||
Block block = Block.getBlockFromItem(itemStack.getItem());
|
||||
list.add(EnumChatFormatting.YELLOW + StatCollector.translateToLocalFormatted("storageDrawers.waila.sorting"));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getCapacityForBlock (Block block) {
|
||||
ConfigManager config = StorageDrawers.config;
|
||||
int count = 0;
|
||||
|
||||
if (block == RefinedRelocation.fullDrawers1)
|
||||
count = config.getBlockBaseStorage("fulldrawers1");
|
||||
else if (block == RefinedRelocation.fullDrawers2)
|
||||
count = config.getBlockBaseStorage("fulldrawers2");
|
||||
else if (block == RefinedRelocation.fullDrawers4)
|
||||
count = config.getBlockBaseStorage("fulldrawers4");
|
||||
else if (block == RefinedRelocation.halfDrawers2)
|
||||
count = config.getBlockBaseStorage("halfdrawers2");
|
||||
else if (block == RefinedRelocation.halfDrawers4)
|
||||
count = config.getBlockBaseStorage("halfdrawers4");
|
||||
|
||||
return count;
|
||||
}
|
||||
}
|
||||
-12
@@ -1,12 +0,0 @@
|
||||
package com.jaquadro.minecraft.storagedrawers.packs.bop.item;
|
||||
|
||||
import com.jaquadro.minecraft.storagedrawers.item.ItemTrim;
|
||||
import com.jaquadro.minecraft.storagedrawers.packs.bop.block.BlockDrawersPack;
|
||||
import net.minecraft.block.Block;
|
||||
|
||||
public class ItemTrimPack extends ItemTrim
|
||||
{
|
||||
public ItemTrimPack (Block block) {
|
||||
super(block, BlockDrawersPack.textureNames);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user