mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-11 17:31:06 +01:00
7c2dc4b342
* finish implementing all adventure components in codecs * add some initial tests * Add round trip tests for text and translatable components * Add more round trip test data (score component is failing) * Add more round trip test data * Fix SCORE_COMPONENT_MAP_CODEC * Improve test failure messages * Add failure cases * Add a couple more test data * Make use of AdventureCodecs * Update patches after rebase * Squash changes into adventure patch * Fix AT formatting * update comment --------- Co-authored-by: Jason Penilla <11360596+jpenilla@users.noreply.github.com>
35 lines
2.2 KiB
Diff
35 lines
2.2 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Jake Potrebic <jake.m.potrebic@gmail.com>
|
|
Date: Fri, 18 Mar 2022 21:30:00 -0700
|
|
Subject: [PATCH] Fix async entity add due to fungus trees
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/level/WorldGenRegion.java b/src/main/java/net/minecraft/server/level/WorldGenRegion.java
|
|
index 49c7825156afd053df1b7721a63070b51427aff2..14a5492428eac823a295ef3746d0aca6fbdab4ec 100644
|
|
--- a/src/main/java/net/minecraft/server/level/WorldGenRegion.java
|
|
+++ b/src/main/java/net/minecraft/server/level/WorldGenRegion.java
|
|
@@ -249,6 +249,7 @@ public class WorldGenRegion implements WorldGenLevel {
|
|
if (iblockdata.isAir()) {
|
|
return false;
|
|
} else {
|
|
+ if (drop) LOGGER.warn("Potential async entity add during worldgen", new Throwable()); // Paper - log when this happens
|
|
if (false) { // CraftBukkit - SPIGOT-6833: Do not drop during world generation
|
|
BlockEntity tileentity = iblockdata.hasBlockEntity() ? this.getBlockEntity(pos) : null;
|
|
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java
|
|
index 76d529ad7d1ce543b8f262b3a36f17405cc9da92..866fd29fe52d7eec4e72db400a05645eb8984a2b 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java
|
|
@@ -405,10 +405,10 @@ public abstract class CraftRegionAccessor implements RegionAccessor {
|
|
((ChorusFlowerBlock) Blocks.CHORUS_FLOWER).generatePlant(access, pos, random, 8);
|
|
return true;
|
|
case CRIMSON_FUNGUS:
|
|
- gen = TreeFeatures.CRIMSON_FUNGUS_PLANTED;
|
|
+ gen = this.isNormalWorld() ? TreeFeatures.CRIMSON_FUNGUS_PLANTED : TreeFeatures.CRIMSON_FUNGUS; // Paper - if world gen, don't use planted version
|
|
break;
|
|
case WARPED_FUNGUS:
|
|
- gen = TreeFeatures.WARPED_FUNGUS_PLANTED;
|
|
+ gen = this.isNormalWorld() ? TreeFeatures.WARPED_FUNGUS_PLANTED : TreeFeatures.WARPED_FUNGUS; // Paper - if world gen, don't use planted version
|
|
break;
|
|
case AZALEA:
|
|
gen = TreeFeatures.AZALEA_TREE;
|