类 StructureSettingsBuilder.StructureSpawnOverrideBuilder
java.lang.Object
net.neoforged.neoforge.common.world.StructureSettingsBuilder.StructureSpawnOverrideBuilder
-
字段概要
字段修饰符和类型字段说明private final WeightedList.Builder
<MobSpawnSettings.SpawnerData> private final List
<Weighted<MobSpawnSettings.SpawnerData>> -
构造器概要
构造器限定符构造器说明private
StructureSpawnOverrideBuilder
(StructureSpawnOverride.BoundingBoxType boundingBox, WeightedList<MobSpawnSettings.SpawnerData> spawns) -
方法概要
修饰符和类型方法说明void
Adds a spawn to the overrides.void
addSpawn
(MobSpawnSettings.SpawnerData spawn, int weight) Adds a spawn to the overrides.build()
copyOf
(StructureSpawnOverride override) Gets the type of bounding box for this structures spawn overrides.Unmodifiable view of the possible spawns.void
Removes a given spawn from the list of overrides.void
Removes a given spawn from the list of overrides.void
removeSpawns
(Predicate<Weighted<MobSpawnSettings.SpawnerData>> spawnPredicate) void
setBoundingBox
(StructureSpawnOverride.BoundingBoxType boundingBox) Sets the way the structure checks for spawn overrides.
-
字段详细资料
-
boundingBox
-
spawns
-
spawnsView
-
-
构造器详细资料
-
StructureSpawnOverrideBuilder
private StructureSpawnOverrideBuilder(StructureSpawnOverride.BoundingBoxType boundingBox, WeightedList<MobSpawnSettings.SpawnerData> spawns)
-
-
方法详细资料
-
copyOf
public static StructureSettingsBuilder.StructureSpawnOverrideBuilder copyOf(StructureSpawnOverride override) - 参数:
override
- Existing spawn override data.- 返回:
- A new builder with a copy of that StructureSpawnOverride's values.
-
getBoundingBox
Gets the type of bounding box for this structures spawn overrides. -
setBoundingBox
Sets the way the structure checks for spawn overrides. Whether it is on a piece by piece basis or within the bounds of the overall structure. -
getSpawns
Unmodifiable view of the possible spawns. -
addSpawn
Adds a spawn to the overrides. -
addSpawn
Adds a spawn to the overrides. -
removeSpawn
Removes a given spawn from the list of overrides. UsegetSpawns()
to get instances of spawn data to remove. -
removeSpawn
Removes a given spawn from the list of overrides. UsegetSpawns()
to get instances of spawn data to remove. -
removeSpawns
-
build
- 返回:
- A new StructureSpawnOverride with the finalized values.
-