@@ -1,23 +1,21 @@
|
||||
--- a/net/minecraft/world/level/levelgen/ChunkProviderFlat.java
|
||||
+++ b/net/minecraft/world/level/levelgen/ChunkProviderFlat.java
|
||||
@@ -32,11 +32,17 @@
|
||||
@@ -35,10 +35,16 @@
|
||||
private final GeneratorSettingsFlat settings;
|
||||
|
||||
public ChunkProviderFlat(IRegistry<StructureSet> iregistry, GeneratorSettingsFlat generatorsettingsflat) {
|
||||
- Optional optional = generatorsettingsflat.structureOverrides();
|
||||
public ChunkProviderFlat(GeneratorSettingsFlat generatorsettingsflat) {
|
||||
- WorldChunkManagerHell worldchunkmanagerhell = new WorldChunkManagerHell(generatorsettingsflat.getBiome());
|
||||
+ // CraftBukkit start
|
||||
+ // Optional optional = generatorsettingsflat.structureOverrides();
|
||||
+ // WorldChunkManagerHell worldchunkmanagerhell = new WorldChunkManagerHell(generatorsettingsflat.getBiome());
|
||||
|
||||
- Objects.requireNonNull(generatorsettingsflat);
|
||||
- super(iregistry, optional, worldchunkmanagerhell, SystemUtils.memoize(generatorsettingsflat::adjustGenerationSettings));
|
||||
- super(worldchunkmanagerhell, SystemUtils.memoize(generatorsettingsflat::adjustGenerationSettings));
|
||||
+ // Objects.requireNonNull(generatorsettingsflat);
|
||||
+ this(iregistry, generatorsettingsflat, new WorldChunkManagerHell(generatorsettingsflat.getBiome()));
|
||||
+ this(generatorsettingsflat, new WorldChunkManagerHell(generatorsettingsflat.getBiome()));
|
||||
+ }
|
||||
+
|
||||
+ public ChunkProviderFlat(IRegistry<StructureSet> iregistry, GeneratorSettingsFlat generatorsettingsflat, net.minecraft.world.level.biome.WorldChunkManager worldchunkmanager) {
|
||||
+ super(iregistry, generatorsettingsflat.structureOverrides(), worldchunkmanager, SystemUtils.memoize(generatorsettingsflat::adjustGenerationSettings));
|
||||
+ public ChunkProviderFlat(GeneratorSettingsFlat generatorsettingsflat, net.minecraft.world.level.biome.WorldChunkManager worldchunkmanager) {
|
||||
+ super(worldchunkmanager, SystemUtils.memoize(generatorsettingsflat::adjustGenerationSettings));
|
||||
+ // CraftBukkit end
|
||||
this.settings = generatorsettingsflat;
|
||||
}
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
--- a/net/minecraft/world/level/levelgen/MobSpawnerPhantom.java
|
||||
+++ b/net/minecraft/world/level/levelgen/MobSpawnerPhantom.java
|
||||
@@ -75,7 +75,7 @@
|
||||
|
||||
entityphantom.moveTo(blockposition1, 0.0F, 0.0F);
|
||||
groupdataentity = entityphantom.finalizeSpawn(worldserver, difficultydamagescaler, EnumMobSpawn.NATURAL, groupdataentity, (NBTTagCompound) null);
|
||||
- worldserver.addFreshEntityWithPassengers(entityphantom);
|
||||
+ worldserver.addFreshEntityWithPassengers(entityphantom, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.NATURAL); // CraftBukkit
|
||||
@@ -76,7 +76,7 @@
|
||||
if (entityphantom != null) {
|
||||
entityphantom.moveTo(blockposition1, 0.0F, 0.0F);
|
||||
groupdataentity = entityphantom.finalizeSpawn(worldserver, difficultydamagescaler, EnumMobSpawn.NATURAL, groupdataentity, (NBTTagCompound) null);
|
||||
- worldserver.addFreshEntityWithPassengers(entityphantom);
|
||||
+ worldserver.addFreshEntityWithPassengers(entityphantom, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.NATURAL); // CraftBukkit
|
||||
++i;
|
||||
}
|
||||
}
|
||||
|
||||
i += k;
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
--- a/net/minecraft/world/level/levelgen/structure/structures/SwampHutPiece.java
|
||||
+++ b/net/minecraft/world/level/levelgen/structure/structures/SwampHutPiece.java
|
||||
@@ -99,7 +99,7 @@
|
||||
entitywitch.setPersistenceRequired();
|
||||
entitywitch.moveTo((double) blockposition_mutableblockposition.getX() + 0.5D, (double) blockposition_mutableblockposition.getY(), (double) blockposition_mutableblockposition.getZ() + 0.5D, 0.0F, 0.0F);
|
||||
entitywitch.finalizeSpawn(generatoraccessseed, generatoraccessseed.getCurrentDifficultyAt(blockposition_mutableblockposition), EnumMobSpawn.STRUCTURE, (GroupDataEntity) null, (NBTTagCompound) null);
|
||||
- generatoraccessseed.addFreshEntityWithPassengers(entitywitch);
|
||||
+ generatoraccessseed.addFreshEntityWithPassengers(entitywitch, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.CHUNK_GEN); // CraftBukkit - add SpawnReason
|
||||
@@ -100,7 +100,7 @@
|
||||
entitywitch.setPersistenceRequired();
|
||||
entitywitch.moveTo((double) blockposition_mutableblockposition.getX() + 0.5D, (double) blockposition_mutableblockposition.getY(), (double) blockposition_mutableblockposition.getZ() + 0.5D, 0.0F, 0.0F);
|
||||
entitywitch.finalizeSpawn(generatoraccessseed, generatoraccessseed.getCurrentDifficultyAt(blockposition_mutableblockposition), EnumMobSpawn.STRUCTURE, (GroupDataEntity) null, (NBTTagCompound) null);
|
||||
- generatoraccessseed.addFreshEntityWithPassengers(entitywitch);
|
||||
+ generatoraccessseed.addFreshEntityWithPassengers(entitywitch, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.CHUNK_GEN); // CraftBukkit - add SpawnReason
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -118,7 +118,7 @@
|
||||
entitycat.setPersistenceRequired();
|
||||
entitycat.moveTo((double) blockposition_mutableblockposition.getX() + 0.5D, (double) blockposition_mutableblockposition.getY(), (double) blockposition_mutableblockposition.getZ() + 0.5D, 0.0F, 0.0F);
|
||||
entitycat.finalizeSpawn(worldaccess, worldaccess.getCurrentDifficultyAt(blockposition_mutableblockposition), EnumMobSpawn.STRUCTURE, (GroupDataEntity) null, (NBTTagCompound) null);
|
||||
- worldaccess.addFreshEntityWithPassengers(entitycat);
|
||||
+ worldaccess.addFreshEntityWithPassengers(entitycat, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.CHUNK_GEN); // CraftBukkit - add SpawnReason
|
||||
@@ -121,7 +121,7 @@
|
||||
entitycat.setPersistenceRequired();
|
||||
entitycat.moveTo((double) blockposition_mutableblockposition.getX() + 0.5D, (double) blockposition_mutableblockposition.getY(), (double) blockposition_mutableblockposition.getZ() + 0.5D, 0.0F, 0.0F);
|
||||
entitycat.finalizeSpawn(worldaccess, worldaccess.getCurrentDifficultyAt(blockposition_mutableblockposition), EnumMobSpawn.STRUCTURE, (GroupDataEntity) null, (NBTTagCompound) null);
|
||||
- worldaccess.addFreshEntityWithPassengers(entitycat);
|
||||
+ worldaccess.addFreshEntityWithPassengers(entitycat, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.CHUNK_GEN); // CraftBukkit - add SpawnReason
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/level/levelgen/structure/templatesystem/DefinedStructure.java
|
||||
+++ b/net/minecraft/world/level/levelgen/structure/templatesystem/DefinedStructure.java
|
||||
@@ -51,6 +51,12 @@
|
||||
@@ -52,6 +52,12 @@
|
||||
import net.minecraft.world.phys.shapes.VoxelShapeBitSet;
|
||||
import net.minecraft.world.phys.shapes.VoxelShapeDiscrete;
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
public class DefinedStructure {
|
||||
|
||||
public static final String PALETTE_TAG = "palette";
|
||||
@@ -70,6 +76,11 @@
|
||||
@@ -71,6 +77,11 @@
|
||||
private BaseBlockPosition size;
|
||||
private String author;
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
public DefinedStructure() {
|
||||
this.size = BaseBlockPosition.ZERO;
|
||||
this.author = "?";
|
||||
@@ -143,7 +154,7 @@
|
||||
@@ -144,7 +155,7 @@
|
||||
}
|
||||
|
||||
private static List<DefinedStructure.BlockInfo> buildInfoList(List<DefinedStructure.BlockInfo> list, List<DefinedStructure.BlockInfo> list1, List<DefinedStructure.BlockInfo> list2) {
|
||||
@@ -34,7 +34,7 @@
|
||||
return definedstructure_blockinfo.pos.getY();
|
||||
}).thenComparingInt((definedstructure_blockinfo) -> {
|
||||
return definedstructure_blockinfo.pos.getX();
|
||||
@@ -464,11 +475,13 @@
|
||||
@@ -465,11 +476,13 @@
|
||||
}
|
||||
|
||||
private static Optional<Entity> createEntityIgnoreException(WorldAccess worldaccess, NBTTagCompound nbttagcompound) {
|
||||
@@ -52,7 +52,7 @@
|
||||
}
|
||||
|
||||
public BaseBlockPosition getSize(EnumBlockRotation enumblockrotation) {
|
||||
@@ -683,6 +696,13 @@
|
||||
@@ -684,6 +697,13 @@
|
||||
nbttagcompound.put("entities", nbttaglist3);
|
||||
nbttagcompound.put("size", this.newIntegerList(this.size.getX(), this.size.getY(), this.size.getZ()));
|
||||
nbttagcompound.putInt("DataVersion", SharedConstants.getCurrentVersion().getWorldVersion());
|
||||
@@ -66,7 +66,7 @@
|
||||
return nbttagcompound;
|
||||
}
|
||||
|
||||
@@ -722,6 +742,12 @@
|
||||
@@ -723,6 +743,12 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -78,8 +78,8 @@
|
||||
+ // CraftBukkit end
|
||||
}
|
||||
|
||||
private void loadPalette(NBTTagList nbttaglist, NBTTagList nbttaglist1) {
|
||||
@@ -861,7 +887,7 @@
|
||||
private void loadPalette(HolderGetter<Block> holdergetter, NBTTagList nbttaglist, NBTTagList nbttaglist1) {
|
||||
@@ -862,7 +888,7 @@
|
||||
public IBlockData stateFor(int i) {
|
||||
IBlockData iblockdata = (IBlockData) this.ids.byId(i);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user