Class PanicAlarmBlockEntity
java.lang.Object
net.neoforged.neoforge.attachment.AttachmentHolder
net.minecraft.world.level.block.entity.BlockEntity
tech.anonymoushacker1279.immersiveweapons.blockentity.PanicAlarmBlockEntity
- All Implemented Interfaces:
net.minecraft.world.level.block.EntityBlock,net.neoforged.neoforge.attachment.IAttachmentHolder,net.neoforged.neoforge.common.extensions.IBlockEntityExtension
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.neoforged.neoforge.attachment.AttachmentHolder
net.neoforged.neoforge.attachment.AttachmentHolder.AsField -
Field Summary
Fields inherited from class net.minecraft.world.level.block.entity.BlockEntity
level, remove, worldPositionFields inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
ATTACHMENTS_NBT_KEY -
Constructor Summary
ConstructorsConstructorDescriptionPanicAlarmBlockEntity(net.minecraft.core.BlockPos blockPos, net.minecraft.world.level.block.state.BlockState blockState) Constructor for PanicAlarmBlockEntity. -
Method Summary
Modifier and TypeMethodDescriptionbooleanGet the power status.voidloadAdditional(net.minecraft.world.level.storage.ValueInput valueInput) @Nullable net.minecraft.world.level.block.entity.BlockEntitynewBlockEntity(net.minecraft.core.BlockPos blockPos, net.minecraft.world.level.block.state.BlockState blockState) Create a block entity for the block.protected voidsaveAdditional(net.minecraft.world.level.storage.ValueOutput valueOutput) voidsetCooldown(int delay) voidsetPowered(boolean state) Set the power status.voidtick(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, applyComponents, applyComponentsFromItemStack, applyImplicitComponents, clearRemoved, collectComponents, collectImplicitComponents, components, fillCrashReportCategory, getBlockPos, getBlockState, getLevel, getNameForReporting, getPersistentData, getPosFromTag, getType, getUpdatePacket, getUpdateTag, hasLevel, isRemoved, isValidBlockState, loadCustomOnly, loadStatic, loadWithComponents, parseCustomNameSafe, preRemoveSideEffects, problemPath, removeComponentsFromTag, removeData, saveCustomOnly, saveCustomOnly, saveWithFullMetadata, saveWithFullMetadata, saveWithId, saveWithoutMetadata, saveWithoutMetadata, setBlockState, setChanged, setChanged, setComponents, setData, setLevel, setRemoved, syncData, triggerEventMethods inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
deserializeAttachments, getData, getExistingDataOrNull, hasAttachments, hasData, serializeAttachmentsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.world.level.block.EntityBlock
getListener, getTickerMethods inherited from interface net.neoforged.neoforge.attachment.IAttachmentHolder
getData, getExistingData, getExistingData, getExistingDataOrNull, hasData, removeData, setData, syncDataMethods inherited from interface net.neoforged.neoforge.common.extensions.IBlockEntityExtension
getModelData, handleUpdateTag, invalidateCapabilities, onChunkUnloaded, onDataPacket, onLoad, requestModelDataUpdate
-
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:
newBlockEntityin interfacenet.minecraft.world.level.block.EntityBlock- Parameters:
blockPos- theBlockPosthe block is atblockState- theBlockStateof 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.world.level.storage.ValueOutput valueOutput) - Overrides:
saveAdditionalin classnet.minecraft.world.level.block.entity.BlockEntity
-
loadAdditional
public void loadAdditional(net.minecraft.world.level.storage.ValueInput valueInput) - Overrides:
loadAdditionalin classnet.minecraft.world.level.block.entity.BlockEntity
-