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. For jigsaw related structures, use
GelJigsawStructure
or it's children.Modifier and Type | Field and Description |
---|---|
boolean |
insideSpawnsOnly
When
true , mobs can only spawn inside of the structure's pieces. |
java.lang.Integer |
seed
The seed used for generation.
|
java.util.Map<net.minecraft.entity.EntityClassification,java.util.List<net.minecraft.world.biome.MobSpawnInfo.Spawners>> |
spawns
A map of mobs that spawn within the structure's bounds.
|
BASTION_REMNANT, BURIED_TREASURE, DESERT_PYRAMID, END_CITY, field_236384_t_, FORTRESS, IGLOO, JUNGLE_PYRAMID, MINESHAFT, MONUMENT, NAME_STRUCTURE_BIMAP, NETHER_FOSSIL, OCEAN_RUIN, PILLAGER_OUTPOST, RUINED_PORTAL, SHIPWRECK, STRONGHOLD, STRUCTURE_DECORATION_STAGE_MAP, SWAMP_HUT, VILLAGE, WOODLAND_MANSION
Constructor and Description |
---|
GelStructure(com.mojang.serialization.Codec<C> codec) |
Modifier and Type | Method and Description |
---|---|
net.minecraft.util.math.BlockPos |
func_236388_a_(net.minecraft.world.IWorldReader worldIn,
net.minecraft.world.gen.feature.structure.StructureManager structureManager,
net.minecraft.util.math.BlockPos startPos,
int searchRadius,
boolean skipExistingChunks,
long seed,
net.minecraft.world.gen.settings.StructureSeparationSettings settings) |
net.minecraft.util.math.ChunkPos |
getChunkPosForStructure(net.minecraft.world.gen.settings.StructureSeparationSettings settings,
long seed,
net.minecraft.util.SharedSeedRandom sharedSeedRand,
int x,
int z)
Checks to see if this structure can generate in the given chunk using a grid
with custom spacing and offsets.
|
java.util.List<net.minecraft.world.biome.MobSpawnInfo.Spawners> |
getCreatureSpawnList()
Deprecated.
|
net.minecraft.world.gen.GenerationStage.Decoration |
getDecorationStage()
What stage of generation your structure should be generated during.
|
java.util.List<net.minecraft.world.gen.DimensionSettings> |
getNoiseSettingsToGenerateIn()
Gets a list of
DimensionSettings to tell your structure where to
generate. |
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.
|
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.
|
net.minecraft.world.gen.settings.StructureSeparationSettings |
getSeparationSettings()
Gets a
StructureSeparationSettings based on the API values. |
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.MobSpawnInfo.Spawners> |
getSpawnList()
Deprecated.
|
java.util.List<net.minecraft.world.biome.MobSpawnInfo.Spawners> |
getSpawns(net.minecraft.entity.EntityClassification classification)
Returns a list of mobs to spawn based on the classification put in.
|
java.lang.String |
getStructureName()
Gets the registry name of the structure.
|
void |
potentialSpawnsEvent(net.minecraftforge.event.world.StructureSpawnListGatherEvent event)
Automatically registered to the event bus.
|
GelStructure<C> |
setLakeProof(boolean lakeProof)
Determines if lakes shuold generate inside of this structure or not.
|
GelStructure<C> |
setSpawnList(net.minecraft.entity.EntityClassification classification,
java.util.List<net.minecraft.world.biome.MobSpawnInfo.Spawners> spawns)
Sets the spawns that can exist in this structure for the passed mob
classification.
|
deserializeStructureStart, func_242785_a, getFeatureCodec, getSpawnList, getStartFactory, init, withConfiguration
getRegistryName, getRegistryType, setRegistryName, setRegistryName, setRegistryName
public final java.util.Map<net.minecraft.entity.EntityClassification,java.util.List<net.minecraft.world.biome.MobSpawnInfo.Spawners>> spawns
setSpawnList(EntityClassification, List)
to add to it.public boolean insideSpawnsOnly
true
, mobs can only spawn inside of the structure's pieces. When
false
, mobs can spawn within area around the structure.public java.lang.Integer seed
getSeed()
is called, but you can assign it in your constructor.public GelStructure(com.mojang.serialization.Codec<C> codec)
public GelStructure<C> setLakeProof(boolean lakeProof)
lakeProof
- GelStructure
public GelStructure<C> setSpawnList(net.minecraft.entity.EntityClassification classification, java.util.List<net.minecraft.world.biome.MobSpawnInfo.Spawners> spawns)
classification
- spawns
- GelStructure
public java.util.List<net.minecraft.world.gen.DimensionSettings> getNoiseSettingsToGenerateIn()
DimensionSettings
to tell your structure where to
generate. Can be set using configs. Defaults to every setting.List
public net.minecraft.world.gen.GenerationStage.Decoration getDecorationStage()
getDecorationStage
in class net.minecraft.world.gen.feature.structure.Structure<C extends net.minecraft.world.gen.feature.IFeatureConfig>
GenerationStage.Decoration
public net.minecraft.util.math.ChunkPos getChunkPosForStructure(net.minecraft.world.gen.settings.StructureSeparationSettings settings, long seed, net.minecraft.util.SharedSeedRandom sharedSeedRand, int x, int z)
getChunkPosForStructure
in class net.minecraft.world.gen.feature.structure.Structure<C extends net.minecraft.world.gen.feature.IFeatureConfig>
ChunkPos
getSpacing()
,
getOffset()
public net.minecraft.util.math.BlockPos func_236388_a_(net.minecraft.world.IWorldReader worldIn, net.minecraft.world.gen.feature.structure.StructureManager structureManager, net.minecraft.util.math.BlockPos startPos, int searchRadius, boolean skipExistingChunks, long seed, net.minecraft.world.gen.settings.StructureSeparationSettings settings)
func_236388_a_
in class net.minecraft.world.gen.feature.structure.Structure<C extends net.minecraft.world.gen.feature.IFeatureConfig>
public int getSeed()
Integer
public abstract double getProbability()
Double
public abstract int getSpacing()
Integer
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.Integer
public java.lang.String getStructureName()
getStructureName
in class net.minecraft.world.gen.feature.structure.Structure<C extends net.minecraft.world.gen.feature.IFeatureConfig>
String
@Nullable @Deprecated public java.util.List<net.minecraft.world.biome.MobSpawnInfo.Spawners> getSpawnList()
getSpawns(EntityClassification)
and
setSpawnList(EntityClassification, List)
.getSpawnList
in class net.minecraft.world.gen.feature.structure.Structure<C extends net.minecraft.world.gen.feature.IFeatureConfig>
List
@Nullable @Deprecated public java.util.List<net.minecraft.world.biome.MobSpawnInfo.Spawners> getCreatureSpawnList()
getSpawns(EntityClassification)
and
setSpawnList(EntityClassification, List)
.getCreatureSpawnList
in class net.minecraft.world.gen.feature.structure.Structure<C extends net.minecraft.world.gen.feature.IFeatureConfig>
List
@Nullable public java.util.List<net.minecraft.world.biome.MobSpawnInfo.Spawners> getSpawns(net.minecraft.entity.EntityClassification classification)
spawns
will return null, and be ignored.classification
- List
public void potentialSpawnsEvent(net.minecraftforge.event.world.StructureSpawnListGatherEvent event)
getSpawns(EntityClassification)
to get what mobs should spawn.event
- public net.minecraft.world.gen.settings.StructureSeparationSettings getSeparationSettings()
StructureSeparationSettings
based on the API values.StructureSeparationSettings