Class LodestoneBlockEntity
java.lang.Object
net.neoforged.neoforge.attachment.AttachmentHolder
net.minecraft.world.level.block.entity.BlockEntity
team.lodestar.lodestone.systems.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(net.minecraft.world.level.block.entity.BlockEntityType<?> type, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) -
Method Summary
Modifier and TypeMethodDescriptionvoidclientTick(net.minecraft.world.level.Level level) voidcommonTick(net.minecraft.world.level.Level level) 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()voidtick()Deprecated.voidupdate(net.minecraft.world.level.Level level) A method designed to run anytime substantial changes to the entity are made.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, 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(net.minecraft.world.level.block.entity.BlockEntityType<?> type, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state)
-
-
Method Details
-
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) -
update
public void update(@Nonnull net.minecraft.world.level.Level level) A method designed to run anytime substantial changes to the entity are made. Called the tick after the entity is updated from the server to the client, or loaded from memory -
serverTick
public void serverTick(net.minecraft.server.level.ServerLevel level) -
clientTick
public void clientTick(net.minecraft.world.level.Level level) -
tick
Deprecated. -
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()
-