Class CrafterBlockEntity
- All Implemented Interfaces:
Inventory,LootableInventory,RecipeInputInventory,RecipeInputProvider,NamedScreenHandlerFactory,ScreenHandlerFactory,Clearable,Nameable
- Mappings:
Namespace Name named net/minecraft/block/entity/CrafterBlockEntityintermediary net/minecraft/class_8887official dqv
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.block.entity.BlockEntity
BlockEntity.ComponentsAccess -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intstatic final intstatic final intstatic final intprivate DefaultedList<ItemStack> static final intprotected final PropertyDelegatestatic final intstatic final intstatic final intFields inherited from class net.minecraft.block.entity.LootableContainerBlockEntity
lootTable, lootTableSeedFields inherited from class net.minecraft.block.entity.BlockEntity
pos, removed, worldFields inherited from interface net.minecraft.inventory.Inventory
DEFAULT_MAX_INTERACTION_RANGEFields inherited from interface net.minecraft.inventory.LootableInventory
LOOT_TABLE_KEY, LOOT_TABLE_SEED_KEY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate booleanbetterSlotExists(int count, ItemStack stack, int slot) booleancanPlayerUse(PlayerEntity player) Returns whetherplayercan use this inventory.private booleancanToggleSlot(int slot) protected ScreenHandlercreateScreenHandler(int syncId, PlayerInventory playerInventory) intprotected TextintReturns the height of the recipe grid.Returns the stacks held by the inventory.getStack(int slot) Returns the stack currently stored atslot.intgetWidth()Returns the width of the recipe grid.booleanisEmpty()Returns whether the inventory consists entirely of empty item stacks.booleanisSlotDisabled(int slot) booleanbooleanReturns whetherstackis valid for theslot.voidprovideRecipeInputs(RecipeMatcher finder) private voidprivate voidputTriggered(NbtCompound nbt) protected voidreadNbt(NbtCompound nbt, RegistryWrapper.WrapperLookup registryLookup) Reads data fromnbt.voidsetCraftingTicksRemaining(int craftingTicksRemaining) protected voidsetHeldStacks(DefaultedList<ItemStack> inventory) voidsetSlotEnabled(int slot, boolean enabled) voidSets the stack stored atslottostack.voidsetTriggered(boolean triggered) intsize()Returns the size of the inventory.static voidtickCrafting(World world, BlockPos pos, BlockState state, CrafterBlockEntity blockEntity) protected voidwriteNbt(NbtCompound nbt, RegistryWrapper.WrapperLookup registryLookup) Writes data tonbt.Methods inherited from class net.minecraft.block.entity.LootableContainerBlockEntity
addComponents, checkUnlocked, createMenu, getLootTable, getLootTableSeed, readComponents, removeFromCopiedStackNbt, removeStack, removeStack, setLootTable, setLootTableSeedMethods inherited from class net.minecraft.block.entity.LockableContainerBlockEntity
checkUnlocked, clear, getCustomName, getDisplayName, getNameMethods inherited from class net.minecraft.block.entity.BlockEntity
cancelRemoval, copyItemDataRequiresOperator, createComponentlessNbt, createComponentlessNbtWithIdentifyingData, createComponentMap, createFromNbt, createNbt, createNbtWithId, createNbtWithIdentifyingData, getCachedState, getComponents, getPos, getType, getWorld, hasWorld, isRemoved, markDirty, markDirty, markRemoved, onSyncedBlockEvent, populateCrashReport, posFromNbt, read, readComponentlessNbt, readComponents, readComponents, setCachedState, setComponents, setStackNbt, setWorld, toInitialChunkDataNbt, toUpdatePacket, tryParseCustomName, writeIdToNbtMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.inventory.Inventory
canTransferTo, containsAny, containsAny, count, getMaxCount, getMaxCountPerStack, markDirty, onClose, onOpen, removeStack, removeStackMethods inherited from interface net.minecraft.inventory.LootableInventory
generateLoot, getPos, getWorld, readLootTable, setLootTable, writeLootTableMethods inherited from interface net.minecraft.util.Nameable
hasCustomNameMethods inherited from interface net.minecraft.inventory.RecipeInputInventory
createPositionedRecipeInput, createRecipeInput
-
Field Details
-
GRID_WIDTH
public static final int GRID_WIDTH- See Also:
- Mappings:
Namespace Name Mixin selector named GRID_WIDTHLnet/minecraft/block/entity/CrafterBlockEntity;GRID_WIDTH:Iintermediary field_46809Lnet/minecraft/class_8887;field_46809:Iofficial dLdqv;d:I
-
GRID_HEIGHT
public static final int GRID_HEIGHT- See Also:
- Mappings:
Namespace Name Mixin selector named GRID_HEIGHTLnet/minecraft/block/entity/CrafterBlockEntity;GRID_HEIGHT:Iintermediary field_46810Lnet/minecraft/class_8887;field_46810:Iofficial eLdqv;e:I
-
GRID_SIZE
public static final int GRID_SIZE- See Also:
- Mappings:
Namespace Name Mixin selector named GRID_SIZELnet/minecraft/block/entity/CrafterBlockEntity;GRID_SIZE:Iintermediary field_46811Lnet/minecraft/class_8887;field_46811:Iofficial fLdqv;f:I
-
SLOT_DISABLED
public static final int SLOT_DISABLED- See Also:
- Mappings:
Namespace Name Mixin selector named SLOT_DISABLEDLnet/minecraft/block/entity/CrafterBlockEntity;SLOT_DISABLED:Iintermediary field_46812Lnet/minecraft/class_8887;field_46812:Iofficial gLdqv;g:I
-
SLOT_ENABLED
public static final int SLOT_ENABLED- See Also:
- Mappings:
Namespace Name Mixin selector named SLOT_ENABLEDLnet/minecraft/block/entity/CrafterBlockEntity;SLOT_ENABLED:Iintermediary field_46813Lnet/minecraft/class_8887;field_46813:Iofficial hLdqv;h:I
-
TRIGGERED_PROPERTY
public static final int TRIGGERED_PROPERTY- See Also:
- Mappings:
Namespace Name Mixin selector named TRIGGERED_PROPERTYLnet/minecraft/block/entity/CrafterBlockEntity;TRIGGERED_PROPERTY:Iintermediary field_46814Lnet/minecraft/class_8887;field_46814:Iofficial iLdqv;i:I
-
PROPERTIES_COUNT
public static final int PROPERTIES_COUNT- See Also:
- Mappings:
Namespace Name Mixin selector named PROPERTIES_COUNTLnet/minecraft/block/entity/CrafterBlockEntity;PROPERTIES_COUNT:Iintermediary field_46815Lnet/minecraft/class_8887;field_46815:Iofficial jLdqv;j:I
-
inputStacks
- Mappings:
Namespace Name Mixin selector named inputStacksLnet/minecraft/block/entity/CrafterBlockEntity;inputStacks:Lnet/minecraft/util/collection/DefaultedList;intermediary field_46817Lnet/minecraft/class_8887;field_46817:Lnet/minecraft/class_2371;official qLdqv;q:Ljv;
-
craftingTicksRemaining
private int craftingTicksRemaining- Mappings:
Namespace Name Mixin selector named craftingTicksRemainingLnet/minecraft/block/entity/CrafterBlockEntity;craftingTicksRemaining:Iintermediary field_46818Lnet/minecraft/class_8887;field_46818:Iofficial rLdqv;r:I
-
propertyDelegate
- Mappings:
Namespace Name Mixin selector named propertyDelegateLnet/minecraft/block/entity/CrafterBlockEntity;propertyDelegate:Lnet/minecraft/screen/PropertyDelegate;intermediary field_46816Lnet/minecraft/class_8887;field_46816:Lnet/minecraft/class_3913;official kLdqv;k:Lcqf;
-
-
Constructor Details
-
CrafterBlockEntity
- Mappings:
Namespace Name Mixin selector named <init>Lnet/minecraft/block/entity/CrafterBlockEntity;<init>(Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)Vintermediary <init>Lnet/minecraft/class_8887;<init>(Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;)Vofficial <init>Ldqv;<init>(Ljd;Ldtc;)V
-
-
Method Details
-
getContainerName
- Specified by:
getContainerNamein classLockableContainerBlockEntity- Mappings:
Namespace Name Mixin selector named getContainerNameLnet/minecraft/block/entity/LockableContainerBlockEntity;getContainerName()Lnet/minecraft/text/Text;intermediary method_17823Lnet/minecraft/class_2624;method_17823()Lnet/minecraft/class_2561;official kLdqb;k()Lwz;
-
createScreenHandler
- Specified by:
createScreenHandlerin classLockableContainerBlockEntity- Mappings:
Namespace Name Mixin selector named createScreenHandlerLnet/minecraft/block/entity/LockableContainerBlockEntity;createScreenHandler(ILnet/minecraft/entity/player/PlayerInventory;)Lnet/minecraft/screen/ScreenHandler;intermediary method_5465Lnet/minecraft/class_2624;method_5465(ILnet/minecraft/class_1661;)Lnet/minecraft/class_1703;official aLdqb;a(ILcmw;)Lcpu;
-
setSlotEnabled
public void setSlotEnabled(int slot, boolean enabled) - Mappings:
Namespace Name Mixin selector named setSlotEnabledLnet/minecraft/block/entity/CrafterBlockEntity;setSlotEnabled(IZ)Vintermediary method_54480Lnet/minecraft/class_8887;method_54480(IZ)Vofficial aLdqv;a(IZ)V
-
isSlotDisabled
public boolean isSlotDisabled(int slot) - Mappings:
Namespace Name Mixin selector named isSlotDisabledLnet/minecraft/block/entity/CrafterBlockEntity;isSlotDisabled(I)Zintermediary method_54483Lnet/minecraft/class_8887;method_54483(I)Zofficial cLdqv;c(I)Z
-
isValid
Returns whetherstackis valid for theslot.Implementations can, for example, use this to check whether the item is in a specific tag. This returns
trueby default.- Specified by:
isValidin interfaceInventory- Returns:
- whether
stackis valid for theslot - Mappings:
Namespace Name Mixin selector named isValidLnet/minecraft/inventory/Inventory;isValid(ILnet/minecraft/item/ItemStack;)Zintermediary method_5437Lnet/minecraft/class_1263;method_5437(ILnet/minecraft/class_1799;)Zofficial bLbqk;b(ILcuq;)Z
-
betterSlotExists
- Mappings:
Namespace Name Mixin selector named betterSlotExistsLnet/minecraft/block/entity/CrafterBlockEntity;betterSlotExists(ILnet/minecraft/item/ItemStack;I)Zintermediary method_54479Lnet/minecraft/class_8887;method_54479(ILnet/minecraft/class_1799;I)Zofficial aLdqv;a(ILcuq;I)Z
-
readNbt
Reads data fromnbt. Subclasses should override this if they store a persistent data.NBT is a storage format; therefore, a data from NBT is loaded to a block entity instance's fields, which are used for other operations instead of the NBT. The data is written back to NBT when saving the block entity.
nbtmight not have all expected keys, or might have a key whose value does not meet the requirement (such as the type or the range). This method should fall back to a reasonable default value instead of throwing an exception.- Overrides:
readNbtin classLockableContainerBlockEntity- See Also:
- Mappings:
Namespace Name Mixin selector named readNbtLnet/minecraft/block/entity/BlockEntity;readNbt(Lnet/minecraft/nbt/NbtCompound;Lnet/minecraft/registry/RegistryWrapper$WrapperLookup;)Vintermediary method_11014Lnet/minecraft/class_2586;method_11014(Lnet/minecraft/class_2487;Lnet/minecraft/class_7225$class_7874;)Vofficial aLdqh;a(Lub;Ljo$a;)V
-
writeNbt
Writes data tonbt. Subclasses should override this if they store a persistent data.NBT is a storage format; therefore, a data from NBT is loaded to a block entity instance's fields, which are used for other operations instead of the NBT. The data is written back to NBT when saving the block entity.
- Overrides:
writeNbtin classLockableContainerBlockEntity- See Also:
- Mappings:
Namespace Name Mixin selector named writeNbtLnet/minecraft/block/entity/BlockEntity;writeNbt(Lnet/minecraft/nbt/NbtCompound;Lnet/minecraft/registry/RegistryWrapper$WrapperLookup;)Vintermediary method_11007Lnet/minecraft/class_2586;method_11007(Lnet/minecraft/class_2487;Lnet/minecraft/class_7225$class_7874;)Vofficial bLdqh;b(Lub;Ljo$a;)V
-
size
public int size()Returns the size of the inventory.The inventory should support the slot ID from
0tosize() - 1. This should remain constant throughout the inventory's lifetime. -
isEmpty
public boolean isEmpty()Returns whether the inventory consists entirely of empty item stacks.- Specified by:
isEmptyin interfaceInventory- Overrides:
isEmptyin classLootableContainerBlockEntity- Returns:
- whether the inventory consists entirely of empty item stacks
- Mappings:
Namespace Name Mixin selector named isEmptyLnet/minecraft/inventory/Inventory;isEmpty()Zintermediary method_5442Lnet/minecraft/class_1263;method_5442()Zofficial cLbqk;c()Z
-
getStack
Returns the stack currently stored atslot.If the slot is empty, or is outside the bounds of this inventory, this returns
ItemStack.EMPTY.- Specified by:
getStackin interfaceInventory- Overrides:
getStackin classLootableContainerBlockEntity- Returns:
- the stack currently stored at
slot - Mappings:
Namespace Name Mixin selector named getStackLnet/minecraft/inventory/Inventory;getStack(I)Lnet/minecraft/item/ItemStack;intermediary method_5438Lnet/minecraft/class_1263;method_5438(I)Lnet/minecraft/class_1799;official aLbqk;a(I)Lcuq;
-
setStack
Sets the stack stored atslottostack.- Specified by:
setStackin interfaceInventory- Overrides:
setStackin classLootableContainerBlockEntity- Mappings:
Namespace Name Mixin selector named setStackLnet/minecraft/inventory/Inventory;setStack(ILnet/minecraft/item/ItemStack;)Vintermediary method_5447Lnet/minecraft/class_1263;method_5447(ILnet/minecraft/class_1799;)Vofficial aLbqk;a(ILcuq;)V
-
canPlayerUse
Returns whetherplayercan use this inventory.This is called by
ScreenHandler.canUse(net.minecraft.screen.ScreenHandlerContext, net.minecraft.entity.player.PlayerEntity, net.minecraft.block.Block).- Specified by:
canPlayerUsein interfaceInventory- Overrides:
canPlayerUsein classLockableContainerBlockEntity- Returns:
- whether
playercan use this inventory - See Also:
- API Note:
- Implementations should check the distance between the inventory
holder and
player. For convenience, this interface offers two methods used by block entities to implement this check. - Mappings:
Namespace Name Mixin selector named canPlayerUseLnet/minecraft/inventory/Inventory;canPlayerUse(Lnet/minecraft/entity/player/PlayerEntity;)Zintermediary method_5443Lnet/minecraft/class_1263;method_5443(Lnet/minecraft/class_1657;)Zofficial aLbqk;a(Lcmx;)Z
-
getHeldStacks
Description copied from interface:RecipeInputInventoryReturns the stacks held by the inventory.- Specified by:
getHeldStacksin interfaceRecipeInputInventory- Specified by:
getHeldStacksin classLockableContainerBlockEntity- Returns:
- the stacks held by the inventory
- Mappings:
Namespace Name Mixin selector named getHeldStacksLnet/minecraft/block/entity/CrafterBlockEntity;getHeldStacks()Lnet/minecraft/util/collection/DefaultedList;intermediary method_11282Lnet/minecraft/class_8887;method_11282()Lnet/minecraft/class_2371;official method_11282Ldqv;method_11282()Ljv;
-
setHeldStacks
- Specified by:
setHeldStacksin classLockableContainerBlockEntity- Mappings:
Namespace Name Mixin selector named setHeldStacksLnet/minecraft/block/entity/LockableContainerBlockEntity;setHeldStacks(Lnet/minecraft/util/collection/DefaultedList;)Vintermediary method_11281Lnet/minecraft/class_2624;method_11281(Lnet/minecraft/class_2371;)Vofficial aLdqb;a(Ljv;)V
-
getWidth
public int getWidth()Returns the width of the recipe grid.- Specified by:
getWidthin interfaceRecipeInputInventory- Returns:
- the width of the recipe grid
- Mappings:
Namespace Name Mixin selector named getWidthLnet/minecraft/inventory/RecipeInputInventory;getWidth()Iintermediary method_17398Lnet/minecraft/class_8566;method_17398()Iofficial fLcql;f()I
-
getHeight
public int getHeight()Returns the height of the recipe grid.- Specified by:
getHeightin interfaceRecipeInputInventory- Returns:
- the height of the recipe grid
- Mappings:
Namespace Name Mixin selector named getHeightLnet/minecraft/inventory/RecipeInputInventory;getHeight()Iintermediary method_17397Lnet/minecraft/class_8566;method_17397()Iofficial gLcql;g()I
-
provideRecipeInputs
- Specified by:
provideRecipeInputsin interfaceRecipeInputProvider- Mappings:
Namespace Name Mixin selector named provideRecipeInputsLnet/minecraft/recipe/RecipeInputProvider;provideRecipeInputs(Lnet/minecraft/recipe/RecipeMatcher;)Vintermediary method_7683Lnet/minecraft/class_1737;method_7683(Lnet/minecraft/class_1662;)Vofficial aLcrv;a(Lcnb;)V
-
putDisabledSlots
- Mappings:
Namespace Name Mixin selector named putDisabledSlotsLnet/minecraft/block/entity/CrafterBlockEntity;putDisabledSlots(Lnet/minecraft/nbt/NbtCompound;)Vintermediary method_54486Lnet/minecraft/class_8887;method_54486(Lnet/minecraft/class_2487;)Vofficial cLdqv;c(Lub;)V
-
putTriggered
- Mappings:
Namespace Name Mixin selector named putTriggeredLnet/minecraft/block/entity/CrafterBlockEntity;putTriggered(Lnet/minecraft/nbt/NbtCompound;)Vintermediary method_54487Lnet/minecraft/class_8887;method_54487(Lnet/minecraft/class_2487;)Vofficial dLdqv;d(Lub;)V
-
setTriggered
public void setTriggered(boolean triggered) - Mappings:
Namespace Name Mixin selector named setTriggeredLnet/minecraft/block/entity/CrafterBlockEntity;setTriggered(Z)Vintermediary method_54482Lnet/minecraft/class_8887;method_54482(Z)Vofficial aLdqv;a(Z)V
-
isTriggered
public boolean isTriggered()- Mappings:
Namespace Name Mixin selector named isTriggeredLnet/minecraft/block/entity/CrafterBlockEntity;isTriggered()Zintermediary method_54488Lnet/minecraft/class_8887;method_54488()Zofficial lLdqv;l()Z
-
tickCrafting
public static void tickCrafting(World world, BlockPos pos, BlockState state, CrafterBlockEntity blockEntity) - Mappings:
Namespace Name Mixin selector named tickCraftingLnet/minecraft/block/entity/CrafterBlockEntity;tickCrafting(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/block/entity/CrafterBlockEntity;)Vintermediary method_54481Lnet/minecraft/class_8887;method_54481(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;Lnet/minecraft/class_8887;)Vofficial aLdqv;a(Ldcw;Ljd;Ldtc;Ldqv;)V
-
setCraftingTicksRemaining
public void setCraftingTicksRemaining(int craftingTicksRemaining) - Mappings:
Namespace Name Mixin selector named setCraftingTicksRemainingLnet/minecraft/block/entity/CrafterBlockEntity;setCraftingTicksRemaining(I)Vintermediary method_54484Lnet/minecraft/class_8887;method_54484(I)Vofficial dLdqv;d(I)V
-
getComparatorOutput
public int getComparatorOutput()- Mappings:
Namespace Name Mixin selector named getComparatorOutputLnet/minecraft/block/entity/CrafterBlockEntity;getComparatorOutput()Iintermediary method_54489Lnet/minecraft/class_8887;method_54489()Iofficial uLdqv;u()I
-
canToggleSlot
private boolean canToggleSlot(int slot) - Mappings:
Namespace Name Mixin selector named canToggleSlotLnet/minecraft/block/entity/CrafterBlockEntity;canToggleSlot(I)Zintermediary method_54485Lnet/minecraft/class_8887;method_54485(I)Zofficial eLdqv;e(I)Z
-