Crash when sending Botania mana burst through portal
Caused by: java.lang.IllegalStateException: Fake bursts should never be saved at any time! Source pos class_2338{x=-2409, y=65, z=5154}, owner null
at vazkii.botania.common.entity.EntityManaBurst.writeCustomDataToNbt(EntityManaBurst.java:245) ~[Botania-1.18.2-434-FABRIC.jar:?]
at net.minecraft.entity.Entity.writeNbt(Entity:1657) ~[?:?]
at net.minecraft.entity.Entity.copyFrom(Entity:2482) ~[?:?]
at net.minecraft.entity.Entity.moveToWorld(Entity:2508) ~[?:?]
at net.kyrptonaught.customportalapi.util.CustomTeleporter.TPToDim(CustomTeleporter.java:42) ~[customportalapi-0.0.1-beta50-1.18.jar-3ad4d556-cde5-4bb0-bf37-698ea362c12a-nested.jar:?]
at net.kyrptonaught.customportalapi.CustomPortalBlock.onEntityCollision(CustomPortalBlock.java:108) ~[customportalapi-0.0.1-beta50-1.18.jar-3ad4d556-cde5-4bb0-bf37-698ea362c12a-nested.jar:?]
at net.minecraft.block.AbstractBlock$AbstractBlockState.onEntityCollision(AbstractBlock:927) ~[?:?]
at net.minecraft.entity.Entity.checkBlockCollision(Entity:1028) ~[?:?]
at net.minecraft.entity.projectile.thrown.ThrownEntity.tick(ThrownEntity:68) ~[?:?]
at vazkii.botania.common.entity.EntityManaBurst.tick(EntityManaBurst.java:165) ~[Botania-1.18.2-434-FABRIC.jar:?]
at vazkii.botania.common.entity.EntityManaBurst.getCollidedTile(EntityManaBurst.java:223) ~[Botania-1.18.2-434-FABRIC.jar:?]
at vazkii.botania.common.block.tile.mana.TileSpreader.checkForReceiver(TileSpreader.java:475) ~[Botania-1.18.2-434-FABRIC.jar:?]
at vazkii.botania.common.block.tile.mana.TileSpreader.commonTick(TileSpreader.java:190) ~[Botania-1.18.2-434-FABRIC.jar:?]
at net.minecraft.world.chunk.WorldChunk$DirectBlockEntityTickInvoker.tick(WorldChunk:659) ~[?:?]
at net.minecraft.world.chunk.WorldChunk$WrappedBlockEntityTickInvoker.tick(WorldChunk:713) ~[?:?]
at net.minecraft.world.World.tickBlockEntities(World:475) ~[?:?]
at net.minecraft.server.world.ServerWorld.tick(ServerWorld:368) ~[?:?]
at net.minecraft.server.MinecraftServer.tickWorlds(MinecraftServer:907) ~[server-intermediary.jar:?]
... 5 more
Not sure which mod's fault this is.
Can the burst go through vanilla portals?
Yep, it gets teleported fine.
https://github.com/VazkiiMods/Botania/commit/213677a7f0141132173041cc20dc231924688fbc adds the check that throws the exception. To prevent it from being triggered, it also overrides Entity changeDimension(Level) to return null when the exception would occur. This is the mojmap version of moveToWorld, so I'm pretty confused how this is happening...
Ah, https://github.com/VazkiiMods/Botania/commit/8528b374ab799515f345515b9eae39ffbd0e10d9 switches to overriding boolean canChangeDimensions() (boolean canUsePortals() on Yarn). I guess that should be checked before calling moveToWorld.
Thank you for that, that makes this easier to fix
Are you using CPA as a developer or as a user?
I'll get a fix out shortly but other mod developers will need to implement it into their mods
User, but the new version can just be put in mods/ for now.
Beta-52 was uploaded to the maven with this fix. You can download it here: https://maven.kyrptonaught.dev/net/kyrptonaught/customportalapi/0.0.1-beta52-1.18/customportalapi-0.0.1-beta52-1.18.jar
Which mod are you using adding the portal?