[SPIGOT-7066] Non default end worlds do not have a EnderDragonBattle anymore in 1.19! Created: 16/Jun/22 Updated: 25/Dec/24 Resolved: 18/Jun/22 |
|
| Status: | Resolved |
| Project: | Spigot |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Jeppa | Assignee: | Doc |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | EnderDragonBattle | ||
| Environment: |
|
||
| Version: | 3528-Spigot-56be6a8-031eaad (MC: 1.19) (Implementing API version 1.19-R0.1-SNAPSHOT) |
| Guidelines Read: | Yes |
| Description |
|
There seems to be a bug with non default end worlds: org.bukkit.World#getEnderDragonBattle and net.minecraft.server.level.WorldServer#C (= getDragonBattle in 1.19 NMS) both always return null !
With the default end world (e.g. world_the_end) those commands return the correct org.bukkit.boss.DragonBattle / org.bukkit.craftbukkit.v1_19_R1.boss.CraftDragonBattle / net.minecraft.world.level.dimension.end.EnderDragonBattle !
The check in net.minecraft.server.level.WorldServer (line 302) has changed in 1.19 ! In non default end worlds no DragonBattle is initialized ... |
| Comments |
| Comment by Jeppa [ 16/Jun/22 ] |
|
Some simple code to test it: @EventHandler public void onPlayerJoinEnd(PlayerTeleportEvent event){ World theWorld = event.getTo().getWorld(); if (theWorld.getEnvironment() == Environment.THE_END) { plugin.getLogger().warning("\nWorld entered:"+theWorld.getName()); plugin.getLogger().warning("\nDragonBattle (NMS):"+((org.bukkit.craftbukkit.v1_19_R1.CraftWorld)theWorld).getHandle().C()); plugin.getLogger().warning("\nDragonBattle (API):"+theWorld.getEnderDragonBattle()); } } |
| Comment by Doc [ 16/Jun/22 ] |
|
Based in the provided MultiverseCore issue i make a PR with a fix. https://hub.spigotmc.org/stash/projects/SPIGOT/repos/craftbukkit/pull-requests/1072/overview |
| Comment by Ernst August Lehmann [ 16/Jun/22 ] |
|
This issue is also replicable using the Multiverse plugin, there's a bug report regarding it on their GitHub. |
| Comment by Jeppa [ 16/Jun/22 ] |
|
I'll not share a plugin that is not working the way it should I'll have a look and try to put some code in here that can be used to test it... |
| Comment by Cynthia Yantis [ 16/Jun/22 ] |
|
Are you able to share that plugin with us for testing? |
| Comment by Jeppa [ 16/Jun/22 ] |
|
No code example, but i can test it within my plugin... |
| Comment by Doc [ 16/Jun/22 ] |
|
For any case you have a plugin/code for test the issue and possibles fixs? |
| Comment by Doc [ 16/Jun/22 ] |
|
I look and yeah 1.19 the boolean for dragon battle in dimension_type was removed and now only validate the world and dimension in default worlds... |