Mixin icon indicating copy to clipboard operation
Mixin copied to clipboard

Using enum switches in mixins breaks mixin hotswapping

Open Earthcomputer opened this issue 5 years ago • 0 comments

For example, adding the following mixin:

@Mixin(AxisAlignedBB.class)
public class AABBMixin {
   @Overwrite
   public double getMin(EnumFacing.Axis axis) {
      switch (axis) {
         case X: return xMin;
         case Y: return yMin;
         case Z: return zMin;
         default: throw new AssertionError("Minecraft is now 4D!");
      }
   }
}

breaks hotswapping.

Earthcomputer avatar Jun 28 '20 09:06 Earthcomputer