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:
TypedInstance<BlockEntityType<?>>, DebugValueSource, IAttachmentHolder, IBlockEntityExtension
-
Nested Class Summary
Nested classes/interfaces inherited from class AttachmentHolder
AttachmentHolder.AsFieldNested classes/interfaces inherited from interface DebugValueSource
DebugValueSource.Registration, DebugValueSource.ValueGetter<T> -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate floatprivate static final intprivate @Nullable EntityReference<LivingEntity> private 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 BlockEntity
level, remove, worldPositionFields inherited from class AttachmentHolder
ATTACHMENTS_NBT_KEY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static voidanimationTick(Level level, BlockPos worldPosition, List<BlockPos> effectBlocks, @Nullable Entity destroyTarget, int tickCount) private static voidapplyEffects(Level level, BlockPos worldPosition, List<BlockPos> effectBlocks) static voidclientTick(Level level, BlockPos pos, BlockState state, ConduitBlockEntity entity) floatgetActiveRotation(float a) private static AABBgetDestroyRangeAABB(BlockPos worldPosition) getUpdateTag(HolderLookup.Provider registries) booleanisActive()booleanprotected voidloadAdditional(ValueInput input) protected voidsaveAdditional(ValueOutput output) private static @Nullable EntityReference<LivingEntity> selectNewTarget(ServerLevel level, BlockPos pos) static voidserverTick(Level level, BlockPos pos, BlockState state, ConduitBlockEntity entity) private voidsetHunting(boolean hunting) private static voidupdateAndAttackTarget(ServerLevel level, BlockPos worldPosition, BlockState blockState, ConduitBlockEntity entity, boolean isActive) private static @Nullable EntityReference<LivingEntity> updateDestroyTarget(@Nullable EntityReference<LivingEntity> target, ServerLevel level, BlockPos pos, boolean isActive) private static voidupdateHunting(ConduitBlockEntity entity, List<BlockPos> effectBlocks) private static booleanupdateShape(Level level, BlockPos worldPosition, List<BlockPos> effectBlocks) Methods inherited from class BlockEntity
addEntityType, applyComponents, applyComponentsFromItemStack, applyImplicitComponents, clearRemoved, collectComponents, collectImplicitComponents, components, fillCrashReportCategory, getAndClearAttachmentTypesToSync, getBlockPos, getBlockState, getLevel, getNameForReporting, getPersistentData, getPosFromTag, getType, hasLevel, isRemoved, isValidBlockState, loadCustomOnly, loadStatic, loadWithComponents, parseCustomNameSafe, preRemoveSideEffects, problemPath, registerDebugValues, removeComponentsFromTag, removeData, saveCustomOnly, saveCustomOnly, saveWithFullMetadata, saveWithFullMetadata, saveWithId, saveWithoutMetadata, saveWithoutMetadata, setBlockState, setChanged, setChanged, setComponents, setData, setLevel, setRemoved, syncData, triggerEvent, typeHolderMethods inherited from class AttachmentHolder
deserializeAttachments, getData, getExistingDataOrNull, hasAttachments, hasData, serializeAttachmentsMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface IAttachmentHolder
getData, getExistingData, getExistingData, getExistingDataOrNull, hasData, removeData, setData, syncDataMethods inherited from interface 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
-
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 entity) -
serverTick
public static void serverTick(Level level, BlockPos pos, BlockState state, ConduitBlockEntity entity) -
updateHunting
-
updateShape
-
applyEffects
-
updateAndAttackTarget
private static void updateAndAttackTarget(ServerLevel level, BlockPos worldPosition, BlockState blockState, ConduitBlockEntity entity, boolean isActive) -
updateDestroyTarget
private static @Nullable EntityReference<LivingEntity> updateDestroyTarget(@Nullable EntityReference<LivingEntity> target, ServerLevel level, BlockPos pos, boolean isActive) -
selectNewTarget
private static @Nullable EntityReference<LivingEntity> selectNewTarget(ServerLevel level, BlockPos pos) -
getDestroyRangeAABB
-
animationTick
-
isActive
public boolean isActive() -
isHunting
public boolean isHunting() -
setHunting
private void setHunting(boolean hunting) -
getActiveRotation
public float getActiveRotation(float a)
-