Class SculkSensorBlockEntity
java.lang.Object
net.minecraftforge.common.capabilities.CapabilityProvider<BlockEntity>
net.minecraft.world.level.block.entity.BlockEntity
net.minecraft.world.level.block.entity.SculkSensorBlockEntity
- All Implemented Interfaces:
VibrationListener.VibrationListenerConfig
,ICapabilityProvider
,ICapabilityProviderImpl<BlockEntity>
,ICapabilitySerializable<CompoundTag>
,IForgeBlockEntity
,INBTSerializable<CompoundTag>
public class SculkSensorBlockEntity
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 int
private VibrationListener
private static final org.slf4j.Logger
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 TypeMethodDescriptionboolean
int
static int
getRedstoneStrengthForDistance
(float p_222798_, int p_222799_) void
load
(CompoundTag p_155649_) void
onSignalReceive
(ServerLevel p_222803_, GameEventListener p_222804_, BlockPos p_222805_, GameEvent p_222806_, Entity p_222807_, Entity p_222808_, float p_222809_) void
protected void
saveAdditional
(CompoundTag p_187511_) void
setLastVibrationFrequency
(int p_222801_) boolean
shouldListen
(ServerLevel p_222811_, GameEventListener p_222812_, BlockPos p_222813_, GameEvent p_222814_, GameEvent.Context p_222815_) 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
getListenableEvents, isValidVibration
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
listener
-
lastVibrationFrequency
private int lastVibrationFrequency
-
-
Constructor Details
-
SculkSensorBlockEntity
-
-
Method Details
-
load
- Overrides:
load
in classBlockEntity
-
saveAdditional
- Overrides:
saveAdditional
in classBlockEntity
-
getListener
-
getLastVibrationFrequency
public int getLastVibrationFrequency() -
canTriggerAvoidVibration
public boolean canTriggerAvoidVibration()- Specified by:
canTriggerAvoidVibration
in interfaceVibrationListener.VibrationListenerConfig
-
shouldListen
public boolean shouldListen(ServerLevel p_222811_, GameEventListener p_222812_, BlockPos p_222813_, GameEvent p_222814_, @Nullable GameEvent.Context p_222815_) - Specified by:
shouldListen
in interfaceVibrationListener.VibrationListenerConfig
-
onSignalReceive
public void onSignalReceive(ServerLevel p_222803_, GameEventListener p_222804_, BlockPos p_222805_, GameEvent p_222806_, @Nullable Entity p_222807_, @Nullable Entity p_222808_, float p_222809_) - Specified by:
onSignalReceive
in interfaceVibrationListener.VibrationListenerConfig
-
onSignalSchedule
public void onSignalSchedule()- Specified by:
onSignalSchedule
in interfaceVibrationListener.VibrationListenerConfig
-
getRedstoneStrengthForDistance
public static int getRedstoneStrengthForDistance(float p_222798_, int p_222799_) -
setLastVibrationFrequency
public void setLastVibrationFrequency(int p_222801_)
-