Class ConduitBlockEntity
java.lang.Object
net.neoforged.neoforge.attachment.AttachmentHolder
net.minecraft.world.level.block.entity.BlockEntity
net.minecraft.world.level.block.entity.ConduitBlockEntity
- All Implemented Interfaces:
IAttachmentHolder,IBlockEntityExtension
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.level.block.entity.BlockEntity
BlockEntity.ComponentHelper, BlockEntity.DataComponentInputNested classes/interfaces inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
AttachmentHolder.AsField -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate floatprivate static final intprivate LivingEntityprivate UUIDprivate static final intprivate booleanprivate booleanprivate static final intprivate static final intprivate static final intprivate longprivate static final floatintprivate static final Block[]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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static voidprivate static voidapplyEffects(Level level, BlockPos pos, List<BlockPos> positions) static voidclientTick(Level level, BlockPos pos, BlockState state, ConduitBlockEntity blockEntity) private static LivingEntityfindDestroyTarget(Level level, BlockPos pos, UUID targetId) floatgetActiveRotation(float partialTick) private static AABBgetUpdateTag(HolderLookup.Provider registries) booleanisActive()booleanprotected voidloadAdditional(CompoundTag tag, HolderLookup.Provider registries) protected voidsaveAdditional(CompoundTag tag, HolderLookup.Provider registries) static voidserverTick(Level level, BlockPos pos, BlockState state, ConduitBlockEntity blockEntity) private voidsetHunting(boolean isHunting) private static voidupdateClientTarget(Level level, BlockPos pos, ConduitBlockEntity blockEntity) private static voidupdateDestroyTarget(Level level, BlockPos pos, BlockState state, List<BlockPos> positions, ConduitBlockEntity blockEntity) private static voidupdateHunting(ConduitBlockEntity blockEntity, List<BlockPos> positions) private static booleanupdateShape(Level level, BlockPos pos, List<BlockPos> positions) Methods inherited from class net.minecraft.world.level.block.entity.BlockEntity
addEntityType, applyComponents, applyComponentsFromItemStack, applyImplicitComponents, clearRemoved, collectComponents, collectImplicitComponents, components, fillCrashReportCategory, getBlockPos, getBlockState, getLevel, getPersistentData, getPosFromTag, getType, hasLevel, isRemoved, isValidBlockState, loadCustomOnly, loadStatic, loadWithComponents, onlyOpCanSetNbt, parseCustomNameSafe, removeComponentsFromTag, removeData, saveCustomAndMetadata, saveCustomOnly, saveToItem, saveWithFullMetadata, saveWithId, saveWithoutMetadata, setBlockState, setChanged, setChanged, setComponents, setData, setLevel, setRemoved, 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.neoforged.neoforge.attachment.IAttachmentHolder
getData, getExistingData, getExistingData, getExistingDataOrNull, hasData, removeData, setDataMethods inherited from interface net.neoforged.neoforge.common.extensions.IBlockEntityExtension
getModelData, handleUpdateTag, hasCustomOutlineRendering, invalidateCapabilities, onChunkUnloaded, onDataPacket, onLoad, requestModelDataUpdate
-
Field Details
-
BLOCK_REFRESH_RATE
private static final int BLOCK_REFRESH_RATE- See Also:
-
EFFECT_DURATION
private static final int EFFECT_DURATION- See Also:
-
ROTATION_SPEED
private static final float ROTATION_SPEED- See Also:
-
MIN_ACTIVE_SIZE
private static final int MIN_ACTIVE_SIZE- See Also:
-
MIN_KILL_SIZE
private static final int MIN_KILL_SIZE- See Also:
-
KILL_RANGE
private static final int KILL_RANGE- See Also:
-
VALID_BLOCKS
-
tickCount
public int tickCount -
activeRotation
private float activeRotation -
isActive
private boolean isActive -
isHunting
private boolean isHunting -
effectBlocks
-
destroyTarget
-
destroyTargetUUID
-
nextAmbientSoundActivation
private long nextAmbientSoundActivation
-
-
Constructor Details
-
ConduitBlockEntity
-
-
Method Details
-
loadAdditional
- Overrides:
loadAdditionalin classBlockEntity
-
saveAdditional
- Overrides:
saveAdditionalin classBlockEntity
-
getUpdatePacket
- Overrides:
getUpdatePacketin classBlockEntity
-
getUpdateTag
- Overrides:
getUpdateTagin classBlockEntity
-
clientTick
public static void clientTick(Level level, BlockPos pos, BlockState state, ConduitBlockEntity blockEntity) -
serverTick
public static void serverTick(Level level, BlockPos pos, BlockState state, ConduitBlockEntity blockEntity) -
updateHunting
-
updateShape
-
applyEffects
-
updateDestroyTarget
private static void updateDestroyTarget(Level level, BlockPos pos, BlockState state, List<BlockPos> positions, ConduitBlockEntity blockEntity) -
updateClientTarget
-
getDestroyRangeAABB
-
findDestroyTarget
-
animationTick
-
isActive
public boolean isActive() -
isHunting
public boolean isHunting() -
setHunting
private void setHunting(boolean isHunting) -
getActiveRotation
public float getActiveRotation(float partialTick)
-