Class ProjectedInventory
java.lang.Object
com.soulfiremc.server.pathfinding.graph.ProjectedInventory
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 Summary
ConstructorsConstructorDescriptionProjectedInventory
(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) ProjectedInventory
(List<net.minecraft.world.item.ItemStack> items, net.minecraft.client.player.LocalPlayer entity, PathConstraint pathConstraint) ProjectedInventory
(net.minecraft.world.entity.player.Inventory playerInventory, net.minecraft.client.player.LocalPlayer entity, PathConstraint pathConstraint) -
Method Summary
Modifier and TypeMethodDescriptiongetMiningCosts
(net.minecraft.world.level.block.state.BlockState blockState) boolean
isStairsBlockToStandOn
(net.minecraft.world.level.block.state.BlockState blockState) @NotNull String
toString()
int
net.minecraft.world.item.ItemStack[]
-
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
-
usableBlockItems
public int usableBlockItems() -
usableToolsAndEmpty
public net.minecraft.world.item.ItemStack[] usableToolsAndEmpty()
-