makamys / CoreTweaks

A bunch of random bug fixes, optimizations and tweaks (1.7.10)
MIT License
46 stars 5 forks source link

Issue using Mekanism teleporters #12

Closed AstroTibs closed 1 year ago

AstroTibs commented 1 year ago

Mekanism teleporters are 1×2 portals that allow you to teleport between any two coordinates, even between dimensions.

Starting in CoreTweaks release 0.3, the following issue happens when I teleport between dimensions:

  1. I am unable to use any teleporters again—they will not trigger when I enter them.
  2. I can no longer trigger other tile entities that require me walking onto them (pressure plates, tripwires, OpenBlock XP drains, etc). I can still open doors and chests by right-clicking as normal.
  3. I have to break blocks "twice" to get them to break: that is, the block will break and then reform in place. I then have to break it again to get it to drop.

Sometimes I have to use the teleporters a couple of times before this happens.

This happens both in singleplayer and on a server. It does not appear to happen when teleporting between locations in the same dimension, even if very far apart.

KibaTheBarbarian commented 1 year ago

Look like setting this to False solves the issue

fix_entity_tracking {

Backports most of https://github.com/MinecraftForge/MinecraftForge/pull/5160, a patch that fixes minecarts duplicating and vanishing. [default: true]

    S:_enabled=true  
makamys commented 1 year ago

Can reproduce. The issue also happens with backport5160 (where the fix was ported from), and regardless of whether the upstream version of Mekanism or CE is used.

makamys commented 1 year ago

Found the problem, Mekanism was calling setLocationAndAngles at a moment in the dimension change process when the player entity's world reference is invalid. I added some extra checks which seem to have fixed it.