Class CrafterBlockEntity
java.lang.Object
net.neoforged.neoforge.attachment.AttachmentHolder
net.minecraft.world.level.block.entity.BlockEntity
net.minecraft.world.level.block.entity.BaseContainerBlockEntity
net.minecraft.world.level.block.entity.RandomizableContainerBlockEntity
net.minecraft.world.level.block.entity.CrafterBlockEntity
- All Implemented Interfaces:
Clearable
,Container
,CraftingContainer
,MenuConstructor
,StackedContentsCompatible
,MenuProvider
,Nameable
,RandomizableContainer
,IAttachmentHolder
,IMenuProviderExtension
,IBlockEntityExtension
public class CrafterBlockEntity
extends RandomizableContainerBlockEntity
implements CraftingContainer
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.level.block.entity.BlockEntity
BlockEntity.ComponentHelper, BlockEntity.DataComponentInput
Nested classes/interfaces inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
AttachmentHolder.AsField
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
static final int
static final int
protected final ContainerData
private int
static final int
private NonNullList
<ItemStack> static final int
static final int
static final int
Fields inherited from class net.minecraft.world.level.block.entity.RandomizableContainerBlockEntity
lootTable, lootTableSeed
Fields inherited from class net.minecraft.world.level.block.entity.BlockEntity
level, remove, worldPosition
Fields inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
ATTACHMENTS_NBT_KEY
Fields inherited from interface net.minecraft.world.Container
DEFAULT_DISTANCE_BUFFER
Fields inherited from interface net.minecraft.world.RandomizableContainer
LOOT_TABLE_SEED_TAG, LOOT_TABLE_TAG
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate void
addDisabledSlots
(CompoundTag p_307523_) private void
addTriggered
(CompoundTag p_307675_) boolean
canPlaceItem
(int p_307543_, ItemStack p_307267_) protected AbstractContainerMenu
createMenu
(int p_307441_, Inventory p_307664_) void
fillStackedContents
(StackedContents p_307380_) int
protected Component
int
getItem
(int p_307189_) getItems()
int
int
getWidth()
boolean
isEmpty()
boolean
isSlotDisabled
(int p_307461_) boolean
protected void
loadAdditional
(CompoundTag p_307457_, HolderLookup.Provider p_324538_) protected void
saveAdditional
(CompoundTag p_307531_, HolderLookup.Provider p_324381_) static void
serverTick
(Level p_307316_, BlockPos p_307463_, BlockState p_307350_, CrafterBlockEntity p_307265_) void
setCraftingTicksRemaining
(int p_307276_) void
protected void
setItems
(NonNullList<ItemStack> p_307392_) void
setSlotState
(int p_307571_, boolean p_307624_) void
setTriggered
(boolean p_307366_) private boolean
slotCanBeDisabled
(int p_307658_) private boolean
smallerStackExist
(int p_307396_, ItemStack p_307520_, int p_307348_) boolean
stillValid
(Player p_307443_) Methods inherited from class net.minecraft.world.level.block.entity.RandomizableContainerBlockEntity
applyImplicitComponents, canOpen, collectImplicitComponents, createMenu, getLootTable, getLootTableSeed, removeComponentsFromTag, removeItem, removeItemNoUpdate, setLootTable, setLootTableSeed
Methods inherited from class net.minecraft.world.level.block.entity.BaseContainerBlockEntity
canUnlock, clearContent, getCustomName, getDisplayName, getName
Methods inherited from class net.minecraft.world.level.block.entity.BlockEntity
addEntityType, applyComponents, applyComponentsFromItemStack, clearRemoved, collectComponents, components, fillCrashReportCategory, getBlockPos, getBlockState, getLevel, getPersistentData, getPosFromTag, getType, getUpdatePacket, getUpdateTag, hasLevel, isRemoved, loadCustomOnly, loadStatic, loadWithComponents, onlyOpCanSetNbt, parseCustomNameSafe, removeData, saveCustomAndMetadata, saveCustomOnly, saveToItem, saveWithFullMetadata, saveWithId, saveWithoutMetadata, setBlockState, setChanged, setChanged, setComponents, setData, setLevel, setRemoved, triggerEvent
Methods inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
deserializeAttachments, getData, getExistingData, hasAttachments, hasData, serializeAttachments
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minecraft.world.Clearable
clearContent
Methods inherited from interface net.minecraft.world.Container
canTakeItem, countItem, getMaxStackSize, getMaxStackSize, hasAnyMatching, hasAnyOf, removeItem, removeItemNoUpdate, setChanged, startOpen, stopOpen
Methods inherited from interface net.neoforged.neoforge.attachment.IAttachmentHolder
getData, getExistingData, hasData, removeData, setData
Methods inherited from interface net.neoforged.neoforge.common.extensions.IBlockEntityExtension
getModelData, handleUpdateTag, hasCustomOutlineRendering, invalidateCapabilities, onChunkUnloaded, onDataPacket, onLoad, requestModelDataUpdate
Methods inherited from interface net.neoforged.neoforge.client.extensions.IMenuProviderExtension
shouldTriggerClientSideContainerClosingOnOpen
Methods inherited from interface net.minecraft.world.Nameable
hasCustomName
Methods inherited from interface net.minecraft.world.RandomizableContainer
getBlockPos, getLevel, setLootTable, tryLoadLootTable, trySaveLootTable, unpackLootTable
-
Field Details
-
CONTAINER_WIDTH
public static final int CONTAINER_WIDTH- See Also:
-
CONTAINER_HEIGHT
public static final int CONTAINER_HEIGHT- See Also:
-
CONTAINER_SIZE
public static final int CONTAINER_SIZE- See Also:
-
SLOT_DISABLED
public static final int SLOT_DISABLED- See Also:
-
SLOT_ENABLED
public static final int SLOT_ENABLED- See Also:
-
DATA_TRIGGERED
public static final int DATA_TRIGGERED- See Also:
-
NUM_DATA
public static final int NUM_DATA- See Also:
-
items
-
craftingTicksRemaining
private int craftingTicksRemaining -
containerData
-
-
Constructor Details
-
CrafterBlockEntity
-
-
Method Details
-
getDefaultName
- Specified by:
getDefaultName
in classBaseContainerBlockEntity
-
createMenu
- Specified by:
createMenu
in classBaseContainerBlockEntity
-
setSlotState
public void setSlotState(int p_307571_, boolean p_307624_) -
isSlotDisabled
public boolean isSlotDisabled(int p_307461_) -
canPlaceItem
- Specified by:
canPlaceItem
in interfaceContainer
-
smallerStackExist
-
loadAdditional
- Overrides:
loadAdditional
in classBaseContainerBlockEntity
-
saveAdditional
- Overrides:
saveAdditional
in classBaseContainerBlockEntity
-
getContainerSize
public int getContainerSize()- Specified by:
getContainerSize
in interfaceContainer
-
isEmpty
public boolean isEmpty()- Specified by:
isEmpty
in interfaceContainer
- Overrides:
isEmpty
in classRandomizableContainerBlockEntity
-
getItem
- Specified by:
getItem
in interfaceContainer
- Overrides:
getItem
in classRandomizableContainerBlockEntity
-
setItem
- Specified by:
setItem
in interfaceContainer
- Overrides:
setItem
in classRandomizableContainerBlockEntity
-
stillValid
- Specified by:
stillValid
in interfaceContainer
- Overrides:
stillValid
in classBaseContainerBlockEntity
-
getItems
- Specified by:
getItems
in interfaceCraftingContainer
- Specified by:
getItems
in classBaseContainerBlockEntity
-
setItems
- Specified by:
setItems
in classBaseContainerBlockEntity
-
getWidth
public int getWidth()- Specified by:
getWidth
in interfaceCraftingContainer
-
getHeight
public int getHeight()- Specified by:
getHeight
in interfaceCraftingContainer
-
fillStackedContents
- Specified by:
fillStackedContents
in interfaceStackedContentsCompatible
-
addDisabledSlots
-
addTriggered
-
setTriggered
public void setTriggered(boolean p_307366_) -
isTriggered
public boolean isTriggered() -
serverTick
public static void serverTick(Level p_307316_, BlockPos p_307463_, BlockState p_307350_, CrafterBlockEntity p_307265_) -
setCraftingTicksRemaining
public void setCraftingTicksRemaining(int p_307276_) -
getRedstoneSignal
public int getRedstoneSignal() -
slotCanBeDisabled
private boolean slotCanBeDisabled(int p_307658_)
-