Skip to content

In Redirector, it causes HORIZONTAL_FACING for chests or Direction.Plane.HORIZONTAL to have DOWN property #168

Open
@TelepathicGrunt

Description

@TelepathicGrunt

Specific mod for which you open this issue

redirector-5.0.0.jar

MC version & mod version & loader version

1.20.1, Forge

Latest log

No response

Steps to reproduce your issue

I am the dev of Repurposed Structures and I got an issue report that seemed literally physically impossible with my code:
TelepathicGrunt/RepurposedStructures#358

A friend pointed out that the user was using Redirector and that the mod is known to blow up so many other mods. I remember being told how Redirector caches the enum list behind values by avoiding the clone call with caching.

When one does this code

var a1 = Foo.values();
a1[0] = a1[1];
var a2 = Foo.values();

in normal Java, a1 and a2 will not be the same because the array was cloned. With Redirector on, this is no longer the case and a2 will be exactly a1. Which is a big problem as this is not the expectations of values and will block up many mods that were lying on values cloning. I am not sure if this specifically is why Redirector blew up up mod.

If it is not the caching, then it is probably this mixin that is allowing DOWN to pass through to the Chest's HORIZONTAL_FACING property but wouldn't explain the error message.
https://github.com/MCTeamPotato/Redirector/blob/retro-1.20.1/common/src/main/java/com/teampotato/redirector/mixin/net/minecraft/world/level/block/state/properties/DirectionPropertyMixin.java

Something in Redirector is causing this issue with my mod and I feel it boils down to assumptions that Redirector made that are fundamentally untrue or unsafe.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions