Class CrafterBlockEntity
- All Implemented Interfaces:
Inventory,LootableInventory,RecipeInputInventory,RecipeInputProvider,NamedScreenHandlerFactory,ScreenHandlerFactory,Clearable,Nameable
- Mappings:
Namespace Name official dhjintermediary net/minecraft/class_8887named net/minecraft/block/entity/CrafterBlockEntity
-
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
lootTableId, lootTableSeedFields inherited from class net.minecraft.block.entity.BlockEntity
pos, removed, worldFields inherited from interface net.minecraft.inventory.Inventory
field_42619, MAX_COUNT_PER_STACKFields 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) voidreadNbt(NbtCompound nbt) Reads data fromnbt.voidsetCraftingTicksRemaining(int craftingTicksRemaining) protected voidvoidsetSlotEnabled(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) Writes data tonbt.Methods inherited from class net.minecraft.block.entity.LootableContainerBlockEntity
checkUnlocked, clear, createMenu, getLootTableId, getLootTableSeed, removeStack, removeStack, setLootTableId, setLootTableSeedMethods inherited from class net.minecraft.block.entity.LockableContainerBlockEntity
checkUnlocked, getCustomName, getDisplayName, getName, setCustomNameMethods inherited from class net.minecraft.block.entity.BlockEntity
cancelRemoval, copyItemDataRequiresOperator, createFromNbt, createNbt, createNbtWithId, createNbtWithIdentifyingData, getCachedState, getPos, getType, getWorld, hasWorld, isRemoved, markDirty, markDirty, markRemoved, onSyncedBlockEvent, populateCrashReport, posFromNbt, setCachedState, setStackNbt, setWorld, toInitialChunkDataNbt, toUpdatePacket, 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, 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
hasCustomName
-
Field Details
-
GRID_WIDTH
public static final int GRID_WIDTH- See Also:
- Mappings:
Namespace Name Mixin selector official eLdhj;e:Iintermediary field_46809Lnet/minecraft/class_8887;field_46809:Inamed GRID_WIDTHLnet/minecraft/block/entity/CrafterBlockEntity;GRID_WIDTH:I
-
GRID_HEIGHT
public static final int GRID_HEIGHT- See Also:
- Mappings:
Namespace Name Mixin selector official fLdhj;f:Iintermediary field_46810Lnet/minecraft/class_8887;field_46810:Inamed GRID_HEIGHTLnet/minecraft/block/entity/CrafterBlockEntity;GRID_HEIGHT:I
-
GRID_SIZE
public static final int GRID_SIZE- See Also:
- Mappings:
Namespace Name Mixin selector official gLdhj;g:Iintermediary field_46811Lnet/minecraft/class_8887;field_46811:Inamed GRID_SIZELnet/minecraft/block/entity/CrafterBlockEntity;GRID_SIZE:I
-
SLOT_DISABLED
public static final int SLOT_DISABLED- See Also:
- Mappings:
Namespace Name Mixin selector official hLdhj;h:Iintermediary field_46812Lnet/minecraft/class_8887;field_46812:Inamed SLOT_DISABLEDLnet/minecraft/block/entity/CrafterBlockEntity;SLOT_DISABLED:I
-
SLOT_ENABLED
public static final int SLOT_ENABLED- See Also:
- Mappings:
Namespace Name Mixin selector official iLdhj;i:Iintermediary field_46813Lnet/minecraft/class_8887;field_46813:Inamed SLOT_ENABLEDLnet/minecraft/block/entity/CrafterBlockEntity;SLOT_ENABLED:I
-
TRIGGERED_PROPERTY
public static final int TRIGGERED_PROPERTY- See Also:
- Mappings:
Namespace Name Mixin selector official jLdhj;j:Iintermediary field_46814Lnet/minecraft/class_8887;field_46814:Inamed TRIGGERED_PROPERTYLnet/minecraft/block/entity/CrafterBlockEntity;TRIGGERED_PROPERTY:I
-
PROPERTIES_COUNT
public static final int PROPERTIES_COUNT- See Also:
- Mappings:
Namespace Name Mixin selector official kLdhj;k:Iintermediary field_46815Lnet/minecraft/class_8887;field_46815:Inamed PROPERTIES_COUNTLnet/minecraft/block/entity/CrafterBlockEntity;PROPERTIES_COUNT:I
-
inputStacks
- Mappings:
Namespace Name Mixin selector official rLdhj;r:Liq;intermediary field_46817Lnet/minecraft/class_8887;field_46817:Lnet/minecraft/class_2371;named inputStacksLnet/minecraft/block/entity/CrafterBlockEntity;inputStacks:Lnet/minecraft/util/collection/DefaultedList;
-
craftingTicksRemaining
private int craftingTicksRemaining- Mappings:
Namespace Name Mixin selector official sLdhj;s:Iintermediary field_46818Lnet/minecraft/class_8887;field_46818:Inamed craftingTicksRemainingLnet/minecraft/block/entity/CrafterBlockEntity;craftingTicksRemaining:I
-
propertyDelegate
- Mappings:
Namespace Name Mixin selector official lLdhj;l:Lcil;intermediary field_46816Lnet/minecraft/class_8887;field_46816:Lnet/minecraft/class_3913;named propertyDelegateLnet/minecraft/block/entity/CrafterBlockEntity;propertyDelegate:Lnet/minecraft/screen/PropertyDelegate;
-
-
Constructor Details
-
CrafterBlockEntity
- Mappings:
Namespace Name Mixin selector official <init>Ldhj;<init>(Lhx;Ldjh;)Vintermediary <init>Lnet/minecraft/class_8887;<init>(Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;)Vnamed <init>Lnet/minecraft/block/entity/CrafterBlockEntity;<init>(Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)V
-
-
Method Details
-
getContainerName
- Specified by:
getContainerNamein classLockableContainerBlockEntity- Mappings:
Namespace Name Mixin selector official lLdgp;l()Lvf;intermediary method_17823Lnet/minecraft/class_2624;method_17823()Lnet/minecraft/class_2561;named getContainerNameLnet/minecraft/block/entity/LockableContainerBlockEntity;getContainerName()Lnet/minecraft/text/Text;
-
createScreenHandler
- Specified by:
createScreenHandlerin classLockableContainerBlockEntity- Mappings:
Namespace Name Mixin selector official aLdgp;a(ILcfh;)Lcib;intermediary method_5465Lnet/minecraft/class_2624;method_5465(ILnet/minecraft/class_1661;)Lnet/minecraft/class_1703;named createScreenHandlerLnet/minecraft/block/entity/LockableContainerBlockEntity;createScreenHandler(ILnet/minecraft/entity/player/PlayerInventory;)Lnet/minecraft/screen/ScreenHandler;
-
setSlotEnabled
public void setSlotEnabled(int slot, boolean enabled) - Mappings:
Namespace Name Mixin selector official aLdhj;a(IZ)Vintermediary method_54480Lnet/minecraft/class_8887;method_54480(IZ)Vnamed setSlotEnabledLnet/minecraft/block/entity/CrafterBlockEntity;setSlotEnabled(IZ)V
-
isSlotDisabled
public boolean isSlotDisabled(int slot) - Mappings:
Namespace Name Mixin selector official cLdhj;c(I)Zintermediary method_54483Lnet/minecraft/class_8887;method_54483(I)Znamed isSlotDisabledLnet/minecraft/block/entity/CrafterBlockEntity;isSlotDisabled(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 official bLbju;b(ILcmy;)Zintermediary method_5437Lnet/minecraft/class_1263;method_5437(ILnet/minecraft/class_1799;)Znamed isValidLnet/minecraft/inventory/Inventory;isValid(ILnet/minecraft/item/ItemStack;)Z
-
betterSlotExists
- Mappings:
Namespace Name Mixin selector official aLdhj;a(ILcmy;I)Zintermediary method_54479Lnet/minecraft/class_8887;method_54479(ILnet/minecraft/class_1799;I)Znamed betterSlotExistsLnet/minecraft/block/entity/CrafterBlockEntity;betterSlotExists(ILnet/minecraft/item/ItemStack;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 official aLdgv;a(Lsn;)Vintermediary method_11014Lnet/minecraft/class_2586;method_11014(Lnet/minecraft/class_2487;)Vnamed readNbtLnet/minecraft/block/entity/BlockEntity;readNbt(Lnet/minecraft/nbt/NbtCompound;)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 official bLdgv;b(Lsn;)Vintermediary method_11007Lnet/minecraft/class_2586;method_11007(Lnet/minecraft/class_2487;)Vnamed writeNbtLnet/minecraft/block/entity/BlockEntity;writeNbt(Lnet/minecraft/nbt/NbtCompound;)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 official ai_Lbju;ai_()Zintermediary method_5442Lnet/minecraft/class_1263;method_5442()Znamed isEmptyLnet/minecraft/inventory/Inventory;isEmpty()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 official aLbju;a(I)Lcmy;intermediary method_5438Lnet/minecraft/class_1263;method_5438(I)Lnet/minecraft/class_1799;named getStackLnet/minecraft/inventory/Inventory;getStack(I)Lnet/minecraft/item/ItemStack;
-
setStack
Sets the stack stored atslottostack.- Specified by:
setStackin interfaceInventory- Overrides:
setStackin classLootableContainerBlockEntity- Mappings:
Namespace Name Mixin selector official aLbju;a(ILcmy;)Vintermediary method_5447Lnet/minecraft/class_1263;method_5447(ILnet/minecraft/class_1799;)Vnamed setStackLnet/minecraft/inventory/Inventory;setStack(ILnet/minecraft/item/ItemStack;)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 classLootableContainerBlockEntity- Returns:
- whether
playercan use this inventory - See Also:
- Mappings:
Namespace Name Mixin selector official aLbju;a(Lcfi;)Zintermediary method_5443Lnet/minecraft/class_1263;method_5443(Lnet/minecraft/class_1657;)Znamed canPlayerUseLnet/minecraft/inventory/Inventory;canPlayerUse(Lnet/minecraft/entity/player/PlayerEntity;)Z
-
getHeldStacks
Description copied from interface:RecipeInputInventoryReturns the stacks held by the inventory.- Specified by:
getHeldStacksin interfaceRecipeInputInventory- Specified by:
getHeldStacksin classLootableContainerBlockEntity- Returns:
- the stacks held by the inventory
- Mappings:
Namespace Name Mixin selector official method_11282Ldhj;method_11282()Liq;intermediary method_11282Lnet/minecraft/class_8887;method_11282()Lnet/minecraft/class_2371;named getHeldStacksLnet/minecraft/block/entity/CrafterBlockEntity;getHeldStacks()Lnet/minecraft/util/collection/DefaultedList;
-
setInvStackList
- Specified by:
setInvStackListin classLootableContainerBlockEntity- Mappings:
Namespace Name Mixin selector official aLdhz;a(Liq;)Vintermediary method_11281Lnet/minecraft/class_2621;method_11281(Lnet/minecraft/class_2371;)Vnamed setInvStackListLnet/minecraft/block/entity/LootableContainerBlockEntity;setInvStackList(Lnet/minecraft/util/collection/DefaultedList;)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 official fLcir;f()Iintermediary method_17398Lnet/minecraft/class_8566;method_17398()Inamed getWidthLnet/minecraft/inventory/RecipeInputInventory;getWidth()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 official gLcir;g()Iintermediary method_17397Lnet/minecraft/class_8566;method_17397()Inamed getHeightLnet/minecraft/inventory/RecipeInputInventory;getHeight()I
-
provideRecipeInputs
- Specified by:
provideRecipeInputsin interfaceRecipeInputProvider- Mappings:
Namespace Name Mixin selector official aLcjz;a(Lcfm;)Vintermediary method_7683Lnet/minecraft/class_1737;method_7683(Lnet/minecraft/class_1662;)Vnamed provideRecipeInputsLnet/minecraft/recipe/RecipeInputProvider;provideRecipeInputs(Lnet/minecraft/recipe/RecipeMatcher;)V
-
putDisabledSlots
- Mappings:
Namespace Name Mixin selector official dLdhj;d(Lsn;)Vintermediary method_54486Lnet/minecraft/class_8887;method_54486(Lnet/minecraft/class_2487;)Vnamed putDisabledSlotsLnet/minecraft/block/entity/CrafterBlockEntity;putDisabledSlots(Lnet/minecraft/nbt/NbtCompound;)V
-
putTriggered
- Mappings:
Namespace Name Mixin selector official eLdhj;e(Lsn;)Vintermediary method_54487Lnet/minecraft/class_8887;method_54487(Lnet/minecraft/class_2487;)Vnamed putTriggeredLnet/minecraft/block/entity/CrafterBlockEntity;putTriggered(Lnet/minecraft/nbt/NbtCompound;)V
-
setTriggered
public void setTriggered(boolean triggered) - Mappings:
Namespace Name Mixin selector official aLdhj;a(Z)Vintermediary method_54482Lnet/minecraft/class_8887;method_54482(Z)Vnamed setTriggeredLnet/minecraft/block/entity/CrafterBlockEntity;setTriggered(Z)V
-
isTriggered
public boolean isTriggered()- Mappings:
Namespace Name Mixin selector official mLdhj;m()Zintermediary method_54488Lnet/minecraft/class_8887;method_54488()Znamed isTriggeredLnet/minecraft/block/entity/CrafterBlockEntity;isTriggered()Z
-
tickCrafting
public static void tickCrafting(World world, BlockPos pos, BlockState state, CrafterBlockEntity blockEntity) - Mappings:
Namespace Name Mixin selector official aLdhj;a(Lctp;Lhx;Ldjh;Ldhj;)Vintermediary method_54481Lnet/minecraft/class_8887;method_54481(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;Lnet/minecraft/class_8887;)Vnamed tickCraftingLnet/minecraft/block/entity/CrafterBlockEntity;tickCrafting(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/block/entity/CrafterBlockEntity;)V
-
setCraftingTicksRemaining
public void setCraftingTicksRemaining(int craftingTicksRemaining) - Mappings:
Namespace Name Mixin selector official dLdhj;d(I)Vintermediary method_54484Lnet/minecraft/class_8887;method_54484(I)Vnamed setCraftingTicksRemainingLnet/minecraft/block/entity/CrafterBlockEntity;setCraftingTicksRemaining(I)V
-
getComparatorOutput
public int getComparatorOutput()- Mappings:
Namespace Name Mixin selector official wLdhj;w()Iintermediary method_54489Lnet/minecraft/class_8887;method_54489()Inamed getComparatorOutputLnet/minecraft/block/entity/CrafterBlockEntity;getComparatorOutput()I
-
canToggleSlot
private boolean canToggleSlot(int slot) - Mappings:
Namespace Name Mixin selector official eLdhj;e(I)Zintermediary method_54485Lnet/minecraft/class_8887;method_54485(I)Znamed canToggleSlotLnet/minecraft/block/entity/CrafterBlockEntity;canToggleSlot(I)Z
-