Class PanicAlarmBlockEntity

java.lang.Object
net.minecraftforge.common.capabilities.CapabilityProvider<net.minecraft.world.level.block.entity.BlockEntity>
net.minecraft.world.level.block.entity.BlockEntity
tech.anonymoushacker1279.immersiveweapons.blockentity.PanicAlarmBlockEntity
All Implemented Interfaces:
net.minecraft.world.level.block.EntityBlock, 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 PanicAlarmBlockEntity extends net.minecraft.world.level.block.entity.BlockEntity implements net.minecraft.world.level.block.EntityBlock
  • 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.minecraftforge.common.extensions.IForgeBlockEntity

    INFINITE_EXTENT_AABB
  • Constructor Summary

    Constructors
    Constructor
    Description
    PanicAlarmBlockEntity(net.minecraft.core.BlockPos blockPos, net.minecraft.world.level.block.state.BlockState blockState)
    Constructor for PanicAlarmBlockEntity.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Get the power status.
    void
    load(net.minecraft.nbt.CompoundTag nbt)
    Load NBT data.
    @Nullable net.minecraft.world.level.block.entity.BlockEntity
    newBlockEntity(net.minecraft.core.BlockPos blockPos, net.minecraft.world.level.block.state.BlockState blockState)
    Create a block entity for the block.
    protected void
    saveAdditional(net.minecraft.nbt.CompoundTag pTag)
    Save NBT data.
    void
    setCooldown(int delay)
     
    void
    setPowered(boolean state)
    Set the power status.
    void
    tick(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos blockPos)
    Runs once each tick.

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

    addEntityType, clearRemoved, fillCrashReportCategory, getBlockPos, getBlockState, getLevel, getPersistentData, getPosFromTag, getType, getUpdatePacket, getUpdateTag, 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.level.block.EntityBlock

    getListener, getTicker

    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, onDataPacket, onLoad, requestModelDataUpdate, serializeNBT
  • Constructor Details

    • PanicAlarmBlockEntity

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

    • tick

      public void tick(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos blockPos)
      Runs once each tick. Handle playing alarm sounds.
    • newBlockEntity

      @Nullable public @Nullable net.minecraft.world.level.block.entity.BlockEntity newBlockEntity(net.minecraft.core.BlockPos blockPos, net.minecraft.world.level.block.state.BlockState blockState)
      Create a block entity for the block.
      Specified by:
      newBlockEntity in interface net.minecraft.world.level.block.EntityBlock
      Parameters:
      blockPos - the BlockPos the block is at
      blockState - the BlockState of the block
      Returns:
      BlockEntity
    • isPowered

      public boolean isPowered()
      Get the power status.
      Returns:
      boolean
    • setPowered

      public void setPowered(boolean state)
      Set the power status.
    • setCooldown

      public void setCooldown(int delay)
    • saveAdditional

      protected void saveAdditional(net.minecraft.nbt.CompoundTag pTag)
      Save NBT data.
      Overrides:
      saveAdditional in class net.minecraft.world.level.block.entity.BlockEntity
      Parameters:
      pTag - the CompoundNBT to save
    • load

      public void load(net.minecraft.nbt.CompoundTag nbt)
      Load NBT data.
      Overrides:
      load in class net.minecraft.world.level.block.entity.BlockEntity
      Parameters:
      nbt - the CompoundNBT to load