Class KubeBlockEntity
java.lang.Object
net.neoforged.neoforge.attachment.AttachmentHolder
net.minecraft.world.level.block.entity.BlockEntity
dev.latvian.mods.kubejs.block.entity.KubeBlockEntity
- All Implemented Interfaces:
net.neoforged.neoforge.attachment.IAttachmentHolder,net.neoforged.neoforge.common.extensions.IBlockEntityExtension
public class KubeBlockEntity
extends net.minecraft.world.level.block.entity.BlockEntity
-
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
FieldsModifier and TypeFieldDescriptionfinal BlockEntityAttachmentHolder[]protected LevelBlockfinal net.minecraft.resources.ResourceKey<net.minecraft.world.level.block.Block> intnet.minecraft.nbt.CompoundTagfinal BlockEntityInfointstatic final net.minecraft.world.level.block.entity.BlockEntityTicker<KubeBlockEntity> final intfinal intfinal intFields 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
ConstructorsConstructorDescriptionKubeBlockEntity(net.minecraft.core.BlockPos blockPos, net.minecraft.world.level.block.state.BlockState blockState, BlockEntityInfo entityInfo) -
Method Summary
Modifier and TypeMethodDescriptiongetBlock()@Nullable net.minecraft.world.entity.Entity@Nullable net.minecraft.network.protocol.Packet<net.minecraft.network.protocol.game.ClientGamePacketListener> net.minecraft.nbt.CompoundTaggetUpdateTag(net.minecraft.core.HolderLookup.Provider provider) voidloadAdditional(net.minecraft.nbt.CompoundTag tag, net.minecraft.core.HolderLookup.Provider registries) voidsave()protected voidsaveAdditional(net.minecraft.nbt.CompoundTag tag, net.minecraft.core.HolderLookup.Provider registries) voidsendEvent(int eventId, int data) voidsetLevel(net.minecraft.world.level.Level level) voidsync()booleantriggerEvent(int eventId, int data) 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, loadCustomOnly, loadStatic, loadWithComponents, onlyOpCanSetNbt, parseCustomNameSafe, removeComponentsFromTag, removeData, saveCustomAndMetadata, saveCustomOnly, saveToItem, saveWithFullMetadata, saveWithId, saveWithoutMetadata, setBlockState, setChanged, setChanged, setComponents, setData, setRemoved, syncDataMethods 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
-
Field Details
-
TICKER
public static final net.minecraft.world.level.block.entity.BlockEntityTicker<KubeBlockEntity> TICKER -
info
-
blockKey
public final net.minecraft.resources.ResourceKey<net.minecraft.world.level.block.Block> blockKey -
block
-
x
public final int x -
y
public final int y -
z
public final int z -
tick
public int tick -
cycle
public int cycle -
data
public net.minecraft.nbt.CompoundTag data -
attachments
-
attachmentArray
-
placerId
-
-
Constructor Details
-
KubeBlockEntity
public KubeBlockEntity(net.minecraft.core.BlockPos blockPos, net.minecraft.world.level.block.state.BlockState blockState, BlockEntityInfo entityInfo)
-
-
Method Details
-
setLevel
public void setLevel(net.minecraft.world.level.Level level) - Overrides:
setLevelin classnet.minecraft.world.level.block.entity.BlockEntity
-
saveAdditional
protected void saveAdditional(net.minecraft.nbt.CompoundTag tag, net.minecraft.core.HolderLookup.Provider registries) - Overrides:
saveAdditionalin classnet.minecraft.world.level.block.entity.BlockEntity
-
loadAdditional
public void loadAdditional(net.minecraft.nbt.CompoundTag tag, net.minecraft.core.HolderLookup.Provider registries) - Overrides:
loadAdditionalin classnet.minecraft.world.level.block.entity.BlockEntity
-
getUpdateTag
public net.minecraft.nbt.CompoundTag getUpdateTag(net.minecraft.core.HolderLookup.Provider provider) - Overrides:
getUpdateTagin classnet.minecraft.world.level.block.entity.BlockEntity
-
getUpdatePacket
@Nullable public @Nullable net.minecraft.network.protocol.Packet<net.minecraft.network.protocol.game.ClientGamePacketListener> getUpdatePacket()- Overrides:
getUpdatePacketin classnet.minecraft.world.level.block.entity.BlockEntity
-
save
public void save() -
sync
public void sync() -
sendEvent
public void sendEvent(int eventId, int data) -
triggerEvent
public boolean triggerEvent(int eventId, int data) - Overrides:
triggerEventin classnet.minecraft.world.level.block.entity.BlockEntity
-
getBlock
-
getPlacer
@Nullable public @Nullable net.minecraft.world.entity.Entity getPlacer()
-