Class SculkShriekerBlockEntity
java.lang.Object
net.neoforged.neoforge.attachment.AttachmentHolder
net.minecraft.world.level.block.entity.BlockEntity
net.minecraft.world.level.block.entity.SculkShriekerBlockEntity
- All Implemented Interfaces:
TypedInstance<BlockEntityType<?>>, DebugValueSource, GameEventListener.Provider<VibrationSystem.Listener>, VibrationSystem, IAttachmentHolder, IBlockEntityExtension
public class SculkShriekerBlockEntity
extends BlockEntity
implements GameEventListener.Provider<VibrationSystem.Listener>, VibrationSystem
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class AttachmentHolder
AttachmentHolder.AsFieldNested classes/interfaces inherited from interface DebugValueSource
DebugValueSource.Registration, DebugValueSource.ValueGetter<T>Nested classes/interfaces inherited from interface VibrationSystem
VibrationSystem.Data, VibrationSystem.Listener, VibrationSystem.Ticker, VibrationSystem.User -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final intprivate static final intprivate static final intprivate static final it.unimi.dsi.fastutil.ints.Int2ObjectMap<SoundEvent> private VibrationSystem.Dataprivate final VibrationSystem.Listenerprivate final VibrationSystem.Userprivate static final intprivate static final intprivate static final intprivate static final intprivate intFields inherited from class BlockEntity
level, remove, worldPositionFields inherited from class AttachmentHolder
ATTACHMENTS_NBT_KEYFields inherited from interface VibrationSystem
NO_VIBRATION_FREQUENCY, RESONANCE_EVENTS, VIBRATION_FREQUENCY_FOR_EVENT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate booleancanRespond(ServerLevel level) protected voidloadAdditional(ValueInput input) private voidplayWardenReplySound(Level level) voidpreRemoveSideEffects(BlockPos pos, BlockState state) protected voidsaveAdditional(ValueOutput output) private voidshriek(ServerLevel level, @Nullable Entity sourceEntity) static @Nullable ServerPlayertryGetPlayer(@Nullable Entity sourceEntity) voidtryRespond(ServerLevel level) voidtryShriek(ServerLevel level, @Nullable ServerPlayer player) private booleantrySummonWarden(ServerLevel level) private booleantryToWarn(ServerLevel level, ServerPlayer player) Methods inherited from class BlockEntity
addEntityType, applyComponents, applyComponentsFromItemStack, applyImplicitComponents, clearRemoved, collectComponents, collectImplicitComponents, components, fillCrashReportCategory, getAndClearAttachmentTypesToSync, getBlockPos, getBlockState, getLevel, getNameForReporting, getPersistentData, getPosFromTag, getType, getUpdatePacket, getUpdateTag, hasLevel, isRemoved, isValidBlockState, loadCustomOnly, loadStatic, loadWithComponents, parseCustomNameSafe, 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
-
WARNING_SOUND_RADIUS
private static final int WARNING_SOUND_RADIUS- See Also:
-
WARDEN_SPAWN_ATTEMPTS
private static final int WARDEN_SPAWN_ATTEMPTS- See Also:
-
WARDEN_SPAWN_RANGE_XZ
private static final int WARDEN_SPAWN_RANGE_XZ- See Also:
-
WARDEN_SPAWN_RANGE_Y
private static final int WARDEN_SPAWN_RANGE_Y- See Also:
-
DARKNESS_RADIUS
private static final int DARKNESS_RADIUS- See Also:
-
SHRIEKING_TICKS
private static final int SHRIEKING_TICKS- See Also:
-
SOUND_BY_LEVEL
-
DEFAULT_WARNING_LEVEL
private static final int DEFAULT_WARNING_LEVEL- See Also:
-
warningLevel
private int warningLevel -
vibrationUser
-
vibrationData
-
vibrationListener
-
-
Constructor Details
-
SculkShriekerBlockEntity
-
-
Method Details
-
getVibrationData
- Specified by:
getVibrationDatain interfaceVibrationSystem
-
getVibrationUser
- Specified by:
getVibrationUserin interfaceVibrationSystem
-
loadAdditional
- Overrides:
loadAdditionalin classBlockEntity
-
saveAdditional
- Overrides:
saveAdditionalin classBlockEntity
-
tryGetPlayer
-
tryShriek
-
tryToWarn
-
shriek
-
canRespond
-
preRemoveSideEffects
- Overrides:
preRemoveSideEffectsin classBlockEntity
-
tryRespond
-
playWardenReplySound
-
trySummonWarden
-
getListener
- Specified by:
getListenerin interfaceGameEventListener.Provider<VibrationSystem.Listener>
-