geforkt von Mirrors/Paper
SPIGOT-5141: World.generateTree() causes ClassCastException with huge mushrooms
Dieser Commit ist enthalten in:
Ursprung
31d4a777c7
Commit
a2275f19e9
@ -80,6 +80,7 @@ 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.WorldGenFeatureEmptyConfiguration;
|
import net.minecraft.server.WorldGenFeatureEmptyConfiguration;
|
||||||
|
import net.minecraft.server.WorldGenHugeMushroomConfiguration;
|
||||||
import net.minecraft.server.WorldGenerator;
|
import net.minecraft.server.WorldGenerator;
|
||||||
import net.minecraft.server.WorldNBTStorage;
|
import net.minecraft.server.WorldNBTStorage;
|
||||||
import net.minecraft.server.WorldServer;
|
import net.minecraft.server.WorldServer;
|
||||||
@ -571,8 +572,9 @@ public class CraftWorld implements World {
|
|||||||
BlockPosition pos = new BlockPosition(loc.getBlockX(), loc.getBlockY(), loc.getBlockZ());
|
BlockPosition pos = new BlockPosition(loc.getBlockX(), loc.getBlockY(), loc.getBlockZ());
|
||||||
|
|
||||||
net.minecraft.server.WorldGenerator gen;
|
net.minecraft.server.WorldGenerator gen;
|
||||||
|
net.minecraft.server.WorldGenFeatureConfiguration conf = new WorldGenFeatureEmptyConfiguration();
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case BIG_TREE:
|
case BIG_TREE:
|
||||||
gen = WorldGenerator.FANCY_TREE;
|
gen = WorldGenerator.FANCY_TREE;
|
||||||
break;
|
break;
|
||||||
case BIRCH:
|
case BIRCH:
|
||||||
@ -598,9 +600,11 @@ public class CraftWorld implements World {
|
|||||||
break;
|
break;
|
||||||
case RED_MUSHROOM:
|
case RED_MUSHROOM:
|
||||||
gen = WorldGenerator.HUGE_RED_MUSHROOM;
|
gen = WorldGenerator.HUGE_RED_MUSHROOM;
|
||||||
|
conf = new WorldGenHugeMushroomConfiguration(true);
|
||||||
break;
|
break;
|
||||||
case BROWN_MUSHROOM:
|
case BROWN_MUSHROOM:
|
||||||
gen = WorldGenerator.HUGE_BROWN_MUSHROOM;
|
gen = WorldGenerator.HUGE_BROWN_MUSHROOM;
|
||||||
|
conf = new WorldGenHugeMushroomConfiguration(true);
|
||||||
break;
|
break;
|
||||||
case SWAMP:
|
case SWAMP:
|
||||||
gen = WorldGenerator.SWAMP_TREE;
|
gen = WorldGenerator.SWAMP_TREE;
|
||||||
@ -626,7 +630,7 @@ public class CraftWorld implements World {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return gen.generate(world, world.worldProvider.getChunkGenerator(), rand, pos, new WorldGenFeatureEmptyConfiguration());
|
return gen.generate(world, world.worldProvider.getChunkGenerator(), rand, pos, conf);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren