Class InventoryAttachment
java.lang.Object
dev.latvian.mods.kubejs.block.entity.InventoryAttachment
- All Implemented Interfaces:
BlockEntityAttachment
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordstatic class -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal KubeBlockEntityfinal intfinal ItemPredicatestatic final BlockEntityAttachmentTypefinal int -
Constructor Summary
ConstructorsConstructorDescriptionInventoryAttachment(KubeBlockEntity blockEntity, int width, int height, @Nullable ItemPredicate inputFilter) -
Method Summary
Modifier and TypeMethodDescriptionprotected InventoryAttachment.Wrappedvoiddeserialize(net.minecraft.core.HolderLookup.Provider registries, net.minecraft.nbt.Tag tag) <CAP,SRC> CAP getCapability(net.neoforged.neoforge.capabilities.BlockCapability<CAP, SRC> capability) voidonRemove(net.minecraft.server.level.ServerLevel level, KubeBlockEntity blockEntity, net.minecraft.world.level.block.state.BlockState newState) net.minecraft.nbt.ListTagserialize(net.minecraft.core.HolderLookup.Provider registries) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface dev.latvian.mods.kubejs.block.entity.BlockEntityAttachment
serverTick
-
Field Details
-
TYPE
-
width
public final int width -
height
public final int height -
blockEntity
-
inputFilter
-
inventory
-
-
Constructor Details
-
InventoryAttachment
public InventoryAttachment(KubeBlockEntity blockEntity, int width, int height, @Nullable @Nullable ItemPredicate inputFilter)
-
-
Method Details
-
createInventory
-
getWrappedObject
- Specified by:
getWrappedObjectin interfaceBlockEntityAttachment
-
getCapability
@Nullable public <CAP,SRC> CAP getCapability(net.neoforged.neoforge.capabilities.BlockCapability<CAP, SRC> capability) - Specified by:
getCapabilityin interfaceBlockEntityAttachment
-
serialize
public net.minecraft.nbt.ListTag serialize(net.minecraft.core.HolderLookup.Provider registries) - Specified by:
serializein interfaceBlockEntityAttachment
-
deserialize
public void deserialize(net.minecraft.core.HolderLookup.Provider registries, net.minecraft.nbt.Tag tag) - Specified by:
deserializein interfaceBlockEntityAttachment
-
onRemove
public void onRemove(net.minecraft.server.level.ServerLevel level, KubeBlockEntity blockEntity, net.minecraft.world.level.block.state.BlockState newState) - Specified by:
onRemovein interfaceBlockEntityAttachment
-