Class CrafterBlockEntity
java.lang.Object
net.minecraftforge.common.capabilities.CapabilityProvider<BlockEntity>
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
,ICapabilityProvider
,ICapabilityProviderImpl<BlockEntity>
,IForgeBlockEntity
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.minecraftforge.common.capabilities.CapabilityProvider
CapabilityProvider.AsField<B extends ICapabilityProviderImpl<B>>
-
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 interface net.minecraft.world.Container
DEFAULT_DISTANCE_BUFFER
Fields inherited from interface net.minecraftforge.common.extensions.IForgeBlockEntity
INFINITE_EXTENT_AABB
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_309756_) private void
addTriggered
(CompoundTag p_312165_) boolean
canPlaceItem
(int p_311324_, ItemStack p_312777_) protected AbstractContainerMenu
createMenu
(int p_312650_, Inventory p_309858_) void
fillStackedContents
(StackedContents p_310482_) int
protected Component
int
getItem
(int p_310446_) getItems()
int
int
getWidth()
boolean
isEmpty()
boolean
isSlotDisabled
(int p_312222_) boolean
protected void
loadAdditional
(CompoundTag p_328373_, HolderLookup.Provider p_328741_) protected void
saveAdditional
(CompoundTag p_309594_, HolderLookup.Provider p_330681_) static void
serverTick
(Level p_311764_, BlockPos p_309568_, BlockState p_311393_, CrafterBlockEntity p_313070_) void
setCraftingTicksRemaining
(int p_312384_) void
protected void
setItems
(NonNullList<ItemStack> p_311420_) void
setSlotState
(int p_310046_, boolean p_310331_) void
setTriggered
(boolean p_311394_) private boolean
slotCanBeDisabled
(int p_309429_) private boolean
smallerStackExist
(int p_312152_, ItemStack p_309554_, int p_312872_) boolean
stillValid
(Player p_311318_) 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, createUnSidedHandler, getCapability, getCustomName, getDisplayName, getName, invalidateCaps, reviveCaps
Methods inherited from class net.minecraft.world.level.block.entity.BlockEntity
addEntityType, applyComponents, applyComponentsFromItemStack, clearRemoved, collectComponents, components, fillCrashReportCategory, getBlockPos, getBlockState, getLevel, getPosFromTag, getType, getUpdatePacket, getUpdateTag, hasLevel, isRemoved, loadCustomOnly, loadStatic, loadWithComponents, onChunkUnloaded, onlyOpCanSetNbt, parseCustomNameSafe, saveCustomAndMetadata, saveCustomOnly, saveToItem, saveWithFullMetadata, saveWithId, saveWithoutMetadata, setBlockState, setChanged, setChanged, setComponents, setLevel, setRemoved, triggerEvent
Methods inherited from class net.minecraftforge.common.capabilities.CapabilityProvider
areCapsCompatible, areCapsCompatible, deserializeCaps, gatherCapabilities, gatherCapabilities, gatherCapabilities, getCapabilities, serializeCaps
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.minecraftforge.common.capabilities.ICapabilityProvider
getCapability
Methods inherited from interface net.minecraftforge.common.extensions.IForgeBlockEntity
getModelData, getRenderBoundingBox, handleUpdateTag, hasCustomOutlineRendering, onDataPacket, onLoad, requestModelDataUpdate
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_310046_, boolean p_310331_) -
isSlotDisabled
public boolean isSlotDisabled(int p_312222_) -
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_311394_) -
isTriggered
public boolean isTriggered() -
serverTick
public static void serverTick(Level p_311764_, BlockPos p_309568_, BlockState p_311393_, CrafterBlockEntity p_313070_) -
setCraftingTicksRemaining
public void setCraftingTicksRemaining(int p_312384_) -
getRedstoneSignal
public int getRedstoneSignal() -
slotCanBeDisabled
private boolean slotCanBeDisabled(int p_309429_)
-