mirror of
https://github.com/GTNewHorizons/MagicBees.git
synced 2026-11-25 14:34:44 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
63bb014de8 |
No files matched your search
@@ -35,6 +35,11 @@ public class ItemCapsule extends Item
|
|||||||
this.setHasSubtypes(true);
|
this.setHasSubtypes(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public CapsuleType getType()
|
||||||
|
{
|
||||||
|
return this.capsuleType;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getItemDisplayName(ItemStack itemStack)
|
public String getItemDisplayName(ItemStack itemStack)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -36,7 +36,6 @@ public class ItemComb extends Item
|
|||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void getSubItems(int id, CreativeTabs tabs, List list)
|
public void getSubItems(int id, CreativeTabs tabs, List list)
|
||||||
{
|
{
|
||||||
super.getSubItems(id, tabs, list);
|
|
||||||
for (CombType type : CombType.values())
|
for (CombType type : CombType.values())
|
||||||
{
|
{
|
||||||
if (type.showInList)
|
if (type.showInList)
|
||||||
|
|||||||
@@ -36,7 +36,6 @@ public class ItemDrop extends Item
|
|||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void getSubItems(int id, CreativeTabs tabs, List list)
|
public void getSubItems(int id, CreativeTabs tabs, List list)
|
||||||
{
|
{
|
||||||
super.getSubItems(id, tabs, list);
|
|
||||||
for (DropType type : DropType.values())
|
for (DropType type : DropType.values())
|
||||||
{
|
{
|
||||||
list.add(this.getStackForType(type));
|
list.add(this.getStackForType(type));
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import thaumicbees.item.types.CapsuleType;
|
|||||||
import thaumicbees.item.types.CombType;
|
import thaumicbees.item.types.CombType;
|
||||||
import thaumicbees.item.types.DropType;
|
import thaumicbees.item.types.DropType;
|
||||||
import thaumicbees.item.types.HiveFrameType;
|
import thaumicbees.item.types.HiveFrameType;
|
||||||
|
import thaumicbees.item.types.LiquidType;
|
||||||
import thaumicbees.item.types.PropolisType;
|
import thaumicbees.item.types.PropolisType;
|
||||||
import thaumicbees.item.types.ResourceType;
|
import thaumicbees.item.types.ResourceType;
|
||||||
import thaumicbees.item.types.WaxType;
|
import thaumicbees.item.types.WaxType;
|
||||||
@@ -328,13 +329,18 @@ public class ItemManager
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void postInit()
|
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.
|
// 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;
|
ItemStack filled;
|
||||||
LiquidStack liquid = null;
|
LiquidStack liquid = null;
|
||||||
|
|
||||||
for (Liquid l : Liquid.values())
|
for (LiquidType l : LiquidType.values())
|
||||||
{
|
{
|
||||||
switch (l)
|
switch (l)
|
||||||
{
|
{
|
||||||
@@ -342,19 +348,19 @@ public class ItemManager
|
|||||||
liquid = null;
|
liquid = null;
|
||||||
break;
|
break;
|
||||||
case WATER:
|
case WATER:
|
||||||
liquid = new LiquidStack(Block.waterStill, this.capsuleType.capacity);
|
liquid = new LiquidStack(Block.waterStill, baseCapsule.getType().capacity);
|
||||||
break;
|
break;
|
||||||
case LAVA:
|
case LAVA:
|
||||||
liquid = new LiquidStack(Block.lavaStill, this.capsuleType.capacity);
|
liquid = new LiquidStack(Block.lavaStill, baseCapsule.getType().capacity);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
liquid = LiquidDictionary.getLiquid(l.liquidID, this.capsuleType.capacity);
|
liquid = LiquidDictionary.getLiquid(l.liquidID, baseCapsule.getType().capacity);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (liquid != null)
|
if (liquid != null)
|
||||||
{
|
{
|
||||||
filled = new ItemStack(this, 1, l.ordinal());
|
filled = new ItemStack(baseCapsule, 1, l.ordinal());
|
||||||
LiquidContainerRegistry.registerLiquid(new LiquidContainerData(liquid, filled, empty));
|
LiquidContainerRegistry.registerLiquid(new LiquidContainerData(liquid, filled, empty));
|
||||||
|
|
||||||
// Register with Squeezer/Bottler
|
// Register with Squeezer/Bottler
|
||||||
@@ -365,7 +371,7 @@ public class ItemManager
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Empty will be set to unavailable. Obviously, it always is.
|
// 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)
|
@SideOnly(Side.CLIENT)
|
||||||
public void getSubItems(int id, CreativeTabs tabs, List list)
|
public void getSubItems(int id, CreativeTabs tabs, List list)
|
||||||
{
|
{
|
||||||
super.getSubItems(id, tabs, list);
|
|
||||||
for (ResourceType type : ResourceType.values())
|
for (ResourceType type : ResourceType.values())
|
||||||
{
|
{
|
||||||
if (type.showInList)
|
if (type.showInList)
|
||||||
|
|||||||
@@ -35,7 +35,6 @@ public class ItemPollen extends Item
|
|||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void getSubItems(int id, CreativeTabs tabs, List list)
|
public void getSubItems(int id, CreativeTabs tabs, List list)
|
||||||
{
|
{
|
||||||
super.getSubItems(id, tabs, list);
|
|
||||||
for (PollenType type : PollenType.values())
|
for (PollenType type : PollenType.values())
|
||||||
{
|
{
|
||||||
list.add(this.getStackForType(type));
|
list.add(this.getStackForType(type));
|
||||||
|
|||||||
@@ -36,7 +36,6 @@ public class ItemPropolis extends Item
|
|||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void getSubItems(int id, CreativeTabs tabs, List list)
|
public void getSubItems(int id, CreativeTabs tabs, List list)
|
||||||
{
|
{
|
||||||
super.getSubItems(id, tabs, list);
|
|
||||||
for (PropolisType type : PropolisType.values())
|
for (PropolisType type : PropolisType.values())
|
||||||
{
|
{
|
||||||
list.add(this.getStackForType(type));
|
list.add(this.getStackForType(type));
|
||||||
|
|||||||
Reference in new issue
Block a user