Class BlockStateStorage

java.lang.Object
com.minecolonies.api.util.BlockStateStorage

public class BlockStateStorage extends Object
Stores a blockstate for comparing.
  • Constructor Summary

    Constructors
    Constructor
    Description
    BlockStateStorage(@NotNull net.minecraft.world.level.block.state.BlockState state, @NotNull List<net.minecraft.world.level.block.state.properties.Property<?>> compareProperties, boolean exclude)
    Create an instance of the storage.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    List<net.minecraft.world.level.block.state.properties.Property<?>>
    Gets the list of the properties this storage uses to compare storages.
    net.minecraft.world.level.block.state.BlockState
    Returns the stored state
    int
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • BlockStateStorage

      public BlockStateStorage(@NotNull @NotNull net.minecraft.world.level.block.state.BlockState state, @NotNull @NotNull List<net.minecraft.world.level.block.state.properties.Property<?>> compareProperties, boolean exclude)
      Create an instance of the storage.
      Parameters:
      state - The blockstate to store
      compareProperties - the list of properties to compare
      exclude - True: states are compared ignoring the properties in the given list. False: states are only compared within the properties on the list.
  • Method Details

    • getState

      public net.minecraft.world.level.block.state.BlockState getState()
      Returns the stored state
      Returns:
      state
    • getCompareProperties

      public List<net.minecraft.world.level.block.state.properties.Property<?>> getCompareProperties()
      Gets the list of the properties this storage uses to compare storages.
      Returns:
      property list
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object