mirror of https://github.com/PaperMC/Paper.git
28 lines
1.2 KiB
Diff
28 lines
1.2 KiB
Diff
--- a/net/minecraft/server/level/WorldGenRegion.java
|
|
+++ b/net/minecraft/server/level/WorldGenRegion.java
|
|
@@ -221,8 +208,8 @@
|
|
if (blockstate.isAir()) {
|
|
return false;
|
|
} else {
|
|
- if (flag) {
|
|
- BlockEntity blockentity = blockstate.hasBlockEntity() ? this.getBlockEntity(blockpos) : null;
|
|
+ if (false) { // CraftBukkit - SPIGOT-6833: Do not drop during world generation
|
|
+ BlockEntity tileentity = iblockdata.hasBlockEntity() ? this.getBlockEntity(pos) : null;
|
|
|
|
Block.dropResources(blockstate, this.level, blockpos, blockentity, entity, ItemStack.EMPTY);
|
|
}
|
|
@@ -344,6 +327,13 @@
|
|
@Override
|
|
@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 j = SectionPos.blockToSectionCoord(entity.getBlockZ());
|
|
|