Class BlockEntityBloodChest

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
All Implemented Interfaces:
net.minecraft.world.inventory.MenuConstructor, net.minecraft.world.level.block.entity.LidBlockEntity, net.minecraft.world.MenuProvider, 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 BlockEntityBloodChest extends BlockEntityTickingTankInventory<BlockEntityBloodChest> implements net.minecraft.world.MenuProvider, net.minecraft.world.level.block.entity.LidBlockEntity
A chest that is able to repair tools with the use of blood. Partially based on cpw's IronChests.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
     

    Nested classes/interfaces inherited from class org.cyclops.evilcraft.core.blockentity.BlockEntityTickingTankInventory

    BlockEntityTickingTankInventory.TickerServer<T extends BlockEntityTickingTankInventory<T>>

    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
    static final int
    The capacity of the tank.
    static final int
    The id of the fluid container slot.
    static final int
    The total amount of slots.
    static final int
    The amount of slots in the chest.

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

    currentState, previousState

    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
    BlockEntityBloodChest(net.minecraft.core.BlockPos blockPos, net.minecraft.world.level.block.state.BlockState blockState)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
     
    protected org.cyclops.cyclopscore.inventory.SimpleInventory
    createInventory(int inventorySize, int stackSize)
     
    net.minecraft.world.inventory.AbstractContainerMenu
    createMenu(int id, net.minecraft.world.entity.player.Inventory playerInventory, net.minecraft.world.entity.player.Player playerEntity)
     
    protected org.cyclops.cyclopscore.fluid.SingleUseTank
    createTank(int tankSize)
     
    net.minecraft.network.chat.Component
     
    int
    Get the new (numerical) state for this tile entity.
    float
    getOpenNess(float value)
     
    net.minecraft.core.Direction
     
    static void
    lidAnimateTick(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState blockState, BlockEntityBloodChest blockEntity)
     
    void
    What needs to happen when the (numerical) state is changed.
    void
     
    protected void
    signalOpenCount(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState blockState, int p_155336_, int value)
     
    void
    startOpen(net.minecraft.world.entity.player.Player player)
     
    void
    stopOpen(net.minecraft.world.entity.player.Player player)
     
    boolean
    triggerEvent(int eventType, int value)
     

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

    addTicker, getCurrentState, getTickers, hasJustWorked, read, saveAdditional

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

    addFluidHandlerCapabilities, getInventory, getTank, onTankChanged

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

    addCapabilityInternal, addCapabilitySided, canInteractWith, getCapability, 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

    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, hasCustomOutlineRendering, requestModelDataUpdate, serializeNBT
  • Field Details

    • SLOTS_CHEST

      public static final int SLOTS_CHEST
      The amount of slots in the chest.
      See Also:
    • SLOTS

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

      public static final int SLOT_CONTAINER
      The id of the fluid container slot.
      See Also:
    • LIQUID_PER_SLOT

      public static final int LIQUID_PER_SLOT
      The capacity of the tank.
      See Also:
  • Constructor Details

    • BlockEntityBloodChest

      public BlockEntityBloodChest(net.minecraft.core.BlockPos blockPos, net.minecraft.world.level.block.state.BlockState blockState)
  • Method Details

    • addItemHandlerCapabilities

      protected void addItemHandlerCapabilities()
      Overrides:
      addItemHandlerCapabilities in class BlockEntityTankInventory
    • getRotation

      public net.minecraft.core.Direction getRotation()
      Overrides:
      getRotation in class org.cyclops.cyclopscore.blockentity.CyclopsBlockEntity
    • createTank

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

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

      public int getNewState()
      Description copied from class: BlockEntityTickingTankInventory
      Get the new (numerical) state for this tile entity.
      Specified by:
      getNewState in class BlockEntityTickingTankInventory<BlockEntityBloodChest>
      Returns:
      The new state.
    • onStateChanged

      public void onStateChanged()
      Description copied from class: BlockEntityTickingTankInventory
      What needs to happen when the (numerical) state is changed.
      Specified by:
      onStateChanged in class BlockEntityTickingTankInventory<BlockEntityBloodChest>
    • triggerEvent

      public boolean triggerEvent(int eventType, int value)
      Overrides:
      triggerEvent in class net.minecraft.world.level.block.entity.BlockEntity
    • startOpen

      public void startOpen(net.minecraft.world.entity.player.Player player)
    • stopOpen

      public void stopOpen(net.minecraft.world.entity.player.Player player)
    • recheckOpen

      public void recheckOpen()
    • signalOpenCount

      protected void signalOpenCount(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState blockState, int p_155336_, int value)
    • lidAnimateTick

      public static void lidAnimateTick(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState blockState, BlockEntityBloodChest blockEntity)
    • getOpenNess

      public float getOpenNess(float value)
      Specified by:
      getOpenNess in interface net.minecraft.world.level.block.entity.LidBlockEntity
    • createMenu

      @Nullable public net.minecraft.world.inventory.AbstractContainerMenu createMenu(int id, net.minecraft.world.entity.player.Inventory playerInventory, net.minecraft.world.entity.player.Player playerEntity)
      Specified by:
      createMenu in interface net.minecraft.world.inventory.MenuConstructor
    • getDisplayName

      public net.minecraft.network.chat.Component getDisplayName()
      Specified by:
      getDisplayName in interface net.minecraft.world.MenuProvider