Class BlockEntityPurifier

java.lang.Object
net.minecraftforge.common.capabilities.CapabilityProvider<net.minecraft.world.level.block.entity.BlockEntity>
net.minecraft.world.level.block.entity.BlockEntity
org.cyclops.cyclopscore.blockentity.CyclopsBlockEntity
org.cyclops.evilcraft.core.blockentity.BlockEntityTankInventory
org.cyclops.evilcraft.blockentity.BlockEntityPurifier
All Implemented Interfaces:
net.minecraftforge.common.capabilities.ICapabilityProvider, net.minecraftforge.common.capabilities.ICapabilityProviderImpl<net.minecraft.world.level.block.entity.BlockEntity>, net.minecraftforge.common.capabilities.ICapabilitySerializable<net.minecraft.nbt.CompoundTag>, net.minecraftforge.common.extensions.IForgeBlockEntity, net.minecraftforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>, org.cyclops.cyclopscore.blockentity.IBlockEntityDelayedTickable, org.cyclops.cyclopscore.persist.IDirtyMarkListener, org.cyclops.cyclopscore.persist.nbt.INBTProvider

public class BlockEntityPurifier extends BlockEntityTankInventory
Tile for the BlockPurifier..
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
     

    Nested classes/interfaces inherited from class net.minecraftforge.common.capabilities.CapabilityProvider

    net.minecraftforge.common.capabilities.CapabilityProvider.AsField<B extends net.minecraftforge.common.capabilities.ICapabilityProviderImpl<B>>
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    The additional item rotation.
    The next additional item rotation.
    The previous additional item rotation.
    float
     
    float
     
    float
     
    static final int
     
    float
     
    float
     
    float
     
    float
     
    float
     
    static final int
    The additional slot.
    static final int
    The purify item slot.
    static final int
    The amount of slots.
    Book bounce tick count.
    int
     
    float
     

    Fields inherited from class org.cyclops.evilcraft.core.blockentity.BlockEntityTankInventory

    tankSize

    Fields inherited from class net.minecraft.world.level.block.entity.BlockEntity

    level, remove, worldPosition

    Fields inherited from interface net.minecraftforge.common.extensions.IForgeBlockEntity

    INFINITE_EXTENT_AABB
  • Constructor Summary

    Constructors
    Constructor
    Description
    BlockEntityPurifier(net.minecraft.core.BlockPos blockPos, net.minecraft.world.level.block.state.BlockState blockState)
    Make a new instance.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected org.cyclops.cyclopscore.inventory.SimpleInventory
    createInventory(int inventorySize, int stackSize)
     
    protected org.cyclops.cyclopscore.fluid.SingleUseTank
    createTank(int tankSize)
     
     
    net.minecraft.world.item.ItemStack
    Get the book item.
    int
    Get the amount of contained buckets.
    int
    Get the rest of the fluid that can not fit in a bucket.
    int
    Set the maximum amount of contained buckets.
    net.minecraft.world.item.ItemStack
    Get the purify item.
    float
    Get the random rotation for displaying the item.
    void
     
    void
     
    void
    setAdditionalItem(net.minecraft.world.item.ItemStack itemStack)
    Set the book item.
    void
    setBuckets(int buckets, int rest)
    Set the amount of contained buckets.
    void
    setPurifyItem(net.minecraft.world.item.ItemStack itemStack)
    Set the purify item.
    void
     
    void
     

    Methods inherited from class org.cyclops.evilcraft.core.blockentity.BlockEntityTankInventory

    addFluidHandlerCapabilities, addItemHandlerCapabilities, getInventory, getTank, read, saveAdditional

    Methods inherited from class org.cyclops.cyclopscore.blockentity.CyclopsBlockEntity

    addCapabilityInternal, addCapabilitySided, canInteractWith, getCapability, getRotation, getStoredCapabilities, getUpdateBackoff, getUpdateBackoffTicks, getUpdatePacket, getUpdateTag, invalidateCaps, load, onDataPacket, onDirty, onLoad, onUpdateReceived, readGeneratedFieldsFromNBT, sendUpdate, setUpdateBackoff, shouldSendUpdate, transformFacingForRotation, unsetSendUpdate, writeGeneratedFieldsToNBT, writeToItemStack

    Methods inherited from class net.minecraft.world.level.block.entity.BlockEntity

    addEntityType, clearRemoved, fillCrashReportCategory, getBlockPos, getBlockState, getLevel, getPersistentData, getPosFromTag, getType, hasLevel, isRemoved, loadStatic, onChunkUnloaded, onlyOpCanSetNbt, saveToItem, saveWithFullMetadata, saveWithId, saveWithoutMetadata, setBlockState, setChanged, setChanged, setLevel, setRemoved, triggerEvent

    Methods inherited from class net.minecraftforge.common.capabilities.CapabilityProvider

    areCapsCompatible, areCapsCompatible, deserializeCaps, gatherCapabilities, gatherCapabilities, gatherCapabilities, getCapabilities, reviveCaps, serializeCaps

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.cyclops.cyclopscore.blockentity.IBlockEntityDelayedTickable

    reduceUpdateBackoff, sendImmediateUpdate

    Methods inherited from interface net.minecraftforge.common.capabilities.ICapabilityProvider

    getCapability

    Methods inherited from interface net.minecraftforge.common.extensions.IForgeBlockEntity

    deserializeNBT, getModelData, getRenderBoundingBox, handleUpdateTag, requestModelDataUpdate, serializeNBT
  • Field Details

    • SLOTS

      public static final int SLOTS
      The amount of slots.
      See Also:
    • SLOT_PURIFY

      public static final int SLOT_PURIFY
      The purify item slot.
      See Also:
    • SLOT_ADDITIONAL

      public static final int SLOT_ADDITIONAL
      The additional slot.
      See Also:
    • MAX_BUCKETS

      public static final int MAX_BUCKETS
      See Also:
    • tickCount

      public Integer tickCount
      Book bounce tick count.
    • additionalRotation2

      public Float additionalRotation2
      The next additional item rotation.
    • additionalRotationPrev

      public Float additionalRotationPrev
      The previous additional item rotation.
    • additionalRotation

      public Float additionalRotation
      The additional item rotation.
    • time

      public int time
    • flip

      public float flip
    • oFlip

      public float oFlip
    • flipT

      public float flipT
    • flipA

      public float flipA
    • open

      public float open
    • oOpen

      public float oOpen
    • rot

      public float rot
    • oRot

      public float oRot
    • tRot

      public float tRot
  • Constructor Details

    • BlockEntityPurifier

      public BlockEntityPurifier(net.minecraft.core.BlockPos blockPos, net.minecraft.world.level.block.state.BlockState blockState)
      Make a new instance.
  • Method Details

    • createInventory

      protected org.cyclops.cyclopscore.inventory.SimpleInventory createInventory(int inventorySize, int stackSize)
      Overrides:
      createInventory in class BlockEntityTankInventory
    • createTank

      protected org.cyclops.cyclopscore.fluid.SingleUseTank createTank(int tankSize)
      Overrides:
      createTank in class BlockEntityTankInventory
    • getActions

      public IPurifierActionRegistry getActions()
    • onActionFinished

      public void onActionFinished()
    • getBucketsFloored

      public int getBucketsFloored()
      Get the amount of contained buckets.
      Returns:
      The amount of buckets.
    • getBucketsRest

      public int getBucketsRest()
      Get the rest of the fluid that can not fit in a bucket. Use this in setBuckets(int, int) as rest.
      Returns:
      The rest of the fluid.
    • setBuckets

      public void setBuckets(int buckets, int rest)
      Set the amount of contained buckets. This will also change the inner tank.
      Parameters:
      buckets - The amount of buckets.
      rest - The rest of the fluid.
    • getMaxBuckets

      public int getMaxBuckets()
      Set the maximum amount of contained buckets.
      Returns:
      The maximum amount of buckets.
    • getPurifyItem

      public net.minecraft.world.item.ItemStack getPurifyItem()
      Get the purify item.
      Returns:
      The purify item.
    • setPurifyItem

      public void setPurifyItem(net.minecraft.world.item.ItemStack itemStack)
      Set the purify item.
      Parameters:
      itemStack - The purify item.
    • getAdditionalItem

      public net.minecraft.world.item.ItemStack getAdditionalItem()
      Get the book item.
      Returns:
      The book item.
    • setAdditionalItem

      public void setAdditionalItem(net.minecraft.world.item.ItemStack itemStack)
      Set the book item.
      Parameters:
      itemStack - The book item.
    • showEffect

      public void showEffect()
    • showEnchantingEffect

      public void showEnchantingEffect()
    • getRandomRotation

      public float getRandomRotation()
      Get the random rotation for displaying the item.
      Returns:
      The random rotation.
    • onTankChanged

      public void onTankChanged()
      Overrides:
      onTankChanged in class BlockEntityTankInventory