aboutsummaryrefslogtreecommitdiffhomepage
path: root/patch-remap/mache-vineflower-stripped/net/minecraft/server/level/WorldGenRegion.java.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patch-remap/mache-vineflower-stripped/net/minecraft/server/level/WorldGenRegion.java.patch')
-rw-r--r--patch-remap/mache-vineflower-stripped/net/minecraft/server/level/WorldGenRegion.java.patch30
1 files changed, 30 insertions, 0 deletions
diff --git a/patch-remap/mache-vineflower-stripped/net/minecraft/server/level/WorldGenRegion.java.patch b/patch-remap/mache-vineflower-stripped/net/minecraft/server/level/WorldGenRegion.java.patch
new file mode 100644
index 0000000000..6b215d0f7c
--- /dev/null
+++ b/patch-remap/mache-vineflower-stripped/net/minecraft/server/level/WorldGenRegion.java.patch
@@ -0,0 +1,30 @@
+--- a/net/minecraft/server/level/WorldGenRegion.java
++++ b/net/minecraft/server/level/WorldGenRegion.java
+@@ -207,9 +208,10 @@
+ if (blockState.isAir()) {
+ return false;
+ } else {
+- if (dropBlock) {
+- BlockEntity blockEntity = blockState.hasBlockEntity() ? this.getBlockEntity(pos) : null;
+- Block.dropResources(blockState, this.level, pos, blockEntity, entity, ItemStack.EMPTY);
++ 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, entity, ItemStack.EMPTY);
+ }
+
+ return this.setBlock(pos, Blocks.AIR.defaultBlockState(), 3, recursionLeft);
+@@ -328,6 +327,13 @@
+
+ @Override
+ public boolean addFreshEntity(Entity entity) {
++ // CraftBukkit start
++ return 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 i1 = SectionPos.blockToSectionCoord(entity.getBlockZ());
+ this.getChunk(i, i1).addEntity(entity);