Class LodestoneBlockEntity
java.lang.Object
net.neoforged.neoforge.attachment.AttachmentHolder
net.minecraft.world.level.block.entity.BlockEntity
team.lodestar.lodestone.modules.toolkit.blockentity.LodestoneBlockEntity
- All Implemented Interfaces:
net.neoforged.neoforge.attachment.IAttachmentHolder,net.neoforged.neoforge.common.extensions.IBlockEntityExtension
- Direct Known Subclasses:
ItemHolderBlockEntity,MultiBlockComponentEntity,MultiBlockCoreEntity
public class LodestoneBlockEntity
extends net.minecraft.world.level.block.entity.BlockEntity
A simple block entity with various methods normally found inside of Block delegated here from
LodestoneEntityBlock-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.level.block.entity.BlockEntity
net.minecraft.world.level.block.entity.BlockEntity.DataComponentInputNested classes/interfaces inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
net.neoforged.neoforge.attachment.AttachmentHolder.AsField -
Field Summary
Fields inherited from class net.minecraft.world.level.block.entity.BlockEntity
level, remove, worldPositionFields inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
ATTACHMENTS_NBT_KEY -
Constructor Summary
ConstructorsConstructorDescriptionLodestoneBlockEntity(LodestoneBlockEntityType<?> type, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) -
Method Summary
Modifier and TypeMethodDescriptionfinal voidattachTicker(@Nullable LodestoneBlockEntityTicker.BlockEntityTickerAttachment ticker) voidclientTick(net.minecraft.world.level.Level level) voidcommonTick(net.minecraft.world.level.Level level) getType()net.minecraft.network.protocol.game.ClientboundBlockEntityDataPacketnet.minecraft.nbt.CompoundTaggetUpdateTag(net.minecraft.core.HolderLookup.Provider pRegistries) voidvoidonBreak(@Nullable net.minecraft.world.entity.player.Player player) net.minecraft.world.item.ItemStackonClone(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.phys.HitResult target, net.minecraft.world.level.BlockGetter level, net.minecraft.core.BlockPos pos, net.minecraft.world.entity.player.Player player) voidonEntityInside(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.entity.Entity entity) voidonNeighborUpdate(net.minecraft.world.level.block.state.BlockState state, net.minecraft.core.BlockPos pos, net.minecraft.core.BlockPos neighbor) voidonPlace(net.minecraft.world.entity.LivingEntity placer, net.minecraft.world.item.ItemStack stack) net.minecraft.world.ItemInteractionResultonUse(net.minecraft.world.entity.player.Player pPlayer, net.minecraft.world.InteractionHand pHand) net.minecraft.world.ItemInteractionResultonUseWithItem(net.minecraft.world.entity.player.Player pPlayer, net.minecraft.world.item.ItemStack pStack, net.minecraft.world.InteractionHand pHand) net.minecraft.world.InteractionResultonUseWithoutItem(net.minecraft.world.entity.player.Player pPlayer) voidplaySound(net.minecraft.sounds.SoundEvent soundEvent) voidplaySound(net.minecraft.sounds.SoundEvent soundEvent, float volume) voidplaySound(net.minecraft.sounds.SoundEvent soundEvent, float volume, float pitch) voidserverTick(net.minecraft.server.level.ServerLevel level) voidsetDirty()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, hasLevel, isRemoved, isValidBlockState, loadAdditional, loadCustomOnly, loadStatic, loadWithComponents, onlyOpCanSetNbt, parseCustomNameSafe, removeComponentsFromTag, removeData, saveAdditional, saveCustomAndMetadata, saveCustomOnly, saveToItem, saveWithFullMetadata, saveWithId, saveWithoutMetadata, setBlockState, setChanged, setChanged, setComponents, setData, setLevel, setRemoved, syncData, triggerEventMethods inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
deserializeAttachments, getData, getExistingDataOrNull, hasAttachments, hasData, serializeAttachmentsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.neoforged.neoforge.attachment.IAttachmentHolder
getData, getExistingData, getExistingData, getExistingDataOrNull, hasData, removeData, setData, syncDataMethods inherited from interface net.neoforged.neoforge.common.extensions.IBlockEntityExtension
getModelData, handleUpdateTag, hasCustomOutlineRendering, invalidateCapabilities, onChunkUnloaded, onDataPacket, onLoad, requestModelDataUpdate
-
Constructor Details
-
LodestoneBlockEntity
public LodestoneBlockEntity(LodestoneBlockEntityType<?> type, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state)
-
-
Method Details
-
attachTicker
public final void attachTicker(@Nullable @Nullable LodestoneBlockEntityTicker.BlockEntityTickerAttachment ticker) -
getType
- Overrides:
getTypein classnet.minecraft.world.level.block.entity.BlockEntity
-
getUpdateTag
public net.minecraft.nbt.CompoundTag getUpdateTag(net.minecraft.core.HolderLookup.Provider pRegistries) - Overrides:
getUpdateTagin classnet.minecraft.world.level.block.entity.BlockEntity
-
getUpdatePacket
public net.minecraft.network.protocol.game.ClientboundBlockEntityDataPacket getUpdatePacket()- Overrides:
getUpdatePacketin classnet.minecraft.world.level.block.entity.BlockEntity
-
onBreak
public void onBreak(@Nullable @Nullable net.minecraft.world.entity.player.Player player) -
onPlace
public void onPlace(net.minecraft.world.entity.LivingEntity placer, net.minecraft.world.item.ItemStack stack) -
onNeighborUpdate
public void onNeighborUpdate(net.minecraft.world.level.block.state.BlockState state, net.minecraft.core.BlockPos pos, net.minecraft.core.BlockPos neighbor) -
onClone
public net.minecraft.world.item.ItemStack onClone(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.phys.HitResult target, net.minecraft.world.level.BlockGetter level, net.minecraft.core.BlockPos pos, net.minecraft.world.entity.player.Player player) -
onUse
public net.minecraft.world.ItemInteractionResult onUse(net.minecraft.world.entity.player.Player pPlayer, net.minecraft.world.InteractionHand pHand) -
onUseWithoutItem
public net.minecraft.world.InteractionResult onUseWithoutItem(net.minecraft.world.entity.player.Player pPlayer) -
onUseWithItem
public net.minecraft.world.ItemInteractionResult onUseWithItem(net.minecraft.world.entity.player.Player pPlayer, net.minecraft.world.item.ItemStack pStack, net.minecraft.world.InteractionHand pHand) -
onEntityInside
public void onEntityInside(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.entity.Entity entity) -
serverTick
public void serverTick(net.minecraft.server.level.ServerLevel level) -
clientTick
public void clientTick(net.minecraft.world.level.Level level) -
commonTick
public void commonTick(net.minecraft.world.level.Level level) -
playSound
public void playSound(net.minecraft.sounds.SoundEvent soundEvent) -
playSound
public void playSound(net.minecraft.sounds.SoundEvent soundEvent, float volume) -
playSound
public void playSound(net.minecraft.sounds.SoundEvent soundEvent, float volume, float pitch) -
setDirty
public void setDirty() -
notifyObservers
public void notifyObservers()
-