Package net.minecraftforge.common
Class PlantType
- java.lang.Object
-
- net.minecraftforge.common.PlantType
-
public final class PlantType extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static PlantTypeBEACHstatic PlantTypeCAVEstatic PlantTypeCROPstatic PlantTypeDESERTprivate static java.util.regex.PatternINVALID_CHARACTERSprivate java.lang.Stringnamestatic PlantTypeNETHERstatic PlantTypePLAINSprivate static java.util.Map<java.lang.String,PlantType>VALUESstatic PlantTypeWATER
-
Constructor Summary
Constructors Modifier Constructor Description privatePlantType(java.lang.String name)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static PlantTypeget(java.lang.String name)Getting a customPlantType, or an existing one if it has the same name as that one.java.lang.StringgetName()
-
-
-
Field Detail
-
INVALID_CHARACTERS
private static final java.util.regex.Pattern INVALID_CHARACTERS
-
VALUES
private static final java.util.Map<java.lang.String,PlantType> VALUES
-
PLAINS
public static final PlantType PLAINS
-
DESERT
public static final PlantType DESERT
-
BEACH
public static final PlantType BEACH
-
CAVE
public static final PlantType CAVE
-
WATER
public static final PlantType WATER
-
NETHER
public static final PlantType NETHER
-
CROP
public static final PlantType CROP
-
name
private final java.lang.String name
-
-
Method Detail
-
get
public static PlantType get(java.lang.String name)
Getting a customPlantType, or an existing one if it has the same name as that one. Your plant should implementIPlantableand return this custom type inIPlantable.getPlantType(IBlockReader, BlockPos).If your new plant grows on blocks like any one of them above, never create a new
PlantType. This Type is only functioning inBlock.canSustainPlant(BlockState, IBlockReader, BlockPos, Direction, IPlantable), which you are supposed to override this function in your new block and create a new plant type to grow on that block. This method can be called during parallel loading- Parameters:
name- the name of the type of plant, you had better follow the style above- Returns:
- the acquired
PlantType, a new one if not found.
-
getName
public java.lang.String getName()
-
-