public class ItemBlockFluidContainer
extends org.cyclops.cyclopscore.item.ItemBlockNBT
implements net.minecraftforge.fluids.IFluidContainerItem
ItemBlock that can be used for blocks that have a tile entity with a fluid container.
The blockState must implement IBlockTank.
Instances of this will also keep it's tank capacity next to the contents.informationProvider, rarityProvider| Constructor and Description |
|---|
ItemBlockFluidContainer(net.minecraft.block.Block block)
Make a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addInformation(net.minecraft.item.ItemStack itemStack,
net.minecraft.entity.player.EntityPlayer entityPlayer,
java.util.List list,
boolean par4) |
protected void |
autofill(net.minecraftforge.fluids.capability.IFluidHandler source,
net.minecraft.item.ItemStack itemStack,
net.minecraft.world.World world,
net.minecraft.entity.Entity entity) |
net.minecraftforge.fluids.FluidStack |
drain(net.minecraft.item.ItemStack container,
int maxDrain,
boolean doDrain) |
int |
fill(net.minecraft.item.ItemStack container,
net.minecraftforge.fluids.FluidStack resource,
boolean doFill) |
IBlockTank |
getBlockTank() |
int |
getCapacity(net.minecraft.item.ItemStack container) |
net.minecraftforge.fluids.FluidStack |
getFluid(net.minecraft.item.ItemStack container) |
net.minecraftforge.common.capabilities.ICapabilityProvider |
initCapabilities(net.minecraft.item.ItemStack stack,
net.minecraft.nbt.NBTTagCompound nbt) |
net.minecraft.util.ActionResult<net.minecraft.item.ItemStack> |
onItemRightClick(net.minecraft.item.ItemStack itemStack,
net.minecraft.world.World world,
net.minecraft.entity.player.EntityPlayer player,
net.minecraft.util.EnumHand hand) |
void |
onUpdate(net.minecraft.item.ItemStack itemStack,
net.minecraft.world.World world,
net.minecraft.entity.Entity entity,
int par4,
boolean par5) |
protected void |
readAdditionalInfo(net.minecraft.tileentity.TileEntity tile,
net.minecraft.item.ItemStack itemStack) |
void |
setCapacity(net.minecraft.item.ItemStack container,
int capacity)
Set the maximal tank capacity.
|
protected void |
setFluid(net.minecraft.item.ItemStack container,
net.minecraftforge.fluids.FluidStack fluidStack) |
boolean |
shouldCauseReequipAnimation(net.minecraft.item.ItemStack oldStack,
net.minecraft.item.ItemStack newStack,
boolean slotChanged) |
canPlaceBlockOnSide, getBlock, getCreativeTab, getSubItems, getUnlocalizedName, getUnlocalizedName, onItemUse, setTileEntityNBT, setUnlocalizedNameaddPropertyOverride, canHarvestBlock, canHarvestBlock, canItemEditBlocks, createEntity, doesSneakBypassUse, getAnimationParameters, getArmorModel, getArmorTexture, getAttributeModifiers, getByNameOrId, getContainerItem, getContainerItem, getCreativeTabs, getDamage, getDurabilityForDisplay, getEntityLifespan, getFontRenderer, getHarvestLevel, getHasSubtypes, getHighlightTip, getIdFromItem, getIsRepairable, getItemAttributeModifiers, getItemById, getItemEnchantability, getItemEnchantability, getItemFromBlock, getItemStackDisplayName, getItemStackLimit, getItemStackLimit, getItemUseAction, getMaxDamage, getMaxDamage, getMaxItemUseDuration, getMetadata, getPropertyGetter, getShareTag, getSmeltingExperience, getStrVsBlock, getToolClasses, getUnlocalizedNameInefficiently, hasContainerItem, hasContainerItem, hasCustomEntity, hasCustomProperties, hasEffect, hitEntity, isBeaconPayment, isBookEnchantable, isDamageable, isDamaged, isFull3D, isItemTool, isMap, isRepairable, isValidArmor, itemInteractionForEntity, onArmorTick, onBlockDestroyed, onBlockStartBreak, onCreated, onDroppedByPlayer, onEntityItemUpdate, onEntitySwing, onItemUseFinish, onItemUseFirst, onLeftClickEntity, onPlayerStoppedUsing, onUsingTick, rayTrace, registerItemBlock, registerItems, renderHelmetOverlay, setContainerItem, setCreativeTab, setDamage, setFull3D, setHarvestLevel, setHasSubtypes, setMaxDamage, setMaxStackSize, setNoRepair, shouldCauseBlockBreakReset, shouldRotateAroundWhenRendering, showDurabilityBar, updateItemStackNBTpublic ItemBlockFluidContainer(net.minecraft.block.Block block)
block - The blockState instance.public IBlockTank getBlockTank()
public net.minecraftforge.fluids.FluidStack getFluid(net.minecraft.item.ItemStack container)
getFluid in interface net.minecraftforge.fluids.IFluidContainerItemprotected void setFluid(net.minecraft.item.ItemStack container,
net.minecraftforge.fluids.FluidStack fluidStack)
public int getCapacity(net.minecraft.item.ItemStack container)
getCapacity in interface net.minecraftforge.fluids.IFluidContainerItempublic void setCapacity(net.minecraft.item.ItemStack container,
int capacity)
container - The item stack.capacity - The maximal tank capacity in mB.protected void readAdditionalInfo(net.minecraft.tileentity.TileEntity tile,
net.minecraft.item.ItemStack itemStack)
readAdditionalInfo in class org.cyclops.cyclopscore.item.ItemBlockNBTpublic int fill(net.minecraft.item.ItemStack container,
net.minecraftforge.fluids.FluidStack resource,
boolean doFill)
fill in interface net.minecraftforge.fluids.IFluidContainerItempublic net.minecraftforge.fluids.FluidStack drain(net.minecraft.item.ItemStack container,
int maxDrain,
boolean doDrain)
drain in interface net.minecraftforge.fluids.IFluidContainerItempublic net.minecraft.util.ActionResult<net.minecraft.item.ItemStack> onItemRightClick(net.minecraft.item.ItemStack itemStack,
net.minecraft.world.World world,
net.minecraft.entity.player.EntityPlayer player,
net.minecraft.util.EnumHand hand)
onItemRightClick in class net.minecraft.item.Itemprotected void autofill(net.minecraftforge.fluids.capability.IFluidHandler source,
net.minecraft.item.ItemStack itemStack,
net.minecraft.world.World world,
net.minecraft.entity.Entity entity)
public void onUpdate(net.minecraft.item.ItemStack itemStack,
net.minecraft.world.World world,
net.minecraft.entity.Entity entity,
int par4,
boolean par5)
onUpdate in class net.minecraft.item.Itempublic void addInformation(net.minecraft.item.ItemStack itemStack,
net.minecraft.entity.player.EntityPlayer entityPlayer,
java.util.List list,
boolean par4)
addInformation in class org.cyclops.cyclopscore.item.ItemBlockMetadatapublic boolean shouldCauseReequipAnimation(net.minecraft.item.ItemStack oldStack,
net.minecraft.item.ItemStack newStack,
boolean slotChanged)
shouldCauseReequipAnimation in class net.minecraft.item.Itempublic net.minecraftforge.common.capabilities.ICapabilityProvider initCapabilities(net.minecraft.item.ItemStack stack,
net.minecraft.nbt.NBTTagCompound nbt)
initCapabilities in class net.minecraft.item.Item