Enum Class InfiniteBlockGenerator
java.lang.Object
java.lang.Enum<InfiniteBlockGenerator>
io.github.thebusybiscuit.slimefun4.utils.InfiniteBlockGenerator
- All Implemented Interfaces:
Serializable
,Comparable<InfiniteBlockGenerator>
,Constable
,Predicate<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
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionThe Basalt Generator (1.16+ only) allows you to generate infinite Basalt!Your standard Cobblestone Generator with flowing lava and water.When lava flows onto a stationary water block it generates normal stone. -
Method Summary
Modifier and TypeMethodDescriptionThis method calls aBlockFormEvent
for thisInfiniteBlockGenerator
.static InfiniteBlockGenerator
This will attempt to find anInfiniteBlockGenerator
at the givenBlock
.This returns the generatedMaterial
of thisInfiniteBlockGenerator
.boolean
static InfiniteBlockGenerator
Returns the enum constant of this class with the specified name.static InfiniteBlockGenerator[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
COBBLESTONE_GENERATOR
Your standard Cobblestone Generator with flowing lava and water. -
STONE_GENERATOR
When lava flows onto a stationary water block it generates normal stone. -
BASALT_GENERATOR
The Basalt Generator (1.16+ only) allows you to generate infinite Basalt!
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-
getGeneratedMaterial
This returns the generatedMaterial
of thisInfiniteBlockGenerator
. This method can return null if the associatedMaterial
is not available in the currentMinecraftVersion
.- Returns:
- The generated
Material
or null
-
test
-
callEvent
This method calls aBlockFormEvent
for thisInfiniteBlockGenerator
. There are a few plugins who catch these events to inject customMaterials
into Cobblestone Generators, so we wanna give them the oppurtunity to catch this as well.- Parameters:
block
- TheBlock
where the liquid has solidified- Returns:
- Our called
BlockFormEvent
-
findAt
This will attempt to find anInfiniteBlockGenerator
at the givenBlock
.- Parameters:
b
- TheBlock
- Returns:
- An
InfiniteBlockGenerator
or null if none was found.
-