Class CreakingHeartBlockEntity
java.lang.Object
net.neoforged.neoforge.attachment.AttachmentHolder
net.minecraft.world.level.block.entity.BlockEntity
net.minecraft.world.level.block.entity.CreakingHeartBlockEntity
- All Implemented Interfaces:
IAttachmentHolder
,IBlockEntityExtension
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.level.block.entity.BlockEntity
BlockEntity.ComponentHelper
Nested classes/interfaces inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
AttachmentHolder.AsField
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final int
static final int
private static final int
private int
private Vec3
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private int
private static final int
private static final int
private static final int
private int
private static final int
private long
private static final int
private static final int
Fields inherited from class net.minecraft.world.level.block.entity.BlockEntity
level, remove, worldPosition
Fields inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
ATTACHMENTS_NBT_KEY
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
int
void
private double
private void
emitParticles
(ServerLevel p_379473_, int p_380023_, boolean p_379802_) int
getUpdateTag
(HolderLookup.Provider p_379306_) boolean
isProtector
(Creaking p_380040_) protected void
loadAdditional
(CompoundTag p_389460_, HolderLookup.Provider p_389519_) void
preRemoveSideEffects
(BlockPos p_394454_, BlockState p_393611_) void
removeProtector
(DamageSource p_379965_) protected void
saveAdditional
(CompoundTag p_389474_, HolderLookup.Provider p_389560_) static void
serverTick
(Level p_379321_, BlockPos p_379679_, BlockState p_379831_, CreakingHeartBlockEntity p_379534_) void
setCreakingInfo
(UUID p_390523_) void
setCreakingInfo
(Creaking p_390482_) private static Creaking
spawnProtector
(ServerLevel p_379873_, CreakingHeartBlockEntity p_379806_) private static BlockState
updateCreakingState
(Level p_393728_, BlockState p_393633_, BlockPos p_394500_, CreakingHeartBlockEntity p_394605_) 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, parseCustomNameSafe, removeComponentsFromTag, removeData, saveCustomAndMetadata, saveCustomOnly, saveWithFullMetadata, saveWithId, saveWithoutMetadata, setBlockState, setChanged, setChanged, setComponents, setData, setLevel, setRemoved, triggerEvent
Methods inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
deserializeAttachments, getData, getExistingDataOrNull, hasAttachments, hasData, serializeAttachments
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.neoforged.neoforge.attachment.IAttachmentHolder
getData, getExistingData, getExistingData, getExistingDataOrNull, hasData, removeData, setData
Methods inherited from interface net.neoforged.neoforge.common.extensions.IBlockEntityExtension
getModelData, handleUpdateTag, invalidateCapabilities, onChunkUnloaded, onDataPacket, onLoad, requestModelDataUpdate
-
Field Details
-
PLAYER_DETECTION_RANGE
private static final int PLAYER_DETECTION_RANGE- See Also:
-
CREAKING_ROAMING_RADIUS
public static final int CREAKING_ROAMING_RADIUS- See Also:
-
DISTANCE_CREAKING_TOO_FAR
private static final int DISTANCE_CREAKING_TOO_FAR- See Also:
-
SPAWN_RANGE_XZ
private static final int SPAWN_RANGE_XZ- See Also:
-
SPAWN_RANGE_Y
private static final int SPAWN_RANGE_Y- See Also:
-
ATTEMPTS_PER_SPAWN
private static final int ATTEMPTS_PER_SPAWN- See Also:
-
UPDATE_TICKS
private static final int UPDATE_TICKS- See Also:
-
UPDATE_TICKS_VARIANCE
private static final int UPDATE_TICKS_VARIANCE- See Also:
-
HURT_CALL_TOTAL_TICKS
private static final int HURT_CALL_TOTAL_TICKS- See Also:
-
NUMBER_OF_HURT_CALLS
private static final int NUMBER_OF_HURT_CALLS- See Also:
-
HURT_CALL_INTERVAL
private static final int HURT_CALL_INTERVAL- See Also:
-
HURT_CALL_PARTICLE_TICKS
private static final int HURT_CALL_PARTICLE_TICKS- See Also:
-
MAX_DEPTH
private static final int MAX_DEPTH- See Also:
-
MAX_COUNT
private static final int MAX_COUNT- See Also:
-
TICKS_GRACE_PERIOD
private static final int TICKS_GRACE_PERIOD- See Also:
-
NO_CREAKING
-
creakingInfo
-
ticksExisted
private long ticksExisted -
ticker
private int ticker -
emitter
private int emitter -
emitterTarget
-
outputSignal
private int outputSignal
-
-
Constructor Details
-
CreakingHeartBlockEntity
-
-
Method Details
-
serverTick
public static void serverTick(Level p_379321_, BlockPos p_379679_, BlockState p_379831_, CreakingHeartBlockEntity p_379534_) -
updateCreakingState
private static BlockState updateCreakingState(Level p_393728_, BlockState p_393633_, BlockPos p_394500_, CreakingHeartBlockEntity p_394605_) -
distanceToCreaking
private double distanceToCreaking() -
clearCreakingInfo
private void clearCreakingInfo() -
setCreakingInfo
-
setCreakingInfo
-
getCreakingProtector
-
spawnProtector
@Nullable private static Creaking spawnProtector(ServerLevel p_379873_, CreakingHeartBlockEntity p_379806_) -
getUpdatePacket
- Overrides:
getUpdatePacket
in classBlockEntity
-
getUpdateTag
- Overrides:
getUpdateTag
in classBlockEntity
-
creakingHurt
public void creakingHurt() -
spreadResin
-
emitParticles
-
preRemoveSideEffects
- Overrides:
preRemoveSideEffects
in classBlockEntity
-
removeProtector
-
isProtector
-
getAnalogOutputSignal
public int getAnalogOutputSignal() -
computeAnalogOutputSignal
public int computeAnalogOutputSignal() -
loadAdditional
- Overrides:
loadAdditional
in classBlockEntity
-
saveAdditional
- Overrides:
saveAdditional
in classBlockEntity
-