mirror of
https://github.com/GTNewHorizons/StorageDrawers.git
synced 2026-11-18 19:39:15 +00:00
Fix creative tab options in addon packs; Fix Erebus half-size recipes
This commit is contained in:
1 parent
91475c9e5a
commit
c4a3e46b67
21 files changed
+225
-82
No files matched your search
@@ -17,7 +17,7 @@ buildscript {
|
||||
|
||||
apply plugin: 'forge'
|
||||
|
||||
version = "1.7.10-1.0.2"
|
||||
version = "1.7.10-1.0.3"
|
||||
group= "com.jaquadro.minecraft.storagedrawers" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
|
||||
archivesBaseName = "StorageDrawers-BiomesOPlenty"
|
||||
|
||||
|
||||
+3
-7
@@ -1,11 +1,7 @@
|
||||
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 com.jaquadro.minecraft.storagedrawers.packs.bop.core.*;
|
||||
import cpw.mods.fml.common.Mod;
|
||||
import cpw.mods.fml.common.SidedProxy;
|
||||
import cpw.mods.fml.common.event.FMLInitializationEvent;
|
||||
@@ -20,9 +16,9 @@ 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[] {
|
||||
public IPackDataResolver resolver = new DataResolver(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();
|
||||
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
package com.jaquadro.minecraft.storagedrawers.packs.bop.core;
|
||||
|
||||
import com.jaquadro.minecraft.storagedrawers.api.pack.BlockType;
|
||||
import com.jaquadro.minecraft.storagedrawers.api.pack.StandardDataResolver;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
|
||||
public class DataResolver extends StandardDataResolver
|
||||
{
|
||||
public DataResolver (String modID, String[] unlocalizedNames) {
|
||||
super(modID, unlocalizedNames);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CreativeTabs getCreativeTabs (BlockType type) {
|
||||
return ModCreativeTabs.getTabStorageDrawers();
|
||||
}
|
||||
}
|
||||
+28
-10
@@ -3,6 +3,7 @@ package com.jaquadro.minecraft.storagedrawers.packs.bop.core;
|
||||
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 cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
@@ -14,18 +15,35 @@ public final class ModCreativeTabs
|
||||
{
|
||||
private ModCreativeTabs () { }
|
||||
|
||||
public static final CreativeTabs tabStorageDrawers = new CreativeTabs("storageDrawersBop") {
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public Item getTabIconItem () {
|
||||
return getTabItem();
|
||||
private static CreativeTabs tabStorageDrawers = null;
|
||||
|
||||
public static CreativeTabs getTabStorageDrawers () {
|
||||
if (tabStorageDrawers != null)
|
||||
return tabStorageDrawers;
|
||||
|
||||
IStorageDrawersApi api = StorageDrawersApi.instance();
|
||||
if (api == null)
|
||||
return null;
|
||||
|
||||
IUserConfig config = api.userConfig();
|
||||
if (config.addonConfig().addonItemsUseSeparateTab() && config.addonConfig().showAddonItemsVanilla()) {
|
||||
tabStorageDrawers = new CreativeTabs("storageDrawersBop")
|
||||
{
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public Item getTabIconItem () {
|
||||
return getTabItem();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int func_151243_f () {
|
||||
return 9;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public int func_151243_f () {
|
||||
return 9;
|
||||
}
|
||||
};
|
||||
return tabStorageDrawers;
|
||||
}
|
||||
|
||||
private static Item getTabItem () {
|
||||
IStorageDrawersApi api = StorageDrawersApi.instance();
|
||||
|
||||
@@ -17,7 +17,7 @@ buildscript {
|
||||
|
||||
apply plugin: 'forge'
|
||||
|
||||
version = "1.7.10-1.0.3"
|
||||
version = "1.7.10-1.0.4"
|
||||
group= "com.jaquadro.minecraft.storagedrawers" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
|
||||
archivesBaseName = "StorageDrawers-Erebus"
|
||||
|
||||
|
||||
+1
-1
@@ -16,7 +16,7 @@ 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 IPackDataResolver resolver = new DataResolver(MOD_ID);
|
||||
|
||||
public ModBlocks blocks = new ModBlocks();
|
||||
public ModRecipes recipes = new ModRecipes();
|
||||
|
||||
+8
-2
@@ -1,5 +1,6 @@
|
||||
package com.jaquadro.minecraft.storagedrawers.packs.erebus.core;
|
||||
|
||||
import com.jaquadro.minecraft.storagedrawers.api.pack.BlockType;
|
||||
import com.jaquadro.minecraft.storagedrawers.api.pack.StandardDataResolver;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
|
||||
@@ -8,8 +9,13 @@ 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);
|
||||
public DataResolver (String modID) {
|
||||
super(modID, blockNames);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CreativeTabs getCreativeTabs (BlockType type) {
|
||||
return ModCreativeTabs.getTabStorageDrawers();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+24
-6
@@ -3,6 +3,7 @@ package com.jaquadro.minecraft.storagedrawers.packs.erebus.core;
|
||||
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 cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
@@ -14,13 +15,30 @@ public final class ModCreativeTabs
|
||||
{
|
||||
private ModCreativeTabs () { }
|
||||
|
||||
public static final CreativeTabs tabStorageDrawers = new CreativeTabs("storageDrawersErebus") {
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public Item getTabIconItem () {
|
||||
return getTabItem();
|
||||
private static CreativeTabs tabStorageDrawers = null;
|
||||
|
||||
public static CreativeTabs getTabStorageDrawers () {
|
||||
if (tabStorageDrawers != null)
|
||||
return tabStorageDrawers;
|
||||
|
||||
IStorageDrawersApi api = StorageDrawersApi.instance();
|
||||
if (api == null)
|
||||
return null;
|
||||
|
||||
IUserConfig config = api.userConfig();
|
||||
if (config.addonConfig().addonItemsUseSeparateTab() && config.addonConfig().showAddonItemsVanilla()) {
|
||||
tabStorageDrawers = new CreativeTabs("storageDrawersErebus")
|
||||
{
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public Item getTabIconItem () {
|
||||
return getTabItem();
|
||||
}
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
return tabStorageDrawers;
|
||||
}
|
||||
|
||||
private static Item getTabItem () {
|
||||
IStorageDrawersApi api = StorageDrawersApi.instance();
|
||||
|
||||
+7
-3
@@ -61,16 +61,20 @@ public class ModRecipes
|
||||
}
|
||||
}
|
||||
|
||||
Block slab = GameRegistry.findBlock("erebus", "slabPlanks" + resolver.getUnlocalizedName(i));
|
||||
Block slab = GameRegistry.findBlock("erebus", getPlankName(resolver.getUnlocalizedName(i)));
|
||||
|
||||
if (slab != null) {
|
||||
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"));
|
||||
'x', new ItemStack(slab, 1), '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"));
|
||||
'x', new ItemStack(slab, 1), 'y', "chestWood"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private String getPlankName (String name) {
|
||||
return "slabPlanks" + Character.toUpperCase(name.charAt(0)) + name.substring(1);
|
||||
}
|
||||
}
|
||||
@@ -17,7 +17,7 @@ buildscript {
|
||||
|
||||
apply plugin: 'forge'
|
||||
|
||||
version = "1.7.10-1.0.4"
|
||||
version = "1.7.10-1.0.5"
|
||||
group= "com.jaquadro.minecraft.storagedrawers" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
|
||||
archivesBaseName = "StorageDrawers-Forestry"
|
||||
|
||||
|
||||
+5
-9
@@ -1,11 +1,7 @@
|
||||
package com.jaquadro.minecraft.storagedrawers.packs.forestry;
|
||||
|
||||
import com.jaquadro.minecraft.storagedrawers.api.pack.IPackDataResolver;
|
||||
import com.jaquadro.minecraft.storagedrawers.api.pack.StandardDataResolver;
|
||||
import com.jaquadro.minecraft.storagedrawers.packs.forestry.core.ModBlocks;
|
||||
import com.jaquadro.minecraft.storagedrawers.packs.forestry.core.ModCreativeTabs;
|
||||
import com.jaquadro.minecraft.storagedrawers.packs.forestry.core.ModRecipes;
|
||||
import com.jaquadro.minecraft.storagedrawers.packs.forestry.core.RefinedRelocation;
|
||||
import com.jaquadro.minecraft.storagedrawers.packs.forestry.core.*;
|
||||
import cpw.mods.fml.common.Mod;
|
||||
import cpw.mods.fml.common.SidedProxy;
|
||||
import cpw.mods.fml.common.event.FMLInitializationEvent;
|
||||
@@ -20,13 +16,13 @@ public class StorageDrawersPack
|
||||
public static final String MOD_VERSION = "@VERSION@";
|
||||
public static final String SOURCE_PATH = "com.jaquadro.minecraft.storagedrawers.packs.forestry.";
|
||||
|
||||
public IPackDataResolver resolver1 = new StandardDataResolver(MOD_ID, new String[] {
|
||||
public IPackDataResolver resolver1 = new DataResolver(MOD_ID, new String[] {
|
||||
"larch", "teak", "acacia", "lime", "chestnut", "wenge", "baobab", "sequoia", "kapok", "ebony", "mahogany", "balsa", "willow", "walnut", "greenheart", "cherry"
|
||||
}, ModCreativeTabs.tabStorageDrawers);
|
||||
});
|
||||
|
||||
public IPackDataResolver resolver2 = new StandardDataResolver(MOD_ID, new String[] {
|
||||
public IPackDataResolver resolver2 = new DataResolver(MOD_ID, new String[] {
|
||||
"mahoe", "poplar", "palm", "papaya", "pine", "plum", "maple", "citrus", "giganteum", "ipe", "padauk", "cocobolo", "zebrawood"
|
||||
}, ModCreativeTabs.tabStorageDrawers);
|
||||
});
|
||||
|
||||
public ModBlocks blocks = new ModBlocks();
|
||||
public ModRecipes recipes = new ModRecipes();
|
||||
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
package com.jaquadro.minecraft.storagedrawers.packs.forestry.core;
|
||||
|
||||
import com.jaquadro.minecraft.storagedrawers.api.pack.BlockType;
|
||||
import com.jaquadro.minecraft.storagedrawers.api.pack.StandardDataResolver;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
|
||||
public class DataResolver extends StandardDataResolver
|
||||
{
|
||||
public DataResolver (String modID, String[] unlocalizedNames) {
|
||||
super(modID, unlocalizedNames);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CreativeTabs getCreativeTabs (BlockType type) {
|
||||
return ModCreativeTabs.getTabStorageDrawers();
|
||||
}
|
||||
}
|
||||
+28
-12
@@ -1,11 +1,10 @@
|
||||
package com.jaquadro.minecraft.storagedrawers.packs.forestry.core;
|
||||
|
||||
import com.jaquadro.minecraft.storagedrawers.StorageDrawers;
|
||||
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.config.ConfigManager;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
@@ -16,18 +15,35 @@ public final class ModCreativeTabs
|
||||
{
|
||||
private ModCreativeTabs () { }
|
||||
|
||||
public static final CreativeTabs tabStorageDrawers = new CreativeTabs("storageDrawersForestry") {
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public Item getTabIconItem () {
|
||||
return getTabItem();
|
||||
private static CreativeTabs tabStorageDrawers = null;
|
||||
|
||||
public static CreativeTabs getTabStorageDrawers () {
|
||||
if (tabStorageDrawers != null)
|
||||
return tabStorageDrawers;
|
||||
|
||||
IStorageDrawersApi api = StorageDrawersApi.instance();
|
||||
if (api == null)
|
||||
return null;
|
||||
|
||||
IUserConfig config = api.userConfig();
|
||||
if (config.addonConfig().addonItemsUseSeparateTab() && config.addonConfig().showAddonItemsVanilla()) {
|
||||
tabStorageDrawers = new CreativeTabs("storageDrawersForestry")
|
||||
{
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public Item getTabIconItem () {
|
||||
return getTabItem();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int func_151243_f () {
|
||||
return 1;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public int func_151243_f () {
|
||||
return 1;
|
||||
}
|
||||
};
|
||||
return tabStorageDrawers;
|
||||
}
|
||||
|
||||
private static Item getTabItem () {
|
||||
IStorageDrawersApi api = StorageDrawersApi.instance();
|
||||
|
||||
@@ -17,7 +17,7 @@ buildscript {
|
||||
|
||||
apply plugin: 'forge'
|
||||
|
||||
version = "1.7.10-1.0.0"
|
||||
version = "1.7.10-1.0.1"
|
||||
group= "com.jaquadro.minecraft.storagedrawers" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
|
||||
archivesBaseName = "StorageDrawers-Misc"
|
||||
|
||||
|
||||
+2
-2
@@ -17,8 +17,8 @@ public class StorageDrawersPack
|
||||
public static final String SOURCE_PATH = "com.jaquadro.minecraft.storagedrawers.packs.misc.";
|
||||
|
||||
public IPackDataResolver[] resolvers = new IPackDataResolver[] {
|
||||
new DataResolver(MOD_ID, ModCreativeTabs.tabStorageDrawers, 0),
|
||||
new DataResolver(MOD_ID, ModCreativeTabs.tabStorageDrawers, 1)
|
||||
new DataResolver(MOD_ID, 0),
|
||||
new DataResolver(MOD_ID, 1)
|
||||
};
|
||||
|
||||
public ModBlocks blocks = new ModBlocks();
|
||||
|
||||
+8
-2
@@ -1,5 +1,6 @@
|
||||
package com.jaquadro.minecraft.storagedrawers.packs.misc.core;
|
||||
|
||||
import com.jaquadro.minecraft.storagedrawers.api.pack.BlockType;
|
||||
import com.jaquadro.minecraft.storagedrawers.api.pack.StandardDataResolver;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
|
||||
@@ -25,7 +26,12 @@ public class DataResolver extends StandardDataResolver
|
||||
new int[] { 0, 1, 2, 3, 0, 1, 0, 1, 2 }
|
||||
};
|
||||
|
||||
public DataResolver (String modID, CreativeTabs creativeTab, int bankNumber) {
|
||||
super(modID, textureBank[bankNumber], creativeTab);
|
||||
public DataResolver (String modID, int bankNumber) {
|
||||
super(modID, textureBank[bankNumber]);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CreativeTabs getCreativeTabs (BlockType type) {
|
||||
return ModCreativeTabs.getTabStorageDrawers();
|
||||
}
|
||||
}
|
||||
+28
-10
@@ -3,6 +3,7 @@ package com.jaquadro.minecraft.storagedrawers.packs.misc.core;
|
||||
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 cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
@@ -14,18 +15,35 @@ public final class ModCreativeTabs
|
||||
{
|
||||
private ModCreativeTabs () { }
|
||||
|
||||
public static final CreativeTabs tabStorageDrawers = new CreativeTabs("storageDrawersMisc") {
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public Item getTabIconItem () {
|
||||
return getTabItem();
|
||||
private static CreativeTabs tabStorageDrawers = null;
|
||||
|
||||
public static CreativeTabs getTabStorageDrawers () {
|
||||
if (tabStorageDrawers != null)
|
||||
return tabStorageDrawers;
|
||||
|
||||
IStorageDrawersApi api = StorageDrawersApi.instance();
|
||||
if (api == null)
|
||||
return null;
|
||||
|
||||
IUserConfig config = api.userConfig();
|
||||
if (config.addonConfig().addonItemsUseSeparateTab() && config.addonConfig().showAddonItemsVanilla()) {
|
||||
tabStorageDrawers = new CreativeTabs("storageDrawersMisc")
|
||||
{
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public Item getTabIconItem () {
|
||||
return getTabItem();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int func_151243_f () {
|
||||
return 5;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public int func_151243_f () {
|
||||
return 5;
|
||||
}
|
||||
};
|
||||
return tabStorageDrawers;
|
||||
}
|
||||
|
||||
private static Item getTabItem () {
|
||||
IStorageDrawersApi api = StorageDrawersApi.instance();
|
||||
|
||||
@@ -17,7 +17,7 @@ buildscript {
|
||||
|
||||
apply plugin: 'forge'
|
||||
|
||||
version = "1.7.10-1.0.3"
|
||||
version = "1.7.10-1.0.4"
|
||||
group= "com.jaquadro.minecraft.storagedrawers" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
|
||||
archivesBaseName = "StorageDrawers-Natura"
|
||||
|
||||
|
||||
+3
-7
@@ -1,11 +1,7 @@
|
||||
package com.jaquadro.minecraft.storagedrawers.packs.natura;
|
||||
|
||||
import com.jaquadro.minecraft.storagedrawers.api.pack.IPackDataResolver;
|
||||
import com.jaquadro.minecraft.storagedrawers.api.pack.StandardDataResolver;
|
||||
import com.jaquadro.minecraft.storagedrawers.packs.natura.core.ModBlocks;
|
||||
import com.jaquadro.minecraft.storagedrawers.packs.natura.core.ModCreativeTabs;
|
||||
import com.jaquadro.minecraft.storagedrawers.packs.natura.core.ModRecipes;
|
||||
import com.jaquadro.minecraft.storagedrawers.packs.natura.core.RefinedRelocation;
|
||||
import com.jaquadro.minecraft.storagedrawers.packs.natura.core.*;
|
||||
import cpw.mods.fml.common.Mod;
|
||||
import cpw.mods.fml.common.SidedProxy;
|
||||
import cpw.mods.fml.common.event.FMLInitializationEvent;
|
||||
@@ -20,9 +16,9 @@ public class StorageDrawersPack
|
||||
public static final String MOD_VERSION = "@VERSION@";
|
||||
public static final String SOURCE_PATH = "com.jaquadro.minecraft.storagedrawers.packs.natura.";
|
||||
|
||||
public IPackDataResolver resolver = new StandardDataResolver(MOD_ID, new String[] {
|
||||
public IPackDataResolver resolver = new DataResolver(MOD_ID, new String[] {
|
||||
"eucalyptus", "sakura", "ghostwood", "redwood", "bloodwood", "hopseed", "maple", "silverbell", "purpleheart", "tigerwood", "willow", "darkwood", "fusewood"
|
||||
}, ModCreativeTabs.tabStorageDrawers);
|
||||
});
|
||||
|
||||
public ModBlocks blocks = new ModBlocks();
|
||||
public ModRecipes recipes = new ModRecipes();
|
||||
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
package com.jaquadro.minecraft.storagedrawers.packs.natura.core;
|
||||
|
||||
import com.jaquadro.minecraft.storagedrawers.api.pack.BlockType;
|
||||
import com.jaquadro.minecraft.storagedrawers.api.pack.StandardDataResolver;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
|
||||
public class DataResolver extends StandardDataResolver
|
||||
{
|
||||
public DataResolver (String modID, String[] unlocalizedNames) {
|
||||
super(modID, unlocalizedNames);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CreativeTabs getCreativeTabs (BlockType type) {
|
||||
return ModCreativeTabs.getTabStorageDrawers();
|
||||
}
|
||||
}
|
||||
+24
-6
@@ -3,6 +3,7 @@ package com.jaquadro.minecraft.storagedrawers.packs.natura.core;
|
||||
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 cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
@@ -14,13 +15,30 @@ public final class ModCreativeTabs
|
||||
{
|
||||
private ModCreativeTabs () { }
|
||||
|
||||
public static final CreativeTabs tabStorageDrawers = new CreativeTabs("storageDrawersNatura") {
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public Item getTabIconItem () {
|
||||
return getTabItem();
|
||||
private static CreativeTabs tabStorageDrawers = null;
|
||||
|
||||
public static CreativeTabs getTabStorageDrawers () {
|
||||
if (tabStorageDrawers != null)
|
||||
return tabStorageDrawers;
|
||||
|
||||
IStorageDrawersApi api = StorageDrawersApi.instance();
|
||||
if (api == null)
|
||||
return null;
|
||||
|
||||
IUserConfig config = api.userConfig();
|
||||
if (config.addonConfig().addonItemsUseSeparateTab() && config.addonConfig().showAddonItemsVanilla()) {
|
||||
tabStorageDrawers = new CreativeTabs("storageDrawersNatura")
|
||||
{
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public Item getTabIconItem () {
|
||||
return getTabItem();
|
||||
}
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
return tabStorageDrawers;
|
||||
}
|
||||
|
||||
private static Item getTabItem () {
|
||||
IStorageDrawersApi api = StorageDrawersApi.instance();
|
||||
|
||||
Reference in new issue
Block a user