Bugfixes:

* Re-enabled capsules being added to the liquid dictionary.
* Discovered cause of items being added to creative tabs twice, and killed it.
This commit is contained in:
MysteriousAges committed 2013-01-28 14:22:40 -08:00
1 parent dc40994271
commit 63bb014de8
7 files changed
+18 -12

No files matched your search

@@ -34,6 +34,11 @@ public class ItemCapsule extends Item
this.setCreativeTab(Tabs.tabApiculture);
this.setHasSubtypes(true);
}
public CapsuleType getType()
{
return this.capsuleType;
}
@Override
public String getItemDisplayName(ItemStack itemStack)
@@ -36,7 +36,6 @@ public class ItemComb extends Item
@SideOnly(Side.CLIENT)
public void getSubItems(int id, CreativeTabs tabs, List list)
{
super.getSubItems(id, tabs, list);
for (CombType type : CombType.values())
{
if (type.showInList)
@@ -36,7 +36,6 @@ public class ItemDrop extends Item
@SideOnly(Side.CLIENT)
public void getSubItems(int id, CreativeTabs tabs, List list)
{
super.getSubItems(id, tabs, list);
for (DropType type : DropType.values())
{
list.add(this.getStackForType(type));
@@ -9,6 +9,7 @@ import thaumicbees.item.types.CapsuleType;
import thaumicbees.item.types.CombType;
import thaumicbees.item.types.DropType;
import thaumicbees.item.types.HiveFrameType;
import thaumicbees.item.types.LiquidType;
import thaumicbees.item.types.PropolisType;
import thaumicbees.item.types.ResourceType;
import thaumicbees.item.types.WaxType;
@@ -328,13 +329,18 @@ public class ItemManager
}
public static void postInit()
{
registerLiquidContainer(ItemManager.magicCapsule);
}
private static void registerLiquidContainer(ItemCapsule baseCapsule)
{
// Forestry liquids aren't registered until PostInit, that's why we wait until now to register them.
/*ItemStack empty = new ItemStack(this, 1, 0);
ItemStack empty = new ItemStack(baseCapsule, 1, 0);
ItemStack filled;
LiquidStack liquid = null;
for (Liquid l : Liquid.values())
for (LiquidType l : LiquidType.values())
{
switch (l)
{
@@ -342,19 +348,19 @@ public class ItemManager
liquid = null;
break;
case WATER:
liquid = new LiquidStack(Block.waterStill, this.capsuleType.capacity);
liquid = new LiquidStack(Block.waterStill, baseCapsule.getType().capacity);
break;
case LAVA:
liquid = new LiquidStack(Block.lavaStill, this.capsuleType.capacity);
liquid = new LiquidStack(Block.lavaStill, baseCapsule.getType().capacity);
break;
default:
liquid = LiquidDictionary.getLiquid(l.liquidID, this.capsuleType.capacity);
liquid = LiquidDictionary.getLiquid(l.liquidID, baseCapsule.getType().capacity);
break;
}
if (liquid != null)
{
filled = new ItemStack(this, 1, l.ordinal());
filled = new ItemStack(baseCapsule, 1, l.ordinal());
LiquidContainerRegistry.registerLiquid(new LiquidContainerData(liquid, filled, empty));
// Register with Squeezer/Bottler
@@ -365,7 +371,7 @@ public class ItemManager
}
}
// Empty will be set to unavailable. Obviously, it always is.
Liquid.EMPTY.available = true;*/
LiquidType.EMPTY.available = true;
}
}
@@ -35,7 +35,6 @@ public class ItemMiscResources extends Item
@SideOnly(Side.CLIENT)
public void getSubItems(int id, CreativeTabs tabs, List list)
{
super.getSubItems(id, tabs, list);
for (ResourceType type : ResourceType.values())
{
if (type.showInList)
@@ -35,7 +35,6 @@ public class ItemPollen extends Item
@SideOnly(Side.CLIENT)
public void getSubItems(int id, CreativeTabs tabs, List list)
{
super.getSubItems(id, tabs, list);
for (PollenType type : PollenType.values())
{
list.add(this.getStackForType(type));
@@ -36,7 +36,6 @@ public class ItemPropolis extends Item
@SideOnly(Side.CLIENT)
public void getSubItems(int id, CreativeTabs tabs, List list)
{
super.getSubItems(id, tabs, list);
for (PropolisType type : PropolisType.values())
{
list.add(this.getStackForType(type));