RandomPatches (Forge)

RandomPatches (Forge)

56M Downloads

Smooth eye level implementation is incompatible with BetterPortals

Johni0702 opened this issue ยท 1 comments

commented

Johni0702/BetterPortals#259

BetterPortals (MC 1.12.2) maintains multiple EntityRenderer instances in order to have multiple worlds loaded at the same time.
The current implementation of the smooth-eye-level-change patch assumes there to only be a single EntityRenderer by keeping the previous eye level vales in static fields:

private static float lastEyeHeight;
private static float eyeHeight;

The simplest (in terms of ASM) and at the same time most idiomatic solution would be to change those to be instance fields, patch a single EyeHeightHandler field into the EntityRenderer class and then use it instead of static methods.

commented

Fixed by patching an EyeHeightHandler field into the EntityRenderer class.