Enum Class InfiniteBlockGenerator

java.lang.Object
java.lang.Enum<InfiniteBlockGenerator>
io.github.thebusybiscuit.slimefun4.utils.InfiniteBlockGenerator
All Implemented Interfaces:
Serializable, Comparable<InfiniteBlockGenerator>, Constable, Predicate<org.bukkit.block.Block>

public enum InfiniteBlockGenerator extends Enum<InfiniteBlockGenerator> implements Predicate<org.bukkit.block.Block>
This enum holds various ways of infinite block generators. The most prominent member of these is the standard Cobblestone Generator. We use this enum for performance optimizations for the MinerAndroid.
Author:
TheBusyBiscuit
  • Enum Constant Details

    • COBBLESTONE_GENERATOR

      public static final InfiniteBlockGenerator COBBLESTONE_GENERATOR
      Your standard Cobblestone Generator with flowing lava and water.
    • STONE_GENERATOR

      public static final InfiniteBlockGenerator STONE_GENERATOR
      When lava flows onto a stationary water block it generates normal stone.
    • BASALT_GENERATOR

      public static final InfiniteBlockGenerator BASALT_GENERATOR
      The Basalt Generator (1.16+ only) allows you to generate infinite Basalt!
  • Method Details

    • values

      public static InfiniteBlockGenerator[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static InfiniteBlockGenerator valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getGeneratedMaterial

      @Nullable public org.bukkit.Material getGeneratedMaterial()
      This returns the generated Material of this InfiniteBlockGenerator. This method can return null if the associated Material is not available in the current MinecraftVersion.
      Returns:
      The generated Material or null
    • test

      public boolean test(@Nonnull org.bukkit.block.Block b)
      Similar to test(Block) this tests whether this InfiniteBlockGenerator exists at the given Block.
      Specified by:
      test in interface Predicate<org.bukkit.block.Block>
      Parameters:
      b - The Block
      Returns:
      Whether this InfiniteBlockGenerator exists at the given Block
    • callEvent

      @Nonnull public org.bukkit.event.block.BlockFormEvent callEvent(@Nonnull org.bukkit.block.Block block)
      This method calls a BlockFormEvent for this InfiniteBlockGenerator. There are a few plugins who catch these events to inject custom Materials into Cobblestone Generators, so we wanna give them the oppurtunity to catch this as well.
      Parameters:
      block - The Block where the liquid has solidified
      Returns:
      Our called BlockFormEvent
    • findAt

      @Nullable public static InfiniteBlockGenerator findAt(@Nonnull org.bukkit.block.Block b)
      This will attempt to find an InfiniteBlockGenerator at the given Block.
      Parameters:
      b - The Block
      Returns:
      An InfiniteBlockGenerator or null if none was found.