-
Notifications
You must be signed in to change notification settings - Fork 15
Description
Used Minecraft Version
1.21.1
Used Modloader
NeoForge
Modloader Version
21.1.219
Bug Description
YAWP Version: 0.6.2-beta1
When using the Multiworld mod to create dimensions at runtime (e.g. multiworld:nether2), attempting to teleport to the new dimension causes a NullPointerException in YAWP's EntityTravelToDimensionEvent handler. The teleport is completely blocked.
Stack Trace
java.lang.NullPointerException: Cannot invoke "de.z0rdak.yawp.data.region.LevelRegionData.getLocalList()" because the return value of "de.z0rdak.yawp.data.region.RegionDataManager.getOrCreate(net.minecraft.resources.ResourceLocation)" is null
at de.z0rdak.yawp.data.region.RegionDataManager.getLocalsFor(RegionDataManager.java:298)
at de.z0rdak.yawp.api.FlagEvaluator.getInvolvedRegionsFor(FlagEvaluator.java:228)
at de.z0rdak.yawp.api.FlagEvaluator.getInvolvedRegionFor(FlagEvaluator.java:244)
at de.z0rdak.yawp.api.FlagEvaluator.findResponsibleRegion(FlagEvaluator.java:207)
at de.z0rdak.yawp.api.FlagEvaluator.evaluate(FlagEvaluator.java:146)
at de.z0rdak.yawp.api.FlagEvaluator.processCheck(FlagEvaluator.java:75)
at de.z0rdak.yawp.api.FlagEvaluator.processCheck(FlagEvaluator.java:111)
at de.z0rdak.yawp.handler.flags.WorldFlagHandler.onTravelToDim(WorldFlagHandler.java:175)
Cause
RegionDataManager.getOrCreate() returns null for dimensions that were created at runtime (via the Fantasy API / Multiworld mod), since YAWP never initialized region data for them. The code then calls .getLocalList() on the null result without a null check.
Steps To Reproduce
Steps to Reproduce
- Install YAWP + Multiworld mod on NeoForge 1.21.1
- Start server
- Run /mw create nether2 NETHER
- Run /mw tp nether2
- Teleport fails with the above NPE
Additional Context
No response