Enum Class ModHarvestHandlers.TreePart
java.lang.Object
java.lang.Enum<ModHarvestHandlers.TreePart>
me.desht.pneumaticcraft.common.core.ModHarvestHandlers.TreePart
- All Implemented Interfaces:
Serializable,Comparable<ModHarvestHandlers.TreePart>,Constable
- Enclosing class:
- ModHarvestHandlers
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.world.level.block.Blockconvert(net.minecraft.world.level.block.Block in, ModHarvestHandlers.TreePart to) Given a block which is part of tree (log, leaves, or sapling), try to get a different part of the same tree.static ModHarvestHandlers.TreePartReturns the enum constant of this class with the specified name.static ModHarvestHandlers.TreePart[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
LOG
-
LEAVES
-
SAPLING
-
-
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
-
convert
public net.minecraft.world.level.block.Block convert(net.minecraft.world.level.block.Block in, ModHarvestHandlers.TreePart to) Given a block which is part of tree (log, leaves, or sapling), try to get a different part of the same tree. This is dependent on the blocks being consistently named (vanilla does this properly): "XXX_log", "XXX_leaves", "XXX_sapling".- Parameters:
in- the block to convertto- the new part to convert to- Returns:
- a block for the new part
-