3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-18 20:40:08 +01:00

SPIGOT-5906: Huge Fungi tree generation

Dieser Commit ist enthalten in:
md_5 2020-07-01 09:50:58 +10:00
Ursprung fdf6017fa9
Commit 5a6c529833
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: E8E901AC7C617C11
2 geänderte Dateien mit 25 neuen und 0 gelöschten Zeilen

16
nms-patches/BlockFungi.patch Normale Datei
Datei anzeigen

@ -0,0 +1,16 @@
--- a/net/minecraft/server/BlockFungi.java
+++ b/net/minecraft/server/BlockFungi.java
@@ -38,6 +38,13 @@
@Override
public void a(WorldServer worldserver, Random random, BlockPosition blockposition, IBlockData iblockdata) {
+ // CraftBukkit start
+ if (this == Blocks.WARPED_FUNGUS) {
+ BlockSapling.treeType = org.bukkit.TreeType.WARPED_FUNGUS;
+ } else if (this == Blocks.CRIMSON_FUNGUS) {
+ BlockSapling.treeType = org.bukkit.TreeType.CRIMSON_FUNGUS;
+ }
+ // CraftBukkit end
((WorldGenFeatureConfigured) this.b.get()).a(worldserver, worldserver.getStructureManager(), worldserver.getChunkProvider().getChunkGenerator(), random, blockposition);
}
}

Datei anzeigen

@ -88,6 +88,7 @@ import net.minecraft.server.Ticket;
import net.minecraft.server.TicketType; import net.minecraft.server.TicketType;
import net.minecraft.server.Unit; import net.minecraft.server.Unit;
import net.minecraft.server.Vec3D; import net.minecraft.server.Vec3D;
import net.minecraft.server.WorldGenFeatureHugeFungiConfiguration;
import net.minecraft.server.WorldGenerator; import net.minecraft.server.WorldGenerator;
import net.minecraft.server.WorldServer; import net.minecraft.server.WorldServer;
import org.apache.commons.lang.Validate; import org.apache.commons.lang.Validate;
@ -729,6 +730,14 @@ public class CraftWorld implements World {
case CHORUS_PLANT: case CHORUS_PLANT:
((BlockChorusFlower) Blocks.CHORUS_FLOWER).a(world, pos, rand, 8); ((BlockChorusFlower) Blocks.CHORUS_FLOWER).a(world, pos, rand, 8);
return true; return true;
case CRIMSON_FUNGUS:
gen = WorldGenerator.HUGE_FUNGUS;
conf = WorldGenFeatureHugeFungiConfiguration.b;
break;
case WARPED_FUNGUS:
gen = WorldGenerator.HUGE_FUNGUS;
conf = WorldGenFeatureHugeFungiConfiguration.d;
break;
case TREE: case TREE:
default: default:
gen = WorldGenerator.TREE; gen = WorldGenerator.TREE;