Class CustomSpreadingImpl

java.lang.Object
io.github.vampirestudios.vampirelib.api.blockspreading.CustomSpreadingImpl

public class CustomSpreadingImpl extends Object
  • Constructor Details

    • CustomSpreadingImpl

      public CustomSpreadingImpl(net.minecraft.world.level.block.Block block, BlockSpreadingType type, SpreadingBehavior behavior)
      Parameters:
      block - The block which should spread to other blocks
      type - the type of spreading the block should use, check BlockSpreadingType to look at which types exist
      behavior - The custom spreading behaviour, defines to what block to change the block this spreads onto into
  • Method Details

    • getBlock

      public net.minecraft.world.level.block.Block getBlock()
      Gets the block which should spread to other blocks.
      Returns:
      the block for this.
    • setBlock

      public void setBlock(net.minecraft.world.level.block.Block block)
      Sets the block which should spread to other blocks.
      Parameters:
      block - block thingy
    • getType

      public BlockSpreadingType getType()
      Gets the defined spreading type the block should use.
      Returns:
      the block for this.
    • setType

      public void setType(BlockSpreadingType type)
      Sets the type of spreading the block should use, check BlockSpreadingType to look at which types exist.
      Parameters:
      type - sets the spreading type
    • getBehavior

      public SpreadingBehavior getBehavior()
      Gets the defined spreading behaviour.
      Returns:
      the block for this.
    • setBehavior

      public void setBehavior(SpreadingBehavior behavior)
      Sets the spreading behaviour for this block, defines what to change the block this spreads onto into.
      Parameters:
      behavior - sets the behaviour