use of forestry.core.items.ItemLiquidContainer.EnumContainerType in project ForestryMC by ForestryMC.
the class PluginFluids method doInit.
@Override
public void doInit() {
for (Fluids fluidType : Fluids.values()) {
if (fluidType.getFluid() == null) {
continue;
}
for (EnumContainerType type : EnumContainerType.values()) {
ForestryItem container = fluidType.getContainerForType(type);
if (container == null) {
continue;
}
LiquidHelper.injectLiquidContainer(fluidType, container.getItemStack());
}
for (ItemStack filledContainer : fluidType.getOtherContainers()) {
LiquidHelper.injectLiquidContainer(fluidType, filledContainer);
}
}
}
use of forestry.core.items.ItemLiquidContainer.EnumContainerType in project ForestryMC by ForestryMC.
the class PluginFluids method registerItems.
@Override
public void registerItems() {
for (EnumContainerType type : EnumContainerType.values()) {
Item emptyContainer = new ItemLiquidContainer(type, Blocks.air, null);
switch(type) {
case CAN:
ForestryItem.canEmpty.registerItem(emptyContainer, "canEmpty");
break;
case CAPSULE:
ForestryItem.waxCapsule.registerItem(emptyContainer, "waxCapsule");
break;
case REFRACTORY:
ForestryItem.refractoryEmpty.registerItem(emptyContainer, "refractoryEmpty");
break;
}
for (Fluids fluidType : Fluids.values()) {
ForestryItem container = fluidType.getContainerForType(type);
if (container == null) {
continue;
}
ItemLiquidContainer liquidContainer = new ItemLiquidContainer(type, fluidType.getBlock(), fluidType.getColor());
fluidType.setProperties(liquidContainer);
container.registerItem(liquidContainer, container.toString());
}
}
}
Aggregations