Class ProjectedInventory

java.lang.Object
com.soulfiremc.server.pathfinding.graph.ProjectedInventory

public final class ProjectedInventory extends Object
An immutable representation of a player inventory. This takes an inventory and projects places/breaks onto it. This way we calculate the way we can do actions after a block was broken/placed.
  • Constructor Details

    • ProjectedInventory

      public ProjectedInventory(net.minecraft.world.entity.player.Inventory playerInventory, net.minecraft.client.player.LocalPlayer entity, PathConstraint pathConstraint)
    • ProjectedInventory

      public ProjectedInventory(List<net.minecraft.world.item.ItemStack> items, net.minecraft.client.player.LocalPlayer entity, PathConstraint pathConstraint)
    • ProjectedInventory

      public ProjectedInventory(int usableBlockItems, net.minecraft.world.item.ItemStack[] usableToolsAndEmpty, IDMap<net.minecraft.world.level.block.state.BlockState,Costs.BlockMiningCosts> sharedMiningCosts, IDBooleanMap<net.minecraft.world.level.block.state.BlockState> stairsBlockToStandOn)
  • Method Details

    • getMiningCosts

      public Costs.BlockMiningCosts getMiningCosts(net.minecraft.world.level.block.state.BlockState blockState)
    • isStairsBlockToStandOn

      public boolean isStairsBlockToStandOn(net.minecraft.world.level.block.state.BlockState blockState)
    • toString

      @NotNull public @NotNull String toString()
      Overrides:
      toString in class Object
    • usableBlockItems

      public int usableBlockItems()
    • usableToolsAndEmpty

      public net.minecraft.world.item.ItemStack[] usableToolsAndEmpty()