Class SculkSensorBlockEntity
java.lang.Object
net.neoforged.neoforge.attachment.AttachmentHolder
net.minecraft.world.level.block.entity.BlockEntity
net.minecraft.world.level.block.entity.SculkSensorBlockEntity
- All Implemented Interfaces:
GameEventListener.Provider<VibrationSystem.Listener>
,VibrationSystem
,IAttachmentHolder
,IBlockEntityExtension
- Direct Known Subclasses:
CalibratedSculkSensorBlockEntity
public class SculkSensorBlockEntity
extends BlockEntity
implements GameEventListener.Provider<VibrationSystem.Listener>, VibrationSystem
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class net.minecraft.world.level.block.entity.BlockEntity
BlockEntity.ComponentHelper, BlockEntity.DataComponentInput
Nested classes/interfaces inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
AttachmentHolder.AsField
Nested classes/interfaces inherited from interface net.minecraft.world.level.gameevent.vibrations.VibrationSystem
VibrationSystem.Data, VibrationSystem.Listener, VibrationSystem.Ticker, VibrationSystem.User
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate int
private static final org.slf4j.Logger
private VibrationSystem.Data
private final VibrationSystem.Listener
private final VibrationSystem.User
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
Fields inherited from interface net.minecraft.world.level.gameevent.vibrations.VibrationSystem
DEFAULT_VIBRATION_FREQUENCY, RESONANCE_EVENTS, VIBRATION_FREQUENCY_FOR_EVENT
-
Constructor Summary
ConstructorsModifierConstructorDescriptionSculkSensorBlockEntity
(BlockPos pPos, BlockState pBlockState) protected
SculkSensorBlockEntity
(BlockEntityType<?> pType, BlockPos pPos, BlockState pBlockState) -
Method Summary
Modifier and TypeMethodDescriptionint
protected void
loadAdditional
(CompoundTag pTag, HolderLookup.Provider pRegistries) protected void
saveAdditional
(CompoundTag pTag, HolderLookup.Provider pRegistries) void
setLastVibrationFrequency
(int pLastVibrationFrequency) 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, getUpdatePacket, getUpdateTag, hasLevel, isRemoved, isValidBlockState, loadCustomOnly, loadStatic, loadWithComponents, onlyOpCanSetNbt, parseCustomNameSafe, removeComponentsFromTag, removeData, saveCustomAndMetadata, saveCustomOnly, saveToItem, 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, hasCustomOutlineRendering, invalidateCapabilities, onChunkUnloaded, onDataPacket, onLoad, requestModelDataUpdate
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
vibrationData
-
vibrationListener
-
vibrationUser
-
lastVibrationFrequency
private int lastVibrationFrequency
-
-
Constructor Details
-
SculkSensorBlockEntity
-
SculkSensorBlockEntity
-
-
Method Details
-
createVibrationUser
-
loadAdditional
- Overrides:
loadAdditional
in classBlockEntity
-
saveAdditional
- Overrides:
saveAdditional
in classBlockEntity
-
getVibrationData
- Specified by:
getVibrationData
in interfaceVibrationSystem
-
getVibrationUser
- Specified by:
getVibrationUser
in interfaceVibrationSystem
-
getLastVibrationFrequency
public int getLastVibrationFrequency() -
setLastVibrationFrequency
public void setLastVibrationFrequency(int pLastVibrationFrequency) -
getListener
- Specified by:
getListener
in interfaceGameEventListener.Provider<VibrationSystem.Listener>
-