Class SculkShriekerBlockEntity
java.lang.Object
net.minecraftforge.common.capabilities.CapabilityProvider<BlockEntity>
net.minecraft.world.level.block.entity.BlockEntity
net.minecraft.world.level.block.entity.SculkShriekerBlockEntity
- All Implemented Interfaces:
VibrationListener.VibrationListenerConfig
,ICapabilityProvider
,ICapabilityProviderImpl<BlockEntity>
,ICapabilitySerializable<CompoundTag>
,IForgeBlockEntity
,INBTSerializable<CompoundTag>
public class SculkShriekerBlockEntity
extends BlockEntity
implements VibrationListener.VibrationListenerConfig
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraftforge.common.capabilities.CapabilityProvider
CapabilityProvider.AsField<B extends ICapabilityProviderImpl<B>>
-
Field Summary
Modifier and TypeFieldDescriptionprivate static final int
private VibrationListener
private static final int
private static final org.slf4j.Logger
private static final int
private static final it.unimi.dsi.fastutil.ints.Int2ObjectMap<SoundEvent>
private static final int
private static final int
private static final int
private static final int
private int
Fields inherited from class net.minecraft.world.level.block.entity.BlockEntity
level, remove, worldPosition
Fields inherited from interface net.minecraftforge.common.extensions.IForgeBlockEntity
INFINITE_EXTENT_AABB
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate boolean
canRespond
(ServerLevel p_222873_) void
load
(CompoundTag p_222868_) void
onSignalReceive
(ServerLevel p_222848_, GameEventListener p_222849_, BlockPos p_222850_, GameEvent p_222851_, Entity p_222852_, Entity p_222853_, float p_222854_) void
private void
protected void
saveAdditional
(CompoundTag p_222878_) boolean
shouldListen
(ServerLevel p_222856_, GameEventListener p_222857_, BlockPos p_222858_, GameEvent p_222859_, GameEvent.Context p_222860_) private void
shriek
(ServerLevel p_222845_, Entity p_222846_) static ServerPlayer
tryGetPlayer
(Entity p_222862_) void
tryRespond
(ServerLevel p_222840_) void
tryShriek
(ServerLevel p_222842_, ServerPlayer p_222843_) private boolean
trySummonWarden
(ServerLevel p_222881_) private boolean
tryToWarn
(ServerLevel p_222875_, ServerPlayer p_222876_) Methods inherited from class net.minecraft.world.level.block.entity.BlockEntity
addEntityType, clearRemoved, fillCrashReportCategory, getBlockPos, getBlockState, getLevel, getPersistentData, getPosFromTag, getType, getUpdatePacket, getUpdateTag, hasLevel, isRemoved, loadStatic, onChunkUnloaded, onlyOpCanSetNbt, saveToItem, saveWithFullMetadata, saveWithId, saveWithoutMetadata, setBlockState, setChanged, setChanged, setLevel, setRemoved, triggerEvent
Methods inherited from class net.minecraftforge.common.capabilities.CapabilityProvider
areCapsCompatible, areCapsCompatible, deserializeCaps, gatherCapabilities, gatherCapabilities, gatherCapabilities, getCapabilities, getCapability, invalidateCaps, reviveCaps, serializeCaps
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minecraftforge.common.capabilities.ICapabilityProvider
getCapability, getCapability
Methods inherited from interface net.minecraftforge.common.extensions.IForgeBlockEntity
deserializeNBT, getModelData, getRenderBoundingBox, handleUpdateTag, hasCustomOutlineRendering, onDataPacket, onLoad, requestModelDataUpdate, serializeNBT
Methods inherited from interface net.minecraft.world.level.gameevent.vibrations.VibrationListener.VibrationListenerConfig
canTriggerAvoidVibration, isValidVibration
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
LISTENER_RADIUS
private static final int LISTENER_RADIUS- See Also:
-
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:
-
SOUND_BY_LEVEL
-
SHRIEKING_TICKS
private static final int SHRIEKING_TICKS- See Also:
-
warningLevel
private int warningLevel -
listener
-
-
Constructor Details
-
SculkShriekerBlockEntity
-
-
Method Details
-
getListener
-
load
- Overrides:
load
in classBlockEntity
-
saveAdditional
- Overrides:
saveAdditional
in classBlockEntity
-
getListenableEvents
- Specified by:
getListenableEvents
in interfaceVibrationListener.VibrationListenerConfig
-
shouldListen
public boolean shouldListen(ServerLevel p_222856_, GameEventListener p_222857_, BlockPos p_222858_, GameEvent p_222859_, GameEvent.Context p_222860_) - Specified by:
shouldListen
in interfaceVibrationListener.VibrationListenerConfig
-
tryGetPlayer
-
onSignalReceive
public void onSignalReceive(ServerLevel p_222848_, GameEventListener p_222849_, BlockPos p_222850_, GameEvent p_222851_, @Nullable Entity p_222852_, @Nullable Entity p_222853_, float p_222854_) - Specified by:
onSignalReceive
in interfaceVibrationListener.VibrationListenerConfig
-
tryShriek
-
tryToWarn
-
shriek
-
canRespond
-
tryRespond
-
playWardenReplySound
private void playWardenReplySound() -
trySummonWarden
-
onSignalSchedule
public void onSignalSchedule()- Specified by:
onSignalSchedule
in interfaceVibrationListener.VibrationListenerConfig
-