--- 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();
