Class CrafterBlockEntity

All Implemented Interfaces:
Inventory, LootableInventory, RecipeInputInventory, RecipeInputProvider, NamedScreenHandlerFactory, ScreenHandlerFactory, Clearable, Nameable

public class CrafterBlockEntity extends LootableContainerBlockEntity implements RecipeInputInventory
Mappings:
Namespace Name
official dhj
intermediary net/minecraft/class_8887
named net/minecraft/block/entity/CrafterBlockEntity
  • Field Details

    • GRID_WIDTH

      public static final int GRID_WIDTH
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official e Ldhj;e:I
      intermediary field_46809 Lnet/minecraft/class_8887;field_46809:I
      named GRID_WIDTH Lnet/minecraft/block/entity/CrafterBlockEntity;GRID_WIDTH:I
    • GRID_HEIGHT

      public static final int GRID_HEIGHT
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official f Ldhj;f:I
      intermediary field_46810 Lnet/minecraft/class_8887;field_46810:I
      named GRID_HEIGHT Lnet/minecraft/block/entity/CrafterBlockEntity;GRID_HEIGHT:I
    • GRID_SIZE

      public static final int GRID_SIZE
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official g Ldhj;g:I
      intermediary field_46811 Lnet/minecraft/class_8887;field_46811:I
      named GRID_SIZE Lnet/minecraft/block/entity/CrafterBlockEntity;GRID_SIZE:I
    • SLOT_DISABLED

      public static final int SLOT_DISABLED
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official h Ldhj;h:I
      intermediary field_46812 Lnet/minecraft/class_8887;field_46812:I
      named SLOT_DISABLED Lnet/minecraft/block/entity/CrafterBlockEntity;SLOT_DISABLED:I
    • SLOT_ENABLED

      public static final int SLOT_ENABLED
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official i Ldhj;i:I
      intermediary field_46813 Lnet/minecraft/class_8887;field_46813:I
      named SLOT_ENABLED Lnet/minecraft/block/entity/CrafterBlockEntity;SLOT_ENABLED:I
    • TRIGGERED_PROPERTY

      public static final int TRIGGERED_PROPERTY
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official j Ldhj;j:I
      intermediary field_46814 Lnet/minecraft/class_8887;field_46814:I
      named TRIGGERED_PROPERTY Lnet/minecraft/block/entity/CrafterBlockEntity;TRIGGERED_PROPERTY:I
    • PROPERTIES_COUNT

      public static final int PROPERTIES_COUNT
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official k Ldhj;k:I
      intermediary field_46815 Lnet/minecraft/class_8887;field_46815:I
      named PROPERTIES_COUNT Lnet/minecraft/block/entity/CrafterBlockEntity;PROPERTIES_COUNT:I
    • inputStacks

      private DefaultedList<ItemStack> inputStacks
      Mappings:
      Namespace Name Mixin selector
      official r Ldhj;r:Liq;
      intermediary field_46817 Lnet/minecraft/class_8887;field_46817:Lnet/minecraft/class_2371;
      named inputStacks Lnet/minecraft/block/entity/CrafterBlockEntity;inputStacks:Lnet/minecraft/util/collection/DefaultedList;
    • craftingTicksRemaining

      private int craftingTicksRemaining
      Mappings:
      Namespace Name Mixin selector
      official s Ldhj;s:I
      intermediary field_46818 Lnet/minecraft/class_8887;field_46818:I
      named craftingTicksRemaining Lnet/minecraft/block/entity/CrafterBlockEntity;craftingTicksRemaining:I
    • propertyDelegate

      protected final PropertyDelegate propertyDelegate
      Mappings:
      Namespace Name Mixin selector
      official l Ldhj;l:Lcil;
      intermediary field_46816 Lnet/minecraft/class_8887;field_46816:Lnet/minecraft/class_3913;
      named propertyDelegate Lnet/minecraft/block/entity/CrafterBlockEntity;propertyDelegate:Lnet/minecraft/screen/PropertyDelegate;
  • Constructor Details

    • CrafterBlockEntity

      public CrafterBlockEntity(BlockPos pos, BlockState state)
      Mappings:
      Namespace Name Mixin selector
      official <init> Ldhj;<init>(Lhx;Ldjh;)V
      intermediary <init> Lnet/minecraft/class_8887;<init>(Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;)V
      named <init> Lnet/minecraft/block/entity/CrafterBlockEntity;<init>(Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)V
  • Method Details

    • getContainerName

      protected Text getContainerName()
      Specified by:
      getContainerName in class LockableContainerBlockEntity
      Mappings:
      Namespace Name Mixin selector
      official l Ldgp;l()Lvf;
      intermediary method_17823 Lnet/minecraft/class_2624;method_17823()Lnet/minecraft/class_2561;
      named getContainerName Lnet/minecraft/block/entity/LockableContainerBlockEntity;getContainerName()Lnet/minecraft/text/Text;
    • createScreenHandler

      protected ScreenHandler createScreenHandler(int syncId, PlayerInventory playerInventory)
      Specified by:
      createScreenHandler in class LockableContainerBlockEntity
      Mappings:
      Namespace Name Mixin selector
      official a Ldgp;a(ILcfh;)Lcib;
      intermediary method_5465 Lnet/minecraft/class_2624;method_5465(ILnet/minecraft/class_1661;)Lnet/minecraft/class_1703;
      named createScreenHandler Lnet/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 a Ldhj;a(IZ)V
      intermediary method_54480 Lnet/minecraft/class_8887;method_54480(IZ)V
      named setSlotEnabled Lnet/minecraft/block/entity/CrafterBlockEntity;setSlotEnabled(IZ)V
    • isSlotDisabled

      public boolean isSlotDisabled(int slot)
      Mappings:
      Namespace Name Mixin selector
      official c Ldhj;c(I)Z
      intermediary method_54483 Lnet/minecraft/class_8887;method_54483(I)Z
      named isSlotDisabled Lnet/minecraft/block/entity/CrafterBlockEntity;isSlotDisabled(I)Z
    • isValid

      public boolean isValid(int slot, ItemStack stack)
      Returns whether stack is valid for the slot.

      Implementations can, for example, use this to check whether the item is in a specific tag. This returns true by default.

      Specified by:
      isValid in interface Inventory
      Returns:
      whether stack is valid for the slot
      Mappings:
      Namespace Name Mixin selector
      official b Lbju;b(ILcmy;)Z
      intermediary method_5437 Lnet/minecraft/class_1263;method_5437(ILnet/minecraft/class_1799;)Z
      named isValid Lnet/minecraft/inventory/Inventory;isValid(ILnet/minecraft/item/ItemStack;)Z
    • betterSlotExists

      private boolean betterSlotExists(int count, ItemStack stack, int slot)
      Mappings:
      Namespace Name Mixin selector
      official a Ldhj;a(ILcmy;I)Z
      intermediary method_54479 Lnet/minecraft/class_8887;method_54479(ILnet/minecraft/class_1799;I)Z
      named betterSlotExists Lnet/minecraft/block/entity/CrafterBlockEntity;betterSlotExists(ILnet/minecraft/item/ItemStack;I)Z
    • readNbt

      public void readNbt(NbtCompound nbt)
      Reads data from nbt. 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.

      nbt might 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:
      readNbt in class LockableContainerBlockEntity
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official a Ldgv;a(Lsn;)V
      intermediary method_11014 Lnet/minecraft/class_2586;method_11014(Lnet/minecraft/class_2487;)V
      named readNbt Lnet/minecraft/block/entity/BlockEntity;readNbt(Lnet/minecraft/nbt/NbtCompound;)V
    • writeNbt

      protected void writeNbt(NbtCompound nbt)
      Writes data to nbt. 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:
      writeNbt in class LockableContainerBlockEntity
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official b Ldgv;b(Lsn;)V
      intermediary method_11007 Lnet/minecraft/class_2586;method_11007(Lnet/minecraft/class_2487;)V
      named writeNbt Lnet/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 0 to size() - 1. This should remain constant throughout the inventory's lifetime.

      Specified by:
      size in interface Inventory
      Returns:
      the size of the inventory
      Mappings:
      Namespace Name Mixin selector
      official b Lbju;b()I
      intermediary method_5439 Lnet/minecraft/class_1263;method_5439()I
      named size Lnet/minecraft/inventory/Inventory;size()I
    • isEmpty

      public boolean isEmpty()
      Returns whether the inventory consists entirely of empty item stacks.
      Specified by:
      isEmpty in interface Inventory
      Overrides:
      isEmpty in class LootableContainerBlockEntity
      Returns:
      whether the inventory consists entirely of empty item stacks
      Mappings:
      Namespace Name Mixin selector
      official ai_ Lbju;ai_()Z
      intermediary method_5442 Lnet/minecraft/class_1263;method_5442()Z
      named isEmpty Lnet/minecraft/inventory/Inventory;isEmpty()Z
    • getStack

      public ItemStack getStack(int slot)
      Returns the stack currently stored at slot.

      If the slot is empty, or is outside the bounds of this inventory, this returns ItemStack.EMPTY.

      Specified by:
      getStack in interface Inventory
      Overrides:
      getStack in class LootableContainerBlockEntity
      Returns:
      the stack currently stored at slot
      Mappings:
      Namespace Name Mixin selector
      official a Lbju;a(I)Lcmy;
      intermediary method_5438 Lnet/minecraft/class_1263;method_5438(I)Lnet/minecraft/class_1799;
      named getStack Lnet/minecraft/inventory/Inventory;getStack(I)Lnet/minecraft/item/ItemStack;
    • setStack

      public void setStack(int slot, ItemStack stack)
      Sets the stack stored at slot to stack.
      Specified by:
      setStack in interface Inventory
      Overrides:
      setStack in class LootableContainerBlockEntity
      Mappings:
      Namespace Name Mixin selector
      official a Lbju;a(ILcmy;)V
      intermediary method_5447 Lnet/minecraft/class_1263;method_5447(ILnet/minecraft/class_1799;)V
      named setStack Lnet/minecraft/inventory/Inventory;setStack(ILnet/minecraft/item/ItemStack;)V
    • canPlayerUse

      public boolean canPlayerUse(PlayerEntity player)
      Specified by:
      canPlayerUse in interface Inventory
      Overrides:
      canPlayerUse in class LootableContainerBlockEntity
      Returns:
      whether player can use this inventory
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official a Lbju;a(Lcfi;)Z
      intermediary method_5443 Lnet/minecraft/class_1263;method_5443(Lnet/minecraft/class_1657;)Z
      named canPlayerUse Lnet/minecraft/inventory/Inventory;canPlayerUse(Lnet/minecraft/entity/player/PlayerEntity;)Z
    • getHeldStacks

      public DefaultedList<ItemStack> getHeldStacks()
      Description copied from interface: RecipeInputInventory
      Returns the stacks held by the inventory.
      Specified by:
      getHeldStacks in interface RecipeInputInventory
      Specified by:
      getHeldStacks in class LootableContainerBlockEntity
      Returns:
      the stacks held by the inventory
      Mappings:
      Namespace Name Mixin selector
      official method_11282 Ldhj;method_11282()Liq;
      intermediary method_11282 Lnet/minecraft/class_8887;method_11282()Lnet/minecraft/class_2371;
      named getHeldStacks Lnet/minecraft/block/entity/CrafterBlockEntity;getHeldStacks()Lnet/minecraft/util/collection/DefaultedList;
    • setInvStackList

      protected void setInvStackList(DefaultedList<ItemStack> list)
      Specified by:
      setInvStackList in class LootableContainerBlockEntity
      Mappings:
      Namespace Name Mixin selector
      official a Ldhz;a(Liq;)V
      intermediary method_11281 Lnet/minecraft/class_2621;method_11281(Lnet/minecraft/class_2371;)V
      named setInvStackList Lnet/minecraft/block/entity/LootableContainerBlockEntity;setInvStackList(Lnet/minecraft/util/collection/DefaultedList;)V
    • getWidth

      public int getWidth()
      Returns the width of the recipe grid.
      Specified by:
      getWidth in interface RecipeInputInventory
      Returns:
      the width of the recipe grid
      Mappings:
      Namespace Name Mixin selector
      official f Lcir;f()I
      intermediary method_17398 Lnet/minecraft/class_8566;method_17398()I
      named getWidth Lnet/minecraft/inventory/RecipeInputInventory;getWidth()I
    • getHeight

      public int getHeight()
      Returns the height of the recipe grid.
      Specified by:
      getHeight in interface RecipeInputInventory
      Returns:
      the height of the recipe grid
      Mappings:
      Namespace Name Mixin selector
      official g Lcir;g()I
      intermediary method_17397 Lnet/minecraft/class_8566;method_17397()I
      named getHeight Lnet/minecraft/inventory/RecipeInputInventory;getHeight()I
    • provideRecipeInputs

      public void provideRecipeInputs(RecipeMatcher finder)
      Specified by:
      provideRecipeInputs in interface RecipeInputProvider
      Mappings:
      Namespace Name Mixin selector
      official a Lcjz;a(Lcfm;)V
      intermediary method_7683 Lnet/minecraft/class_1737;method_7683(Lnet/minecraft/class_1662;)V
      named provideRecipeInputs Lnet/minecraft/recipe/RecipeInputProvider;provideRecipeInputs(Lnet/minecraft/recipe/RecipeMatcher;)V
    • putDisabledSlots

      private void putDisabledSlots(NbtCompound nbt)
      Mappings:
      Namespace Name Mixin selector
      official d Ldhj;d(Lsn;)V
      intermediary method_54486 Lnet/minecraft/class_8887;method_54486(Lnet/minecraft/class_2487;)V
      named putDisabledSlots Lnet/minecraft/block/entity/CrafterBlockEntity;putDisabledSlots(Lnet/minecraft/nbt/NbtCompound;)V
    • putTriggered

      private void putTriggered(NbtCompound nbt)
      Mappings:
      Namespace Name Mixin selector
      official e Ldhj;e(Lsn;)V
      intermediary method_54487 Lnet/minecraft/class_8887;method_54487(Lnet/minecraft/class_2487;)V
      named putTriggered Lnet/minecraft/block/entity/CrafterBlockEntity;putTriggered(Lnet/minecraft/nbt/NbtCompound;)V
    • setTriggered

      public void setTriggered(boolean triggered)
      Mappings:
      Namespace Name Mixin selector
      official a Ldhj;a(Z)V
      intermediary method_54482 Lnet/minecraft/class_8887;method_54482(Z)V
      named setTriggered Lnet/minecraft/block/entity/CrafterBlockEntity;setTriggered(Z)V
    • isTriggered

      public boolean isTriggered()
      Mappings:
      Namespace Name Mixin selector
      official m Ldhj;m()Z
      intermediary method_54488 Lnet/minecraft/class_8887;method_54488()Z
      named isTriggered Lnet/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 a Ldhj;a(Lctp;Lhx;Ldjh;Ldhj;)V
      intermediary method_54481 Lnet/minecraft/class_8887;method_54481(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;Lnet/minecraft/class_8887;)V
      named tickCrafting Lnet/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 d Ldhj;d(I)V
      intermediary method_54484 Lnet/minecraft/class_8887;method_54484(I)V
      named setCraftingTicksRemaining Lnet/minecraft/block/entity/CrafterBlockEntity;setCraftingTicksRemaining(I)V
    • getComparatorOutput

      public int getComparatorOutput()
      Mappings:
      Namespace Name Mixin selector
      official w Ldhj;w()I
      intermediary method_54489 Lnet/minecraft/class_8887;method_54489()I
      named getComparatorOutput Lnet/minecraft/block/entity/CrafterBlockEntity;getComparatorOutput()I
    • canToggleSlot

      private boolean canToggleSlot(int slot)
      Mappings:
      Namespace Name Mixin selector
      official e Ldhj;e(I)Z
      intermediary method_54485 Lnet/minecraft/class_8887;method_54485(I)Z
      named canToggleSlot Lnet/minecraft/block/entity/CrafterBlockEntity;canToggleSlot(I)Z