Class StructureFeature<C extends FeatureConfiguration>
java.lang.Object
net.minecraftforge.registries.ForgeRegistryEntry<StructureFeature<?>>
net.minecraft.world.level.levelgen.feature.StructureFeature<C>
- All Implemented Interfaces:
IForgeStructureFeature
,IForgeRegistryEntry<StructureFeature<?>>
- Direct Known Subclasses:
BuriedTreasureFeature
,DesertPyramidFeature
,EndCityFeature
,IglooFeature
,JigsawFeature
,JunglePyramidFeature
,MineshaftFeature
,NetherFortressFeature
,NetherFossilFeature
,OceanMonumentFeature
,OceanRuinFeature
,RuinedPortalFeature
,ShipwreckFeature
,StrongholdFeature
,SwamplandHutFeature
,WoodlandMansionFeature
public abstract class StructureFeature<C extends FeatureConfiguration>
extends ForgeRegistryEntry<StructureFeature<?>>
implements IForgeStructureFeature
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
Nested classes/interfaces inherited from class net.minecraftforge.registries.ForgeRegistryEntry
ForgeRegistryEntry.UncheckedRegistryEntry<V extends IForgeRegistryEntry<V>>
-
Field Summary
Modifier and TypeFieldDescriptionstatic StructureFeature<JigsawConfiguration>
private com.mojang.serialization.Codec<ConfiguredStructureFeature<C,StructureFeature<C>>>
private static ResourceLocation
private static org.apache.logging.log4j.Logger
static int
static List<StructureFeature<?>>
static StructureFeature<JigsawConfiguration>
private static Map<ResourceLocation,ResourceLocation>
private static Map<StructureFeature<?>,GenerationStep.Decoration>
static com.google.common.collect.BiMap<String,StructureFeature<?>>
static SwamplandHutFeature
static StructureFeature<JigsawConfiguration>
Fields inherited from class net.minecraftforge.registries.ForgeRegistryEntry
delegate
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
ConfiguredStructureFeature<C,? extends StructureFeature<C>>
configured(C p_67066_)
com.mojang.serialization.Codec<ConfiguredStructureFeature<C,StructureFeature<C>>>
private StructureStart<C>
createStart(ChunkPos p_160452_, int p_160453_, long p_160454_)
generate(RegistryAccess p_160465_, ChunkGenerator p_160466_, BiomeSource p_160467_, StructureManager p_160468_, long p_160469_, ChunkPos p_160470_, Biome p_160471_, int p_160472_, WorldgenRandom p_160473_, StructureFeatureConfiguration p_160474_, C p_160475_, LevelHeightAccessor p_160476_)
getNearestGeneratedFeature(LevelReader p_67047_, StructureFeatureManager p_67048_, BlockPos p_67049_, int p_67050_, boolean p_67051_, long p_67052_, StructureFeatureConfiguration p_67053_)
getPotentialFeatureChunk(StructureFeatureConfiguration p_67068_, long p_67069_, WorldgenRandom p_67070_, int p_67071_, int p_67072_)
getSpawnList(MobCategory classification)
Helper method to get the list of entity spawns for this structure for the given classification.abstract StructureFeature.StructureStartFactory<C>
protected boolean
isFeatureChunk(ChunkGenerator p_160455_, BiomeSource p_160456_, long p_160457_, WorldgenRandom p_160458_, ChunkPos p_160459_, Biome p_160460_, ChunkPos p_160461_, C p_160462_, LevelHeightAccessor p_160463_)
protected boolean
static StructureStart<?>
loadStaticStart(ServerLevel p_160448_, CompoundTag p_160449_, long p_160450_)
private static <F extends StructureFeature<?>>
Fregister(String p_67090_, F p_67091_, GenerationStep.Decoration p_67092_)
step()
Methods inherited from class net.minecraftforge.registries.ForgeRegistryEntry
getRegistryName, getRegistryType, setRegistryName, setRegistryName, setRegistryName
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minecraftforge.common.extensions.IForgeStructureFeature
getDefaultCreatureSpawnList, getDefaultRestrictsSpawnsToInside, getDefaultSpawnList, getDefaultSpawnList
-
Field Details
-
STRUCTURES_REGISTRY
public static final com.google.common.collect.BiMap<String,StructureFeature<?>> STRUCTURES_REGISTRY -
STEP
-
LOGGER
private static final org.apache.logging.log4j.Logger LOGGER -
PILLAGER_OUTPOST
-
MINESHAFT
-
WOODLAND_MANSION
-
JUNGLE_TEMPLE
-
DESERT_PYRAMID
-
IGLOO
-
RUINED_PORTAL
-
SHIPWRECK
-
SWAMP_HUT
-
STRONGHOLD
-
OCEAN_MONUMENT
-
OCEAN_RUIN
-
NETHER_BRIDGE
-
END_CITY
-
BURIED_TREASURE
-
VILLAGE
-
NETHER_FOSSIL
-
BASTION_REMNANT
-
NOISE_AFFECTING_FEATURES
-
JIGSAW_RENAME
-
RENAMES
-
MAX_STRUCTURE_RANGE
public static final int MAX_STRUCTURE_RANGE- See Also:
- Constant Field Values
-
configuredStructureCodec
private final com.mojang.serialization.Codec<ConfiguredStructureFeature<C extends FeatureConfiguration,StructureFeature<C extends FeatureConfiguration>>> configuredStructureCodec
-
-
Constructor Details
-
StructureFeature
-
-
Method Details
-
register
private static <F extends StructureFeature<?>> F register(String p_67090_, F p_67091_, GenerationStep.Decoration p_67092_) -
step
-
bootstrap
public static void bootstrap() -
loadStaticStart
@Nullable public static StructureStart<?> loadStaticStart(ServerLevel p_160448_, CompoundTag p_160449_, long p_160450_) -
configuredStructureCodec
public com.mojang.serialization.Codec<ConfiguredStructureFeature<C,StructureFeature<C>>> configuredStructureCodec() -
configured
-
getNearestGeneratedFeature
@Nullable public BlockPos getNearestGeneratedFeature(LevelReader p_67047_, StructureFeatureManager p_67048_, BlockPos p_67049_, int p_67050_, boolean p_67051_, long p_67052_, StructureFeatureConfiguration p_67053_) -
linearSeparation
protected boolean linearSeparation() -
getPotentialFeatureChunk
public final ChunkPos getPotentialFeatureChunk(StructureFeatureConfiguration p_67068_, long p_67069_, WorldgenRandom p_67070_, int p_67071_, int p_67072_) -
isFeatureChunk
protected boolean isFeatureChunk(ChunkGenerator p_160455_, BiomeSource p_160456_, long p_160457_, WorldgenRandom p_160458_, ChunkPos p_160459_, Biome p_160460_, ChunkPos p_160461_, C p_160462_, LevelHeightAccessor p_160463_) -
createStart
-
generate
public StructureStart<?> generate(RegistryAccess p_160465_, ChunkGenerator p_160466_, BiomeSource p_160467_, StructureManager p_160468_, long p_160469_, ChunkPos p_160470_, Biome p_160471_, int p_160472_, WorldgenRandom p_160473_, StructureFeatureConfiguration p_160474_, C p_160475_, LevelHeightAccessor p_160476_) -
getStartFactory
-
getFeatureName
-
getSpecialEnemies
-
getSpecialAnimals
-
getSpecialUndergroundWaterAnimals
-
getSpawnList
public final WeightedRandomList<MobSpawnSettings.SpawnerData> getSpawnList(MobCategory classification)Description copied from interface:IForgeStructureFeature
Helper method to get the list of entity spawns for this structure for the given classification.- Specified by:
getSpawnList
in interfaceIForgeStructureFeature
- Parameters:
classification
- The classification of entities.
-