Package codechicken.multipart.trait
Class TInventoryTile
java.lang.Object
net.neoforged.neoforge.attachment.AttachmentHolder
net.minecraft.world.level.block.entity.BlockEntity
codechicken.multipart.block.TileMultipart
codechicken.multipart.trait.TInventoryTile
- All Implemented Interfaces:
codechicken.lib.world.IChunkLoadTile,net.minecraft.world.Clearable,net.minecraft.world.Container,net.minecraft.world.WorldlyContainer,net.neoforged.neoforge.attachment.IAttachmentHolder,net.neoforged.neoforge.common.extensions.IBlockEntityExtension
Created by covers1624 on 1/1/21.
-
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_KEYFields inherited from interface net.minecraft.world.Container
DEFAULT_DISTANCE_BUFFER -
Constructor Summary
ConstructorsConstructorDescriptionTInventoryTile(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) -
Method Summary
Modifier and TypeMethodDescriptionvoidBind this part to an internal cache.booleancanPlaceItemThroughFace(int slot, net.minecraft.world.item.ItemStack stack, net.minecraft.core.Direction side) booleancanTakeItemThroughFace(int slot, net.minecraft.world.item.ItemStack stack, net.minecraft.core.Direction side) voidvoidRemove all parts from internal cache.voidcopyFrom(TileMultipart that) This method should be used for copying all the data from the fields in that container tile.intnet.minecraft.world.item.ItemStackgetItem(int slot) int[]getSlotsForFace(net.minecraft.core.Direction side) booleanisEmpty()voidpartRemoved(MultiPart part, int p) Remove this part from internal cache.net.minecraft.world.item.ItemStackremoveItem(int slot, int count) net.minecraft.world.item.ItemStackremoveItemNoUpdate(int slot) voidsetItem(int slot, net.minecraft.world.item.ItemStack stack) booleanstillValid(net.minecraft.world.entity.player.Player player) Methods inherited from class codechicken.multipart.block.TileMultipart
addLandingEffects, addPart, addPart_do, addPart_impl, addRunningEffects, animateTick, attack, canAddPart, canConnectRedstone, canPlacePart, canReplacePart, dropItem, dropItems, entityInside, from, fromNBT, getBlockSupportShape, getCapability, getCapCache, getCloneStack, getCollisionShape, getDestroyProgress, getDirectSignal, getDrops, getExplosionResistance, getInteractionShape, getPartList, getRenderOcclusionShape, getShape, getSignal, getSlottedPart, getUpdateTag, getVisualShape, getWeakChanges, handleDescPacket, handleUpdateTag, harvestPart, internalPartChange, isClientTile, isUnobstructed, loadFrom, loadTo, markRender, markShapeChange, multiPartChange, notifyNeighborChange, notifyNeighborChange, notifyPartChange, notifyShapeChange, notifyTileChange, occlusionTest, onChunkLoad, onChunkUnloaded, onMoved, onNeighborBlockChanged, onNeighborTileChange, onRemoved, operate, partAdded, recalcLight, remPart, remPart_impl, replaceable, saveAdditional, setChanged, setLevel, setRemoved, setValid, stepOn, tile, updateLight, useItemOn, useWithoutItem, writeDescMethods 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, getUpdatePacket, hasLevel, isRemoved, isValidBlockState, loadAdditional, loadCustomOnly, loadStatic, loadWithComponents, onlyOpCanSetNbt, parseCustomNameSafe, removeComponentsFromTag, removeData, saveCustomAndMetadata, saveCustomOnly, saveToItem, saveWithFullMetadata, saveWithId, saveWithoutMetadata, setBlockState, setChanged, setComponents, setData, triggerEventMethods inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
deserializeAttachments, getData, getExistingData, hasAttachments, hasData, serializeAttachmentsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.world.Container
canPlaceItem, canTakeItem, countItem, getMaxStackSize, getMaxStackSize, hasAnyMatching, hasAnyOf, setChanged, startOpen, stopOpenMethods inherited from interface net.neoforged.neoforge.attachment.IAttachmentHolder
getData, getExistingData, hasData, removeData, setDataMethods inherited from interface net.neoforged.neoforge.common.extensions.IBlockEntityExtension
getModelData, hasCustomOutlineRendering, invalidateCapabilities, onDataPacket, onLoad, requestModelDataUpdate
-
Constructor Details
-
TInventoryTile
public TInventoryTile(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state)
-
-
Method Details
-
copyFrom
Description copied from class:TileMultipartThis method should be used for copying all the data from the fields in that container tile. This method will be automatically generated on java tile traits with fields if it is not overridden.- Overrides:
copyFromin classTileMultipart
-
bindPart
Description copied from class:TileMultipartBind this part to an internal cache.Provided for trait overrides, do not call externally.
- Overrides:
bindPartin classTileMultipart
-
partRemoved
Description copied from class:TileMultipartRemove this part from internal cache.Provided for trait overrides, do not call externally.
- Overrides:
partRemovedin classTileMultipart
-
clearParts
public void clearParts()Description copied from class:TileMultipartRemove all parts from internal cache.Provided for trait overrides, do not call externally.
- Overrides:
clearPartsin classTileMultipart
-
clearContent
public void clearContent()- Specified by:
clearContentin interfacenet.minecraft.world.Clearable
-
getContainerSize
public int getContainerSize()- Specified by:
getContainerSizein interfacenet.minecraft.world.Container
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfacenet.minecraft.world.Container
-
getItem
public net.minecraft.world.item.ItemStack getItem(int slot) - Specified by:
getItemin interfacenet.minecraft.world.Container
-
removeItem
public net.minecraft.world.item.ItemStack removeItem(int slot, int count) - Specified by:
removeItemin interfacenet.minecraft.world.Container
-
removeItemNoUpdate
public net.minecraft.world.item.ItemStack removeItemNoUpdate(int slot) - Specified by:
removeItemNoUpdatein interfacenet.minecraft.world.Container
-
setItem
public void setItem(int slot, net.minecraft.world.item.ItemStack stack) - Specified by:
setItemin interfacenet.minecraft.world.Container
-
getSlotsForFace
public int[] getSlotsForFace(net.minecraft.core.Direction side) - Specified by:
getSlotsForFacein interfacenet.minecraft.world.WorldlyContainer
-
canPlaceItemThroughFace
public boolean canPlaceItemThroughFace(int slot, net.minecraft.world.item.ItemStack stack, @Nullable net.minecraft.core.Direction side) - Specified by:
canPlaceItemThroughFacein interfacenet.minecraft.world.WorldlyContainer
-
canTakeItemThroughFace
public boolean canTakeItemThroughFace(int slot, net.minecraft.world.item.ItemStack stack, net.minecraft.core.Direction side) - Specified by:
canTakeItemThroughFacein interfacenet.minecraft.world.WorldlyContainer
-
stillValid
public boolean stillValid(net.minecraft.world.entity.player.Player player) - Specified by:
stillValidin interfacenet.minecraft.world.Container
-