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:
TypedInstance<BlockEntityType<?>>, DebugValueSource, 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 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 intprivate VibrationSystem.Dataprivate final VibrationSystem.Listenerprivate final VibrationSystem.UserFields 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
ConstructorsModifierConstructorDescriptionSculkSensorBlockEntity(BlockPos worldPosition, BlockState blockState) protectedSculkSensorBlockEntity(BlockEntityType<?> type, BlockPos worldPosition, BlockState blockState) -
Method Summary
Modifier and TypeMethodDescriptionintprotected voidloadAdditional(ValueInput input) protected voidsaveAdditional(ValueOutput output) voidsetLastVibrationFrequency(int lastVibrationFrequency) 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, preRemoveSideEffects, 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
-
DEFAULT_LAST_VIBRATION_FREQUENCY
private static final int DEFAULT_LAST_VIBRATION_FREQUENCY- See Also:
-
vibrationData
-
vibrationListener
-
vibrationUser
-
lastVibrationFrequency
private int lastVibrationFrequency
-
-
Constructor Details
-
SculkSensorBlockEntity
protected SculkSensorBlockEntity(BlockEntityType<?> type, BlockPos worldPosition, BlockState blockState) -
SculkSensorBlockEntity
-
-
Method Details
-
createVibrationUser
-
loadAdditional
- Overrides:
loadAdditionalin classBlockEntity
-
saveAdditional
- Overrides:
saveAdditionalin classBlockEntity
-
getVibrationData
- Specified by:
getVibrationDatain interfaceVibrationSystem
-
getVibrationUser
- Specified by:
getVibrationUserin interfaceVibrationSystem
-
getLastVibrationFrequency
public int getLastVibrationFrequency() -
setLastVibrationFrequency
public void setLastVibrationFrequency(int lastVibrationFrequency) -
getListener
- Specified by:
getListenerin interfaceGameEventListener.Provider<VibrationSystem.Listener>
-