PaperMC/paper-server/patches/sources/net/minecraft/server/level/WorldGenRegion.java.patch
CraftBukkit/Spigot 30e4583dbe Remap CraftBukkit to Mojang+Yarn Mappings
By: Initial Source <noreply+automated@papermc.io>
2024-12-11 22:26:55 +01:00

25 lines
1.1 KiB
Diff

--- a/net/minecraft/server/level/WorldGenRegion.java
+++ b/net/minecraft/server/level/WorldGenRegion.java
@@ -217,7 +217,7 @@
if (iblockdata.isAir()) {
return false;
} else {
- if (drop) {
+ if (false) { // CraftBukkit - SPIGOT-6833: Do not drop during world generation
BlockEntity tileentity = iblockdata.hasBlockEntity() ? this.getBlockEntity(pos) : null;
Block.dropResources(iblockdata, this.level, pos, tileentity, breakingEntity, ItemStack.EMPTY);
@@ -336,6 +336,13 @@
@Override
public boolean addFreshEntity(Entity entity) {
+ // CraftBukkit start
+ return this.addFreshEntity(entity, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.DEFAULT);
+ }
+
+ @Override
+ public boolean addFreshEntity(Entity entity, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason reason) {
+ // CraftBukkit end
int i = SectionPos.blockToSectionCoord(entity.getBlockX());
int j = SectionPos.blockToSectionCoord(entity.getBlockZ());