[SPIGOT-5141] World.generateTree() causes ClassCastException with huge mushrooms Created: 05/Jul/19  Updated: 06/Jul/19  Resolved: 06/Jul/19

Status: Resolved
Project: Spigot
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Michael Dinkel Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: 1.14, bug, bukkit, error
Environment:

Windows 10 version 10.0.17763.557

Java version "10.0.1" 2018-04-17
Java(TM) SE Runtime Environment 18.3 (build 10.0.1+10)
Java HotSpot(TM) 64-Bit Server VM 18.3 (build 10.0.1+10, mixed mode)


Attachments: Java Source File MushroomMain.java     File MushroomTest.jar    
Version: This server is running CraftBukkit version git-Spigot-d05d3c1-fca4157 (MC: 1.14.3) (Implementing API version 1.14.3-R0.1-SNAPSHOT)
Guidelines Read: Yes

 Description   

The API method generateTree in class World will generate a ClassCastException when the target TreeType is RED_MUSHROOM or BROWN_MUSHROOM.

To use the test plugin, left click a block to generate a red mushroom and right click a block to generate a brown mushroom. The clicked block must have enough room around it for a huge mushroom to grow on top of it.

This bug has been tested on both Spigot and CraftBukkit on all Minecraft versions between 1.13.2 and 1.14.3. The bug appears in both Spigot and CraftBukkit for Minecraft 1.14.1 and is present in all future versions.

Time spent: 35 minutes.


Generated at Thu Apr 03 16:14:20 UTC 2025 using Jira 10.3.3#10030003-sha1:d220e3fefc8dfc6d47f522d3b9a20c1455e12b7b.