Class FridgeTileEntity

java.lang.Object
net.minecraftforge.common.capabilities.CapabilityProvider<net.minecraft.world.level.block.entity.BlockEntity>
net.minecraft.world.level.block.entity.BlockEntity
com.pixelmonmod.pixelmon.blocks.tileentity.InventoryTileEntity
com.pixelmonmod.pixelmon.blocks.tileentity.FridgeTileEntity
All Implemented Interfaces:
IBasicInventory, IFrameCounter, net.minecraft.world.Clearable, net.minecraft.world.Container, net.minecraft.world.inventory.MenuConstructor, 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>

public class FridgeTileEntity extends InventoryTileEntity implements IFrameCounter
  • Nested Class Summary

    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 inherited from class net.minecraft.world.level.block.entity.BlockEntity

    level, remove, worldPosition

    Fields inherited from interface net.minecraft.world.Container

    DEFAULT_DISTANCE_LIMIT, LARGE_MAX_STACK_SIZE

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

    INFINITE_EXTENT_AABB
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    FridgeTileEntity(String inventoryName, int rows, net.minecraft.core.BlockPos blockPos, net.minecraft.world.level.block.state.BlockState blockState)
     
     
    FridgeTileEntity(net.minecraft.core.BlockPos blockPos, net.minecraft.world.level.block.state.BlockState blockState)
     
    protected
    FridgeTileEntity(net.minecraft.world.level.block.entity.BlockEntityType<?> type, String inventoryName, int rows, net.minecraft.core.BlockPos blockPos, net.minecraft.world.level.block.state.BlockState blockState)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    int
     
    net.minecraft.network.protocol.game.ClientboundBlockEntityDataPacket
     
    net.minecraft.nbt.CompoundTag
     
    boolean
    Checks if the fridge is open.
    void
    load(net.minecraft.nbt.CompoundTag nbt)
     
    void
    onDataPacket(net.minecraft.network.Connection net, net.minecraft.network.protocol.game.ClientboundBlockEntityDataPacket pkt)
     
    void
    Executes the fridge opening animation.
    void
    saveAdditional(net.minecraft.nbt.CompoundTag nbt)
     
    void
    Updates the client with the fridge animation.
    void
    setFrame(int frame)
     

    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, getCapability, invalidateCaps, reviveCaps, serializeCaps

    Methods inherited from class java.lang.Object

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

    Methods inherited from interface net.minecraft.world.Container

    canTakeItem, countItem, hasAnyMatching, hasAnyOf, setChanged

    Methods inherited from interface com.pixelmonmod.pixelmon.blocks.tileentity.IBasicInventory

    canPlaceItem, clearContent, startOpen, stopOpen

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

    getCapability, getCapability

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

    deserializeNBT, getModelData, getRenderBoundingBox, handleUpdateTag, hasCustomOutlineRendering, onLoad, requestModelDataUpdate, serializeNBT
  • Constructor Details

    • FridgeTileEntity

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

      protected FridgeTileEntity(String inventoryName, int rows, net.minecraft.core.BlockPos blockPos, net.minecraft.world.level.block.state.BlockState blockState)
    • FridgeTileEntity

      protected FridgeTileEntity(net.minecraft.world.level.block.entity.BlockEntityType<?> type, String inventoryName, int rows, net.minecraft.core.BlockPos blockPos, net.minecraft.world.level.block.state.BlockState blockState)
  • Method Details

    • closeFridge

      public void closeFridge()
    • openFridge

      public void openFridge()
      Executes the fridge opening animation.
    • isOpenDoor

      public boolean isOpenDoor()
      Checks if the fridge is open.
      Returns:
      Whether the fridge is open.
    • getFrame

      public int getFrame()
      Specified by:
      getFrame in interface IFrameCounter
    • setFrame

      public void setFrame(int frame)
      Specified by:
      setFrame in interface IFrameCounter
    • load

      public void load(net.minecraft.nbt.CompoundTag nbt)
      Overrides:
      load in class InventoryTileEntity
    • saveAdditional

      public void saveAdditional(net.minecraft.nbt.CompoundTag nbt)
      Overrides:
      saveAdditional in class InventoryTileEntity
    • getUpdateTag

      public net.minecraft.nbt.CompoundTag getUpdateTag()
      Overrides:
      getUpdateTag in class net.minecraft.world.level.block.entity.BlockEntity
    • getUpdatePacket

      public net.minecraft.network.protocol.game.ClientboundBlockEntityDataPacket getUpdatePacket()
      Overrides:
      getUpdatePacket in class net.minecraft.world.level.block.entity.BlockEntity
    • sendAnimation

      public void sendAnimation(String str)
      Updates the client with the fridge animation.
      Parameters:
      str - The current fridge animation.
    • onDataPacket

      public void onDataPacket(net.minecraft.network.Connection net, net.minecraft.network.protocol.game.ClientboundBlockEntityDataPacket pkt)
      Specified by:
      onDataPacket in interface net.minecraftforge.common.extensions.IForgeBlockEntity