mirror of
https://github.com/PaperMC/Paper.git
synced 2025-02-11 10:01:55 +01:00
Fix CocaoDecorator causing a crash when trying to generate without logs
This commit is contained in:
parent
f911fd4880
commit
04a78195ec
@ -0,0 +1,10 @@
|
|||||||
|
--- a/net/minecraft/world/level/levelgen/feature/treedecorators/CocoaDecorator.java
|
||||||
|
+++ b/net/minecraft/world/level/levelgen/feature/treedecorators/CocoaDecorator.java
|
||||||
|
@@ -26,6 +26,7 @@
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void place(TreeDecorator.Context generator) {
|
||||||
|
+ if (generator.logs().isEmpty()) return; // Paper - Fix crash when trying to generate without logs
|
||||||
|
RandomSource randomSource = generator.random();
|
||||||
|
if (!(randomSource.nextFloat() >= this.probability)) {
|
||||||
|
List<BlockPos> list = generator.logs();
|
Loading…
Reference in New Issue
Block a user