Class CraftingGridBlockEntity

java.lang.Object
net.minecraft.world.level.block.entity.BlockEntity
com.refinedmods.refinedstorage.common.api.support.network.AbstractNetworkNodeContainerBlockEntity<com.refinedmods.refinedstorage.api.network.impl.node.grid.GridNetworkNode>
com.refinedmods.refinedstorage.common.support.network.AbstractBaseNetworkNodeContainerBlockEntity<com.refinedmods.refinedstorage.api.network.impl.node.grid.GridNetworkNode>
com.refinedmods.refinedstorage.common.grid.AbstractGridBlockEntity
com.refinedmods.refinedstorage.common.grid.CraftingGridBlockEntity
All Implemented Interfaces:
PreviewProvider, ConfigurationCardTarget, Grid, NetworkItemTargetBlockEntity, CraftingGrid, BlockEntityWithDrops, ExtendedMenuProvider<GridData>, NetworkNodeExtendedMenuProvider<GridData>, NetworkNodeMenuProvider, PlayerAwareBlockEntity, net.minecraft.world.inventory.MenuConstructor, net.minecraft.world.MenuProvider, net.minecraft.world.Nameable

public class CraftingGridBlockEntity extends AbstractGridBlockEntity implements BlockEntityWithDrops, NetworkNodeExtendedMenuProvider<GridData>, CraftingGrid
  • Constructor Details

    • CraftingGridBlockEntity

      public CraftingGridBlockEntity(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state)
  • Method Details

    • getCraftingMatrix

      public RecipeMatrixContainer getCraftingMatrix()
      Specified by:
      getCraftingMatrix in interface CraftingGrid
    • getCraftingResult

      public net.minecraft.world.inventory.ResultContainer getCraftingResult()
      Specified by:
      getCraftingResult in interface CraftingGrid
    • getRemainingItems

      public net.minecraft.core.NonNullList<net.minecraft.world.item.ItemStack> getRemainingItems(net.minecraft.world.entity.player.Player player, net.minecraft.world.item.crafting.CraftingInput input)
      Specified by:
      getRemainingItems in interface CraftingGrid
    • startExtractTransaction

      public ExtractTransaction startExtractTransaction(net.minecraft.world.entity.player.Player player, boolean directCommit)
      Specified by:
      startExtractTransaction in interface CraftingGrid
    • clearMatrix

      public boolean clearMatrix(net.minecraft.world.entity.player.Player player, boolean toPlayerInventory)
      Specified by:
      clearMatrix in interface CraftingGrid
    • transferRecipe

      public void transferRecipe(net.minecraft.world.entity.player.Player player, List<List<ItemResource>> recipe)
      Specified by:
      transferRecipe in interface CraftingGrid
    • acceptQuickCraft

      public void acceptQuickCraft(net.minecraft.world.entity.player.Player player, net.minecraft.world.item.ItemStack craftedStack)
      Specified by:
      acceptQuickCraft in interface CraftingGrid
    • getMenuData

      public GridData getMenuData()
      Specified by:
      getMenuData in interface ExtendedMenuProvider<GridData>
    • getMenuCodec

      public net.minecraft.network.codec.StreamEncoder<net.minecraft.network.RegistryFriendlyByteBuf,GridData> getMenuCodec()
      Specified by:
      getMenuCodec in interface ExtendedMenuProvider<GridData>
    • getName

      public net.minecraft.network.chat.Component getName()
      Specified by:
      getName in interface net.minecraft.world.Nameable
    • createMenu

      @Nullable public AbstractGridContainerMenu createMenu(int syncId, net.minecraft.world.entity.player.Inventory inventory, net.minecraft.world.entity.player.Player player)
      Specified by:
      createMenu in interface net.minecraft.world.inventory.MenuConstructor
    • saveAdditional

      public void saveAdditional(net.minecraft.nbt.CompoundTag tag, net.minecraft.core.HolderLookup.Provider provider)
      Overrides:
      saveAdditional in class AbstractBaseNetworkNodeContainerBlockEntity<com.refinedmods.refinedstorage.api.network.impl.node.grid.GridNetworkNode>
    • loadAdditional

      public void loadAdditional(net.minecraft.nbt.CompoundTag tag, net.minecraft.core.HolderLookup.Provider provider)
      Overrides:
      loadAdditional in class AbstractBaseNetworkNodeContainerBlockEntity<com.refinedmods.refinedstorage.api.network.impl.node.grid.GridNetworkNode>
    • setLevel

      public void setLevel(net.minecraft.world.level.Level level)
      Overrides:
      setLevel in class AbstractBaseNetworkNodeContainerBlockEntity<com.refinedmods.refinedstorage.api.network.impl.node.grid.GridNetworkNode>
    • getDrops

      public final net.minecraft.core.NonNullList<net.minecraft.world.item.ItemStack> getDrops()
      Specified by:
      getDrops in interface BlockEntityWithDrops