Crash on changing dimensions with Corail Tombstone enchanted key
Silivek opened this issue ยท 8 comments
Typical dimension changing error, here's the crash log.
crash-2020-06-15_09.58.55-server.txt
This needs to be fixed in Corail Tombstone.
Please report it to them and refer them to Draconic-Inc/BrandonsCore#69 which is basically the same thing (from the stacktrace, I'd guess they have copied its code).
They don't seem to provide any source, so I can't given any more details.
It's really strange to see that you ask to mods to change their code working since age on 1.12.2 just because you hook with mixin.
Is changing your code to be more compatible with other mods that strange of a concept to you?
Mind you, I'm not asking them to build in explicit support for BetterPortals, I'm just asking them to replace a horrible piece of code, which is incompatible with any mod that wishes to make any changes to teleportation beyond the forge event, with a much simpler call to an already existing vanilla method which does the same thing.
Also, "working" and "correct" are two different things, see the last paragraph of the DimDoors issue.
It's not to mods to adapt them to your changes, it's to you to find a solution not breaking others mods.
I disagree. I'm not breaking other mods, well, not on purpose anyway. Some mods have teleportation logic that is fundamentally incompatible with any reasonable approach to having multiple dimensions loaded at the same time. Some mods are incompatible with the very concept of having seamless portals, there's nothing reasonable I can do about that except for either accepting that incompatibility or pointing out which assumptions in that other mod need to be updated for it to be compatible with seamless portals.
Even more if your code is related to "portal" and shouldn't affect normal teleportation.
This isn't the portal code which it is conflicting with. It's the part where multiple dimensions are loaded and synchronized with the client at the same time and the player is allowed to switch between them instantaneously (i.e. without even a single network round trip).
I've hooked various places in vanilla and third-party code (where I deem it reasonable, i.e. the third-party has a good reason to do what they're doing, they provide their source code and cooperation is required to get both functionalities at the same time) to make that possible.
If then there's a random third party which just throws in a few random respawn packets without warning, how could I possibly deal with that.
@Johni0702 It's really strange to see that you ask to mods to change their code working since age on 1.12.2 just because you hook with mixin. It's not to mods to adapt them to your changes, it's to you to find a solution not breaking others mods. Even more if your code is related to "portal" and shouldn't affect normal teleportation.
In fact, i would actually prefer to be compatible with your mod (because i find it really great on the idea of seeing through portals), but the code that you say being ugly is a more suitable interdimentional teleportation at a precise coordinate without the "placer" (therefore a little different from a portal).
Would it be possible to find a solution without needing to change this code ? like something from the api or whatever that lets you get the views before this teleportation ? (i haven't read your code enough)
but more suitable for a interdimentional teleportation at a precise coordinate without the "placer"
I don't quite follow. What exactly is it that your copy of PlayerList.transferPlayerToDimension
does which the original method cannot do?
I made a mistake on my last answer, the method was transferPlayerToDimension(EntityPlayerMP player, int dimensionIn, ITeleporter teleporter) for player and the only difference is what is in transferEntityToWorld(Entity entityIn, int lastDimension, WorldServer oldWorldIn, WorldServer toWorldIn, ITeleporter teleporter). Seems minor looking at it but it would require to teleport again to the right location but could be done on my side so.
Still not entirely sure what the thing is you want to do which it cannot do by default. Maybe I'll start with what I think would be the solution and if it doesn't work you can explain why:
Could you not create your own ITeleporter class which simply moves the entity to the desired position + rotation? If the location is dynamic, you can just create a new one of your teleporter each time and pass in the target location via its constructor.