Class BlockEntityTimer
java.lang.Object
net.minecraft.world.level.block.entity.BlockEntity
com.binaris.wizardry.content.blockentity.BlockEntityTimer
- All Implemented Interfaces:
dev.onyxstudios.cca.api.v3.component.ComponentAccess,net.fabricmc.fabric.api.attachment.v1.AttachmentTarget,net.fabricmc.fabric.api.blockview.v2.RenderDataBlockEntity
- Direct Known Subclasses:
VanishingCobwebBlockEntity
public class BlockEntityTimer
extends net.minecraft.world.level.block.entity.BlockEntity
-
Field Summary
FieldsFields inherited from class net.minecraft.world.level.block.entity.BlockEntity
level, remove, worldPositionFields inherited from interface net.fabricmc.fabric.api.attachment.v1.AttachmentTarget
NBT_ATTACHMENT_KEY -
Constructor Summary
ConstructorsConstructorDescriptionBlockEntityTimer(net.minecraft.world.level.block.entity.BlockEntityType<?> type, net.minecraft.core.BlockPos blockPos, net.minecraft.world.level.block.state.BlockState state) BlockEntityTimer(net.minecraft.world.level.block.entity.BlockEntityType<?> type, net.minecraft.core.BlockPos blockPos, net.minecraft.world.level.block.state.BlockState state, int maxTimer) -
Method Summary
Modifier and TypeMethodDescriptionintvoidload(@NotNull net.minecraft.nbt.CompoundTag tagCompound) voidsaveAdditional(@NotNull net.minecraft.nbt.CompoundTag tagCompound) voidsetLifetime(int lifetime) static voidupdate(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos blockPos, net.minecraft.world.level.block.state.BlockState state, BlockEntityTimer entityTimer) Methods inherited from class net.minecraft.world.level.block.entity.BlockEntity
addEntityType, clearRemoved, fillCrashReportCategory, getBlockPos, getBlockState, getLevel, getPosFromTag, getType, getUpdatePacket, getUpdateTag, hasLevel, isRemoved, loadStatic, onlyOpCanSetNbt, saveToItem, saveWithFullMetadata, saveWithId, saveWithoutMetadata, setBlockState, setChanged, setChanged, setLevel, setRemoved, triggerEventMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.fabricmc.fabric.api.attachment.v1.AttachmentTarget
getAttached, getAttachedOrCreate, getAttachedOrCreate, getAttachedOrElse, getAttachedOrGet, getAttachedOrSet, getAttachedOrThrow, hasAttached, modifyAttached, removeAttached, setAttachedMethods inherited from interface dev.onyxstudios.cca.api.v3.component.ComponentAccess
asComponentProvider, getComponent, syncComponent, syncComponent, syncComponentMethods inherited from interface net.fabricmc.fabric.api.blockview.v2.RenderDataBlockEntity
getRenderData
-
Field Details
-
timer
public int timer -
maxTimer
public int maxTimer
-
-
Constructor Details
-
BlockEntityTimer
public BlockEntityTimer(net.minecraft.world.level.block.entity.BlockEntityType<?> type, net.minecraft.core.BlockPos blockPos, net.minecraft.world.level.block.state.BlockState state) -
BlockEntityTimer
public BlockEntityTimer(net.minecraft.world.level.block.entity.BlockEntityType<?> type, net.minecraft.core.BlockPos blockPos, net.minecraft.world.level.block.state.BlockState state, int maxTimer)
-
-
Method Details
-
update
public static void update(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos blockPos, net.minecraft.world.level.block.state.BlockState state, BlockEntityTimer entityTimer) -
getLifetime
public int getLifetime() -
setLifetime
public void setLifetime(int lifetime) -
load
public void load(@NotNull @NotNull net.minecraft.nbt.CompoundTag tagCompound) - Overrides:
loadin classnet.minecraft.world.level.block.entity.BlockEntity
-
saveAdditional
public void saveAdditional(@NotNull @NotNull net.minecraft.nbt.CompoundTag tagCompound) - Overrides:
saveAdditionalin classnet.minecraft.world.level.block.entity.BlockEntity
-