C
- public abstract class GelStructure<C extends net.minecraft.world.gen.feature.IFeatureConfig>
extends net.minecraft.world.gen.feature.structure.Structure<C>
Structure
that allows for more precise tweaking and
handles structure spacing.ACACIA_TREE, BAMBOO, BLOCK_PILE, BLUE_ICE, BONUS_CHEST, BURIED_TREASURE, CHORUS_PLANT, CORAL_CLAW, CORAL_MUSHROOM, CORAL_TREE, DARK_OAK_TREE, DECORATED, DECORATED_FLOWER, DESERT_PYRAMID, DESERT_WELL, DISK, EMERALD_ORE, END_CITY, END_GATEWAY, END_ISLAND, END_SPIKE, FANCY_TREE, FILL_LAYER, FLOWER, FOREST_ROCK, FOSSIL, FREEZE_TOP_LAYER, GLOWSTONE_BLOB, HUGE_BROWN_MUSHROOM, HUGE_RED_MUSHROOM, ICE_PATCH, ICE_SPIKE, ICEBERG, IGLOO, ILLAGER_STRUCTURES, JUNGLE_GROUND_BUSH, JUNGLE_TEMPLE, KELP, LAKE, MEGA_JUNGLE_TREE, MEGA_SPRUCE_TREE, MINESHAFT, MONSTER_ROOM, NETHER_BRIDGE, NO_OP, NORMAL_TREE, OCEAN_MONUMENT, OCEAN_RUIN, ORE, PILLAGER_OUTPOST, RANDOM_BOOLEAN_SELECTOR, RANDOM_PATCH, RANDOM_RANDOM_SELECTOR, RANDOM_SELECTOR, SEA_PICKLE, SEAGRASS, SHIPWRECK, SIMPLE_BLOCK, SIMPLE_RANDOM_SELECTOR, SPRING_FEATURE, STRONGHOLD, STRUCTURES, SWAMP_HUT, VILLAGE, VINES, VOID_START_PLATFORM, WOODLAND_MANSION
Constructor and Description |
---|
GelStructure(java.util.function.Function<com.mojang.datafixers.Dynamic<?>,? extends C> configFactoryIn) |
Modifier and Type | Method and Description |
---|---|
boolean |
canBeGenerated(net.minecraft.world.biome.BiomeManager biomeManagerIn,
net.minecraft.world.gen.ChunkGenerator<?> chunkGen,
java.util.Random rand,
int chunkPosX,
int chunkPosZ,
net.minecraft.world.biome.Biome biomeIn)
hasStartAt
Runs getStartPositionForPosition(ChunkGenerator, Random, int, int, int, int) to see if the
chunk is a valid chunk to generate this structure in, and then checks
getProbability() to see if it will succeed in generating. |
java.util.List<net.minecraft.world.biome.Biome.SpawnListEntry> |
getCreatureSpawnList()
Return a list of passive mobs to change spawn behavior.
|
abstract int |
getOffset()
When checking if a structure can be placed in a given chunk, this value is
used along with
getSpacing() to give the structure an offset as to
not make the grid apparent. |
abstract double |
getProbability()
This is the probability of the structure generating in a given chunk,
expressed as a percent.
|
abstract int |
getSeed()
Every structure should have a different seed to prevent them from overlapping
as best as possible, especially when the same chances are used.
|
abstract int |
getSpacing()
When checking if a structure can be placed in a given chunk, this is called
to determine how far apart each structure should be from eachother.
|
java.util.List<net.minecraft.world.biome.Biome.SpawnListEntry> |
getSpawnList()
Return a list of hostile mobs to change spawn behavior.
|
java.lang.String |
getStructureName() |
void |
potentialSpawnsEvent(net.minecraftforge.event.world.WorldEvent.PotentialSpawns event)
Automatically registered to the event bus.
|
GelStructure<C> |
setLakeProof(boolean lakeProof)
Determines if lakes shuold generate inside of this structure or not.
|
findNearest, getSize, getStartFactory, isPositionInsideStructure, isPositionInStructure, place, withConfiguration
public GelStructure(java.util.function.Function<com.mojang.datafixers.Dynamic<?>,? extends C> configFactoryIn)
public GelStructure<C> setLakeProof(boolean lakeProof)
lakeProof
- public boolean canBeGenerated(net.minecraft.world.biome.BiomeManager biomeManagerIn, net.minecraft.world.gen.ChunkGenerator<?> chunkGen, java.util.Random rand, int chunkPosX, int chunkPosZ, net.minecraft.world.biome.Biome biomeIn)
getStartPositionForPosition(ChunkGenerator, Random, int, int, int, int)
to see if the
chunk is a valid chunk to generate this structure in, and then checks
getProbability()
to see if it will succeed in generating.canBeGenerated
in class net.minecraft.world.gen.feature.structure.Structure<C extends net.minecraft.world.gen.feature.IFeatureConfig>
public abstract int getSeed()
public abstract double getProbability()
public abstract int getSpacing()
public abstract int getOffset()
getSpacing()
to give the structure an offset as to
not make the grid apparent. It's recommended that this value is no larger
than half of what getSpacing()
returns to prevent structure
overlap.public java.lang.String getStructureName()
getStructureName
in class net.minecraft.world.gen.feature.structure.Structure<C extends net.minecraft.world.gen.feature.IFeatureConfig>
@Nullable public java.util.List<net.minecraft.world.biome.Biome.SpawnListEntry> getSpawnList()
getSpawnList
in class net.minecraft.world.gen.feature.Feature<C extends net.minecraft.world.gen.feature.IFeatureConfig>
@Nullable public java.util.List<net.minecraft.world.biome.Biome.SpawnListEntry> getCreatureSpawnList()
getCreatureSpawnList
in class net.minecraft.world.gen.feature.Feature<C extends net.minecraft.world.gen.feature.IFeatureConfig>
public void potentialSpawnsEvent(net.minecraftforge.event.world.WorldEvent.PotentialSpawns event)
getSpawnList()
or
getCreatureSpawnList()
to set the mob spawns that should occur.event
-