mirror of
https://github.com/GTNewHorizons/StorageDrawers.git
synced 2026-11-13 00:47:31 +00:00
Update erebus pack to pack API
This commit is contained in:
1 parent
36b2470340
commit
104e79a09c
17 files changed
+203
-436
No files matched your search
-4
@@ -64,8 +64,4 @@ public class ModBlocks
|
||||
public static String getQualifiedName (Block block) {
|
||||
return GameData.getBlockRegistry().getNameForObject(block);
|
||||
}
|
||||
|
||||
public static String makeName (String name) {
|
||||
return StorageDrawersPack.MOD_ID.toLowerCase() + "." + name;
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -30,7 +30,7 @@ public class RefinedRelocation
|
||||
if (!Loader.isModLoaded("RefinedRelocation") || !api.userConfig().integrationConfig().isRefinedRelocationEnabled())
|
||||
return;
|
||||
|
||||
IPackBlockFactory factory = StorageDrawersApi.instance().packFactory();
|
||||
IPackBlockFactory factory = api.packFactory();
|
||||
IPackDataResolver resolver = StorageDrawersPack.instance.resolver;
|
||||
|
||||
fullDrawers1 = factory.createBlock(BlockConfiguration.SortingFull1, resolver);
|
||||
|
||||
@@ -17,7 +17,7 @@ buildscript {
|
||||
|
||||
apply plugin: 'forge'
|
||||
|
||||
version = "1.7.10-1.0.1"
|
||||
version = "1.7.10-1.0.2"
|
||||
group= "com.jaquadro.minecraft.storagedrawers" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
|
||||
archivesBaseName = "StorageDrawers-Erebus"
|
||||
|
||||
@@ -26,7 +26,7 @@ minecraft {
|
||||
assetDir = "../../runtime/assets"
|
||||
|
||||
replace '@VERSION@', project.version
|
||||
replace 'required-after:StorageDrawers', "required-after:StorageDrawers@[1.5.4,)"
|
||||
replace 'required-after:StorageDrawers', "required-after:StorageDrawers@[1.5.8,)"
|
||||
}
|
||||
|
||||
sourceSets.main {
|
||||
|
||||
+4
-3
@@ -1,8 +1,7 @@
|
||||
package com.jaquadro.minecraft.storagedrawers.packs.erebus;
|
||||
|
||||
import com.jaquadro.minecraft.storagedrawers.packs.erebus.core.ModBlocks;
|
||||
import com.jaquadro.minecraft.storagedrawers.packs.erebus.core.ModRecipes;
|
||||
import com.jaquadro.minecraft.storagedrawers.packs.erebus.core.RefinedRelocation;
|
||||
import com.jaquadro.minecraft.storagedrawers.api.pack.IPackDataResolver;
|
||||
import com.jaquadro.minecraft.storagedrawers.packs.erebus.core.*;
|
||||
import cpw.mods.fml.common.Mod;
|
||||
import cpw.mods.fml.common.SidedProxy;
|
||||
import cpw.mods.fml.common.event.FMLInitializationEvent;
|
||||
@@ -17,6 +16,8 @@ public class StorageDrawersPack
|
||||
public static final String MOD_VERSION = "@VERSION@";
|
||||
public static final String SOURCE_PATH = "com.jaquadro.minecraft.storagedrawers.packs.erebus.";
|
||||
|
||||
public IPackDataResolver resolver = new DataResolver(MOD_ID, ModCreativeTabs.tabStorageDrawers);
|
||||
|
||||
public ModBlocks blocks = new ModBlocks();
|
||||
public ModRecipes recipes = new ModRecipes();
|
||||
|
||||
|
||||
-71
@@ -1,71 +0,0 @@
|
||||
package com.jaquadro.minecraft.storagedrawers.packs.erebus.block;
|
||||
|
||||
import com.jaquadro.minecraft.storagedrawers.StorageDrawers;
|
||||
import com.jaquadro.minecraft.storagedrawers.block.BlockDrawers;
|
||||
import com.jaquadro.minecraft.storagedrawers.packs.erebus.StorageDrawersPack;
|
||||
import com.jaquadro.minecraft.storagedrawers.packs.erebus.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[] blockNames = new String[] { "Baobab", "Eucalyptus", "Mahogany", "Mossbark", "Asper", "Cypress", null, "White", "Bamboo", "Rotten", "Marshwood", null, null, null, "Scorched", "Varnished" };
|
||||
public static String[] textureNames = new String[] { "baobab", "eucalyptus", "mahogany", "mossbark", "asper", "cypress", null, "white", "bamboo", "rotten", "marshwood", null, null, null, "scorched", "varnished" };
|
||||
|
||||
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.erebus.block;
|
||||
|
||||
import com.jaquadro.minecraft.storagedrawers.StorageDrawers;
|
||||
import com.jaquadro.minecraft.storagedrawers.integration.refinedrelocation.BlockSortingDrawers;
|
||||
import com.jaquadro.minecraft.storagedrawers.packs.erebus.StorageDrawersPack;
|
||||
import com.jaquadro.minecraft.storagedrawers.packs.erebus.core.ModCreativeTabs;
|
||||
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.erebus.block;
|
||||
|
||||
import com.jaquadro.minecraft.storagedrawers.StorageDrawers;
|
||||
import com.jaquadro.minecraft.storagedrawers.block.BlockTrim;
|
||||
import com.jaquadro.minecraft.storagedrawers.packs.erebus.core.ModBlocks;
|
||||
import com.jaquadro.minecraft.storagedrawers.packs.erebus.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);
|
||||
}
|
||||
}
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
package com.jaquadro.minecraft.storagedrawers.packs.erebus.core;
|
||||
|
||||
import com.jaquadro.minecraft.storagedrawers.api.pack.StandardDataResolver;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
|
||||
public class DataResolver extends StandardDataResolver
|
||||
{
|
||||
public static String[] blockNames = new String[] { "Baobab", "Eucalyptus", "Mahogany", "Mossbark", "Asper", "Cypress", null, "White", "Bamboo", "Rotten", "Marshwood", null, null, null, "Scorched", "Varnished" };
|
||||
public static String[] textureNames = new String[] { "baobab", "eucalyptus", "mahogany", "mossbark", "asper", "cypress", null, "white", "bamboo", "rotten", "marshwood", null, null, null, "scorched", "varnished" };
|
||||
|
||||
public DataResolver (String modID, CreativeTabs creativeTab) {
|
||||
super(modID, blockNames, creativeTab);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedName (int meta) {
|
||||
if (!isValidMetaValue(meta))
|
||||
return null;
|
||||
|
||||
return textureNames[meta];
|
||||
}
|
||||
}
|
||||
+47
-41
@@ -1,57 +1,63 @@
|
||||
package com.jaquadro.minecraft.storagedrawers.packs.erebus.core;
|
||||
|
||||
import com.jaquadro.minecraft.storagedrawers.StorageDrawers;
|
||||
import com.jaquadro.minecraft.storagedrawers.block.*;
|
||||
import com.jaquadro.minecraft.storagedrawers.config.ConfigManager;
|
||||
import com.jaquadro.minecraft.storagedrawers.integration.notenoughitems.NEIStorageDrawersConfig;
|
||||
import com.jaquadro.minecraft.storagedrawers.api.IStorageDrawersApi;
|
||||
import com.jaquadro.minecraft.storagedrawers.api.StorageDrawersApi;
|
||||
import com.jaquadro.minecraft.storagedrawers.api.config.IBlockConfig;
|
||||
import com.jaquadro.minecraft.storagedrawers.api.config.IUserConfig;
|
||||
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.packs.erebus.StorageDrawersPack;
|
||||
import com.jaquadro.minecraft.storagedrawers.packs.erebus.block.BlockDrawersPack;
|
||||
import com.jaquadro.minecraft.storagedrawers.packs.erebus.block.BlockTrimPack;
|
||||
import com.jaquadro.minecraft.storagedrawers.packs.erebus.item.ItemDrawersPack;
|
||||
import com.jaquadro.minecraft.storagedrawers.packs.erebus.item.ItemTrimPack;
|
||||
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"));
|
||||
IStorageDrawersApi api = StorageDrawersApi.instance();
|
||||
if (api == null)
|
||||
return;
|
||||
|
||||
ConfigManager config = StorageDrawers.config;
|
||||
IPackBlockFactory factory = api.packFactory();
|
||||
IPackDataResolver resolver = StorageDrawersPack.instance.resolver;
|
||||
|
||||
if (config.isBlockEnabled("fulldrawers1"))
|
||||
GameRegistry.registerBlock(fullDrawers1, ItemDrawersPack.class, "fullDrawers1");
|
||||
if (config.isBlockEnabled("fulldrawers2"))
|
||||
GameRegistry.registerBlock(fullDrawers2, ItemDrawersPack.class, "fullDrawers2");
|
||||
if (config.isBlockEnabled("fulldrawers4"))
|
||||
GameRegistry.registerBlock(fullDrawers4, ItemDrawersPack.class, "fullDrawers4");
|
||||
if (config.isBlockEnabled("halfdrawers2"))
|
||||
GameRegistry.registerBlock(halfDrawers2, ItemDrawersPack.class, "halfDrawers2");
|
||||
if (config.isBlockEnabled("halfdrawers4"))
|
||||
GameRegistry.registerBlock(halfDrawers4, ItemDrawersPack.class, "halfDrawers4");
|
||||
if (config.isBlockEnabled("trim"))
|
||||
GameRegistry.registerBlock(trim, ItemTrimPack.class, "trim");
|
||||
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);
|
||||
|
||||
if (!config.cache.addonShowNEI) {
|
||||
NEIStorageDrawersConfig.hideBlock(getQualifiedName(fullDrawers1));
|
||||
NEIStorageDrawersConfig.hideBlock(getQualifiedName(fullDrawers2));
|
||||
NEIStorageDrawersConfig.hideBlock(getQualifiedName(fullDrawers4));
|
||||
NEIStorageDrawersConfig.hideBlock(getQualifiedName(halfDrawers2));
|
||||
NEIStorageDrawersConfig.hideBlock(getQualifiedName(halfDrawers4));
|
||||
NEIStorageDrawersConfig.hideBlock(getQualifiedName(trim));
|
||||
IUserConfig config = api.userConfig();
|
||||
IBlockConfig blockConfig = config.blockConfig();
|
||||
|
||||
if (blockConfig.isBlockEnabled(blockConfig.getBlockConfigName(BlockConfiguration.BasicFull1)))
|
||||
factory.registerBlock(fullDrawers1, "fullDrawers1");
|
||||
if (blockConfig.isBlockEnabled(blockConfig.getBlockConfigName(BlockConfiguration.BasicFull2)))
|
||||
factory.registerBlock(fullDrawers2, "fullDrawers2");
|
||||
if (blockConfig.isBlockEnabled(blockConfig.getBlockConfigName(BlockConfiguration.BasicFull4)))
|
||||
factory.registerBlock(fullDrawers4, "fullDrawers4");
|
||||
if (blockConfig.isBlockEnabled(blockConfig.getBlockConfigName(BlockConfiguration.BasicHalf2)))
|
||||
factory.registerBlock(halfDrawers2, "halfDrawers2");
|
||||
if (blockConfig.isBlockEnabled(blockConfig.getBlockConfigName(BlockConfiguration.BasicHalf4)))
|
||||
factory.registerBlock(halfDrawers4, "halfDrawers4");
|
||||
if (blockConfig.isBlockEnabled(blockConfig.getBlockConfigName(BlockConfiguration.Trim)))
|
||||
factory.registerBlock(trim, "trim");
|
||||
|
||||
if (!config.addonConfig().showAddonItemsNEI()) {
|
||||
factory.hideBlock(getQualifiedName(fullDrawers1));
|
||||
factory.hideBlock(getQualifiedName(fullDrawers2));
|
||||
factory.hideBlock(getQualifiedName(fullDrawers4));
|
||||
factory.hideBlock(getQualifiedName(halfDrawers2));
|
||||
factory.hideBlock(getQualifiedName(halfDrawers4));
|
||||
factory.hideBlock(getQualifiedName(trim));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+14
-8
@@ -1,7 +1,9 @@
|
||||
package com.jaquadro.minecraft.storagedrawers.packs.erebus.core;
|
||||
|
||||
import com.jaquadro.minecraft.storagedrawers.StorageDrawers;
|
||||
import com.jaquadro.minecraft.storagedrawers.config.ConfigManager;
|
||||
import com.jaquadro.minecraft.storagedrawers.api.IStorageDrawersApi;
|
||||
import com.jaquadro.minecraft.storagedrawers.api.StorageDrawersApi;
|
||||
import com.jaquadro.minecraft.storagedrawers.api.config.IBlockConfig;
|
||||
import com.jaquadro.minecraft.storagedrawers.api.pack.BlockConfiguration;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
@@ -21,17 +23,21 @@ public final class ModCreativeTabs
|
||||
};
|
||||
|
||||
private static Item getTabItem () {
|
||||
ConfigManager config = StorageDrawers.config;
|
||||
IStorageDrawersApi api = StorageDrawersApi.instance();
|
||||
if (api == null)
|
||||
return Item.getItemFromBlock(Blocks.chest);
|
||||
|
||||
if (config.isBlockEnabled("fulldrawers2"))
|
||||
IBlockConfig blockConfig = api.userConfig().blockConfig();
|
||||
|
||||
if (blockConfig.isBlockEnabled(blockConfig.getBlockConfigName(BlockConfiguration.BasicFull2)))
|
||||
return Item.getItemFromBlock(ModBlocks.fullDrawers2);
|
||||
if (config.isBlockEnabled("fulldrawers4"))
|
||||
if (blockConfig.isBlockEnabled(blockConfig.getBlockConfigName(BlockConfiguration.BasicFull4)))
|
||||
return Item.getItemFromBlock(ModBlocks.fullDrawers4);
|
||||
if (config.isBlockEnabled("fulldrawers1"))
|
||||
if (blockConfig.isBlockEnabled(blockConfig.getBlockConfigName(BlockConfiguration.BasicFull1)))
|
||||
return Item.getItemFromBlock(ModBlocks.fullDrawers1);
|
||||
if (config.isBlockEnabled("halfdrawers2"))
|
||||
if (blockConfig.isBlockEnabled(blockConfig.getBlockConfigName(BlockConfiguration.BasicHalf2)))
|
||||
return Item.getItemFromBlock(ModBlocks.halfDrawers2);
|
||||
if (config.isBlockEnabled("halfdrawers4"))
|
||||
if (blockConfig.isBlockEnabled(blockConfig.getBlockConfigName(BlockConfiguration.BasicHalf4)))
|
||||
return Item.getItemFromBlock(ModBlocks.halfDrawers4);
|
||||
|
||||
return Item.getItemFromBlock(Blocks.chest);
|
||||
|
||||
+44
-47
@@ -1,74 +1,71 @@
|
||||
package com.jaquadro.minecraft.storagedrawers.packs.erebus.core;
|
||||
|
||||
import com.jaquadro.minecraft.storagedrawers.StorageDrawers;
|
||||
import com.jaquadro.minecraft.storagedrawers.config.ConfigManager;
|
||||
import com.jaquadro.minecraft.storagedrawers.core.ModItems;
|
||||
import com.jaquadro.minecraft.storagedrawers.packs.erebus.block.BlockDrawersPack;
|
||||
import com.jaquadro.minecraft.storagedrawers.api.IStorageDrawersApi;
|
||||
import com.jaquadro.minecraft.storagedrawers.api.StorageDrawersApi;
|
||||
import com.jaquadro.minecraft.storagedrawers.api.config.IBlockConfig;
|
||||
import com.jaquadro.minecraft.storagedrawers.api.pack.BlockConfiguration;
|
||||
import com.jaquadro.minecraft.storagedrawers.api.pack.IPackDataResolver;
|
||||
import com.jaquadro.minecraft.storagedrawers.packs.erebus.StorageDrawersPack;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
import net.minecraftforge.oredict.ShapedOreRecipe;
|
||||
|
||||
public class ModRecipes
|
||||
{
|
||||
public void init () {
|
||||
ConfigManager config = StorageDrawers.config;
|
||||
IStorageDrawersApi api = StorageDrawersApi.instance();
|
||||
if (api == null)
|
||||
return;
|
||||
|
||||
IBlockConfig blockConfig = api.userConfig().blockConfig();
|
||||
|
||||
String nameFull1 = blockConfig.getBlockConfigName(BlockConfiguration.BasicFull1);
|
||||
String nameFull2 = blockConfig.getBlockConfigName(BlockConfiguration.BasicFull2);
|
||||
String nameFull4 = blockConfig.getBlockConfigName(BlockConfiguration.BasicFull4);
|
||||
String nameHalf2 = blockConfig.getBlockConfigName(BlockConfiguration.BasicHalf2);
|
||||
String nameHalf4 = blockConfig.getBlockConfigName(BlockConfiguration.BasicHalf4);
|
||||
String nameTrim = blockConfig.getBlockConfigName(BlockConfiguration.Trim);
|
||||
|
||||
Block planks = GameRegistry.findBlock("erebus", "planks");
|
||||
|
||||
for (int i = 0; i < BlockDrawersPack.blockNames.length; i++) {
|
||||
if (BlockDrawersPack.blockNames[i] == null)
|
||||
IPackDataResolver resolver = StorageDrawersPack.instance.resolver;
|
||||
|
||||
for (int i = 0; i < 16; i++) {
|
||||
if (!resolver.isValidMetaValue(i))
|
||||
continue;
|
||||
|
||||
if (BlockDrawersPack.blockNames[i].equals("Scorched"))
|
||||
if (resolver.getUnlocalizedName(i).equals("scorched"))
|
||||
planks = GameRegistry.findBlock("erebus", "planks_scorched");
|
||||
else if (BlockDrawersPack.blockNames[i].equals("Varnished"))
|
||||
else if (resolver.getUnlocalizedName(i).equals("varnished"))
|
||||
planks = GameRegistry.findBlock("erebus", "planks_varnished");
|
||||
|
||||
if (planks != null) {
|
||||
if (config.isBlockEnabled("fulldrawers1"))
|
||||
GameRegistry.addRecipe(new ItemStack(ModBlocks.fullDrawers1, config.getBlockRecipeOutput("fulldrawers1"), i), "xxx", " y ", "xxx",
|
||||
'x', new ItemStack(planks, 1, i), 'y', Blocks.chest);
|
||||
if (config.isBlockEnabled("fulldrawers2"))
|
||||
GameRegistry.addRecipe(new ItemStack(ModBlocks.fullDrawers2, config.getBlockRecipeOutput("fulldrawers2"), i), "xyx", "xxx", "xyx",
|
||||
'x', new ItemStack(planks, 1, i), 'y', Blocks.chest);
|
||||
if (config.isBlockEnabled("fulldrawers4"))
|
||||
GameRegistry.addRecipe(new ItemStack(ModBlocks.fullDrawers4, config.getBlockRecipeOutput("fulldrawers4"), i), "yxy", "xxx", "yxy",
|
||||
'x', new ItemStack(planks, 1, i), 'y', Blocks.chest);
|
||||
if (config.isBlockEnabled("trim")) {
|
||||
GameRegistry.addRecipe(new ItemStack(ModBlocks.trim, config.getBlockRecipeOutput("trim"), i), "xyx", "yyy", "xyx",
|
||||
'x', Items.stick, 'y', new ItemStack(planks, 1, i));
|
||||
if (blockConfig.isBlockEnabled(nameFull1))
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.fullDrawers1, blockConfig.getBlockRecipeOutput(nameFull1), i), "xxx", " y ", "xxx",
|
||||
'x', new ItemStack(planks, 1, i), 'y', "chestWood"));
|
||||
if (blockConfig.isBlockEnabled(nameFull2))
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.fullDrawers2, blockConfig.getBlockRecipeOutput(nameFull2), i), "xyx", "xxx", "xyx",
|
||||
'x', new ItemStack(planks, 1, i), 'y', "chestWood"));
|
||||
if (blockConfig.isBlockEnabled(nameFull4))
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.fullDrawers4, blockConfig.getBlockRecipeOutput(nameFull4), i), "yxy", "xxx", "yxy",
|
||||
'x', new ItemStack(planks, 1, i), 'y', "chestWood"));
|
||||
if (blockConfig.isBlockEnabled(nameTrim)) {
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.trim, blockConfig.getBlockRecipeOutput(nameTrim), i), "xyx", "yyy", "xyx",
|
||||
'x', "stickWood", 'y', new ItemStack(planks, 1, i)));
|
||||
}
|
||||
}
|
||||
|
||||
Block slab = GameRegistry.findBlock("erebus", "slabPlanks" + BlockDrawersPack.blockNames[i]);
|
||||
Block slab = GameRegistry.findBlock("erebus", "slabPlanks" + resolver.getUnlocalizedName(i));
|
||||
|
||||
if (slab != null) {
|
||||
if (config.isBlockEnabled("halfdrawers2"))
|
||||
GameRegistry.addRecipe(new ItemStack(ModBlocks.halfDrawers2, config.getBlockRecipeOutput("halfdrawers2"), i), "xyx", "xxx", "xyx",
|
||||
'x', new ItemStack(slab, 1, i), 'y', Blocks.chest);
|
||||
if (config.isBlockEnabled("halfdrawers4"))
|
||||
GameRegistry.addRecipe(new ItemStack(ModBlocks.halfDrawers4, config.getBlockRecipeOutput("halfdrawers4"), i), "yxy", "xxx", "yxy",
|
||||
'x', new ItemStack(slab, 1, i), 'y', Blocks.chest);
|
||||
if (blockConfig.isBlockEnabled(nameHalf2))
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.halfDrawers2, blockConfig.getBlockRecipeOutput(nameHalf2), i), "xyx", "xxx", "xyx",
|
||||
'x', new ItemStack(slab, 1, i), 'y', "chestWood"));
|
||||
if (blockConfig.isBlockEnabled(nameHalf4))
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.halfDrawers4, blockConfig.getBlockRecipeOutput(nameHalf4), i), "yxy", "xxx", "yxy",
|
||||
'x', new ItemStack(slab, 1, i), 'y', "chestWood"));
|
||||
}
|
||||
}
|
||||
|
||||
if (config.isBlockEnabled("fulldrawers1"))
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.upgradeTemplate, 2), "xxx", "xyx", "xxx",
|
||||
'x', Items.stick, 'y', new ItemStack(ModBlocks.fullDrawers1, 1, OreDictionary.WILDCARD_VALUE));
|
||||
if (config.isBlockEnabled("fulldrawers2"))
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.upgradeTemplate, 2), "xxx", "xyx", "xxx",
|
||||
'x', Items.stick, 'y', new ItemStack(ModBlocks.fullDrawers2, 1, OreDictionary.WILDCARD_VALUE));
|
||||
if (config.isBlockEnabled("halfdrawers2"))
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.upgradeTemplate, 2), "xxx", "xyx", "xxx",
|
||||
'x', Items.stick, 'y', new ItemStack(ModBlocks.halfDrawers2, 1, OreDictionary.WILDCARD_VALUE));
|
||||
if (config.isBlockEnabled("fulldrawers4"))
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.upgradeTemplate, 2), "xxx", "xyx", "xxx",
|
||||
'x', Items.stick, 'y', new ItemStack(ModBlocks.fullDrawers4, 1, OreDictionary.WILDCARD_VALUE));
|
||||
if (config.isBlockEnabled("halfdrawers4"))
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.upgradeTemplate, 2), "xxx", "xyx", "xxx",
|
||||
'x', Items.stick, 'y', new ItemStack(ModBlocks.halfDrawers4, 1, OreDictionary.WILDCARD_VALUE));
|
||||
}
|
||||
}
|
||||
+68
-48
@@ -1,81 +1,101 @@
|
||||
package com.jaquadro.minecraft.storagedrawers.packs.erebus.core;
|
||||
|
||||
import com.jaquadro.minecraft.storagedrawers.StorageDrawers;
|
||||
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.erebus.block.BlockDrawersPack;
|
||||
import com.jaquadro.minecraft.storagedrawers.packs.erebus.block.BlockSortingDrawersPack;
|
||||
import com.jaquadro.minecraft.storagedrawers.packs.erebus.item.ItemSortingDrawersPack;
|
||||
import com.jaquadro.minecraft.storagedrawers.api.IStorageDrawersApi;
|
||||
import com.jaquadro.minecraft.storagedrawers.api.StorageDrawersApi;
|
||||
import com.jaquadro.minecraft.storagedrawers.api.config.IBlockConfig;
|
||||
import com.jaquadro.minecraft.storagedrawers.api.config.IUserConfig;
|
||||
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.packs.erebus.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)
|
||||
IStorageDrawersApi api = StorageDrawersApi.instance();
|
||||
if (api == null)
|
||||
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);
|
||||
if (!Loader.isModLoaded("RefinedRelocation") || !api.userConfig().integrationConfig().isRefinedRelocationEnabled())
|
||||
return;
|
||||
|
||||
SortingBlockRegistry.register(ModBlocks.fullDrawers1, fullDrawers1);
|
||||
SortingBlockRegistry.register(ModBlocks.fullDrawers2, fullDrawers2);
|
||||
SortingBlockRegistry.register(ModBlocks.fullDrawers4, fullDrawers4);
|
||||
SortingBlockRegistry.register(ModBlocks.halfDrawers2, halfDrawers2);
|
||||
SortingBlockRegistry.register(ModBlocks.halfDrawers4, halfDrawers4);
|
||||
IPackBlockFactory factory = api.packFactory();
|
||||
IPackDataResolver resolver = StorageDrawersPack.instance.resolver;
|
||||
|
||||
if (config.isBlockEnabled("fulldrawers1"))
|
||||
GameRegistry.registerBlock(fullDrawers1, ItemSortingDrawersPack.class, "fullDrawersSort1");
|
||||
if (config.isBlockEnabled("fulldrawers2"))
|
||||
GameRegistry.registerBlock(fullDrawers2, ItemSortingDrawersPack.class, "fullDrawersSort2");
|
||||
if (config.isBlockEnabled("fulldrawers4"))
|
||||
GameRegistry.registerBlock(fullDrawers4, ItemSortingDrawersPack.class, "fullDrawersSort4");
|
||||
if (config.isBlockEnabled("halfdrawers2"))
|
||||
GameRegistry.registerBlock(halfDrawers2, ItemSortingDrawersPack.class, "halfDrawersSort2");
|
||||
if (config.isBlockEnabled("halfdrawers4"))
|
||||
GameRegistry.registerBlock(halfDrawers4, ItemSortingDrawersPack.class, "halfDrawersSort4");
|
||||
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);
|
||||
|
||||
if (!config.cache.addonShowNEI) {
|
||||
NEIStorageDrawersConfig.hideBlock(ModBlocks.getQualifiedName(fullDrawers1));
|
||||
NEIStorageDrawersConfig.hideBlock(ModBlocks.getQualifiedName(fullDrawers2));
|
||||
NEIStorageDrawersConfig.hideBlock(ModBlocks.getQualifiedName(fullDrawers4));
|
||||
NEIStorageDrawersConfig.hideBlock(ModBlocks.getQualifiedName(halfDrawers2));
|
||||
NEIStorageDrawersConfig.hideBlock(ModBlocks.getQualifiedName(halfDrawers4));
|
||||
factory.bindSortingBlock(ModBlocks.fullDrawers1, fullDrawers1);
|
||||
factory.bindSortingBlock(ModBlocks.fullDrawers2, fullDrawers2);
|
||||
factory.bindSortingBlock(ModBlocks.fullDrawers4, fullDrawers4);
|
||||
factory.bindSortingBlock(ModBlocks.halfDrawers2, halfDrawers2);
|
||||
factory.bindSortingBlock(ModBlocks.halfDrawers4, halfDrawers4);
|
||||
|
||||
IUserConfig config = api.userConfig();
|
||||
IBlockConfig blockConfig = config.blockConfig();
|
||||
|
||||
if (blockConfig.isBlockEnabled(blockConfig.getBlockConfigName(BlockConfiguration.SortingFull1)))
|
||||
factory.registerBlock(fullDrawers1, "fullDrawersSort1");
|
||||
if (blockConfig.isBlockEnabled(blockConfig.getBlockConfigName(BlockConfiguration.SortingFull2)))
|
||||
factory.registerBlock(fullDrawers2, "fullDrawersSort2");
|
||||
if (blockConfig.isBlockEnabled(blockConfig.getBlockConfigName(BlockConfiguration.SortingFull4)))
|
||||
factory.registerBlock(fullDrawers4, "fullDrawersSort4");
|
||||
if (blockConfig.isBlockEnabled(blockConfig.getBlockConfigName(BlockConfiguration.SortingHalf2)))
|
||||
factory.registerBlock(halfDrawers2, "halfDrawersSort2");
|
||||
if (blockConfig.isBlockEnabled(blockConfig.getBlockConfigName(BlockConfiguration.SortingHalf4)))
|
||||
factory.registerBlock(halfDrawers4, "halfDrawersSort4");
|
||||
|
||||
if (!config.addonConfig().showAddonItemsNEI()) {
|
||||
factory.hideBlock(ModBlocks.getQualifiedName(fullDrawers1));
|
||||
factory.hideBlock(ModBlocks.getQualifiedName(fullDrawers2));
|
||||
factory.hideBlock(ModBlocks.getQualifiedName(fullDrawers4));
|
||||
factory.hideBlock(ModBlocks.getQualifiedName(halfDrawers2));
|
||||
factory.hideBlock(ModBlocks.getQualifiedName(halfDrawers4));
|
||||
}
|
||||
}
|
||||
|
||||
public static void postInit () {
|
||||
ConfigManager config = StorageDrawers.config;
|
||||
if (!Loader.isModLoaded("RefinedRelocation") || !config.cache.enableRefinedRelocationIntegration)
|
||||
IStorageDrawersApi api = StorageDrawersApi.instance();
|
||||
if (api == null)
|
||||
return;
|
||||
|
||||
for (int i = 0; i < BlockDrawersPack.textureNames.length; i++) {
|
||||
if (config.isBlockEnabled("fulldrawers1"))
|
||||
if (!Loader.isModLoaded("RefinedRelocation") || !api.userConfig().integrationConfig().isRefinedRelocationEnabled())
|
||||
return;
|
||||
|
||||
IPackDataResolver resolver = StorageDrawersPack.instance.resolver;
|
||||
IBlockConfig blockConfig = api.userConfig().blockConfig();
|
||||
|
||||
for (int i = 0; i < 16; i++) {
|
||||
if (!resolver.isValidMetaValue(i))
|
||||
continue;
|
||||
|
||||
if (blockConfig.isBlockEnabled(blockConfig.getBlockConfigName(BlockConfiguration.SortingFull1)))
|
||||
GameRegistry.addRecipe(new ItemStack(fullDrawers1, 1, i), "x x", " y ", "x x",
|
||||
'x', Items.gold_nugget, 'y', new ItemStack(ModBlocks.fullDrawers1, 1, i));
|
||||
if (config.isBlockEnabled("fulldrawers2"))
|
||||
if (blockConfig.isBlockEnabled(blockConfig.getBlockConfigName(BlockConfiguration.SortingFull2)))
|
||||
GameRegistry.addRecipe(new ItemStack(fullDrawers2, 1, i), "x x", " y ", "x x",
|
||||
'x', Items.gold_nugget, 'y', new ItemStack(ModBlocks.fullDrawers2, 1, i));
|
||||
if (config.isBlockEnabled("halfdrawers2"))
|
||||
if (blockConfig.isBlockEnabled(blockConfig.getBlockConfigName(BlockConfiguration.SortingFull4)))
|
||||
GameRegistry.addRecipe(new ItemStack(halfDrawers2, 1, i), "x x", " y ", "x x",
|
||||
'x', Items.gold_nugget, 'y', new ItemStack(ModBlocks.halfDrawers2, 1, i));
|
||||
if (config.isBlockEnabled("fulldrawers4"))
|
||||
if (blockConfig.isBlockEnabled(blockConfig.getBlockConfigName(BlockConfiguration.SortingHalf2)))
|
||||
GameRegistry.addRecipe(new ItemStack(fullDrawers4, 1, i), "x x", " y ", "x x",
|
||||
'x', Items.gold_nugget, 'y', new ItemStack(ModBlocks.fullDrawers4, 1, i));
|
||||
if (config.isBlockEnabled("halfdrawers4"))
|
||||
if (blockConfig.isBlockEnabled(blockConfig.getBlockConfigName(BlockConfiguration.SortingHalf4)))
|
||||
GameRegistry.addRecipe(new ItemStack(halfDrawers4, 1, i), "x x", " y ", "x x",
|
||||
'x', Items.gold_nugget, 'y', new ItemStack(ModBlocks.halfDrawers4, 1, i));
|
||||
}
|
||||
|
||||
-33
@@ -1,33 +0,0 @@
|
||||
package com.jaquadro.minecraft.storagedrawers.packs.erebus.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.erebus.block.BlockDrawersPack;
|
||||
import com.jaquadro.minecraft.storagedrawers.packs.erebus.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.erebus.item;
|
||||
|
||||
import com.jaquadro.minecraft.storagedrawers.StorageDrawers;
|
||||
import com.jaquadro.minecraft.storagedrawers.config.ConfigManager;
|
||||
import com.jaquadro.minecraft.storagedrawers.packs.erebus.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.erebus.item;
|
||||
|
||||
import com.jaquadro.minecraft.storagedrawers.item.ItemTrim;
|
||||
import com.jaquadro.minecraft.storagedrawers.packs.erebus.block.BlockDrawersPack;
|
||||
import net.minecraft.block.Block;
|
||||
|
||||
public class ItemTrimPack extends ItemTrim
|
||||
{
|
||||
public ItemTrimPack (Block block) {
|
||||
super(block, BlockDrawersPack.textureNames);
|
||||
}
|
||||
}
|
||||
-4
@@ -70,10 +70,6 @@ public class ModBlocks
|
||||
getQualifiedName(halfDrawers2), getQualifiedName(halfDrawers4));
|
||||
}
|
||||
|
||||
public static String makeName (String name) {
|
||||
return StorageDrawersPack.MOD_ID.toLowerCase() + "." + name;
|
||||
}
|
||||
|
||||
public static String getQualifiedName (Block block) {
|
||||
return GameData.getBlockRegistry().getNameForObject(block);
|
||||
}
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ public class RefinedRelocation
|
||||
if (!Loader.isModLoaded("RefinedRelocation") || !api.userConfig().integrationConfig().isRefinedRelocationEnabled())
|
||||
return;
|
||||
|
||||
IPackBlockFactory factory = StorageDrawersApi.instance().packFactory();
|
||||
IPackBlockFactory factory = api.packFactory();
|
||||
IPackDataResolver resolver = StorageDrawersPack.instance.resolver;
|
||||
|
||||
fullDrawers1 = factory.createBlock(BlockConfiguration.SortingFull1, resolver);
|
||||
|
||||
Reference in new issue
Block a user