Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
IThundxr committed Jan 17, 2024
1 parent aaa2f03 commit 225cb6a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ public class CustomTrackBlockOutline {
AllShapes.TRACK_ORTHO.get(Direction.EAST), CRShapes.MONORAIL_TRACK_ORTHO.get(Direction.EAST),
AllShapes.TRACK_ORTHO.get(Direction.SOUTH), CRShapes.MONORAIL_TRACK_ORTHO.get(Direction.SOUTH),
AllShapes.TRACK_CROSS, CRShapes.MONORAIL_TRACK_CROSS,
AccessorTrackBlockOutline.getLONG_ORTHO_OFFSET(), MONORAIL_LONG_ORTHO_OFFSET,
AccessorTrackBlockOutline.getLONG_ORTHO(), MONORAIL_LONG_ORTHO,
AccessorTrackBlockOutline.getLONG_CROSS(), MONORAIL_LONG_CROSS
AccessorTrackBlockOutline.getLongOrthoOffset(), MONORAIL_LONG_ORTHO_OFFSET,
AccessorTrackBlockOutline.getLongOrtho(), MONORAIL_LONG_ORTHO,
AccessorTrackBlockOutline.getLongCross(), MONORAIL_LONG_CROSS
);

public static final Map<VoxelShape, VoxelShape> TRACK_TO_NARROW = ImmutableMap.<VoxelShape, VoxelShape>builder().putAll(Map.of(
Expand All @@ -40,9 +40,9 @@ public class CustomTrackBlockOutline {
AllShapes.TRACK_DIAG.get(Direction.EAST), CRShapes.NARROW_TRACK_DIAG.get(Direction.EAST),
AllShapes.TRACK_DIAG.get(Direction.SOUTH), CRShapes.NARROW_TRACK_DIAG.get(Direction.SOUTH))).putAll(Map.of(
AllShapes.TRACK_CROSS_DIAG, CRShapes.NARROW_TRACK_CROSS_DIAG,
AccessorTrackBlockOutline.getLONG_ORTHO_OFFSET(), NARROW_LONG_ORTHO_OFFSET,
AccessorTrackBlockOutline.getLONG_ORTHO(), NARROW_LONG_ORTHO,
AccessorTrackBlockOutline.getLONG_CROSS(), NARROW_LONG_CROSS
AccessorTrackBlockOutline.getLongOrthoOffset(), NARROW_LONG_ORTHO_OFFSET,
AccessorTrackBlockOutline.getLongOrtho(), NARROW_LONG_ORTHO,
AccessorTrackBlockOutline.getLongCross(), NARROW_LONG_CROSS
)).build();

public static VoxelShape convert(Object o, TrackMaterial material) {
Expand All @@ -53,11 +53,11 @@ public static VoxelShape convert(Object o, TrackMaterial material) {

public static VoxelShape convert(VoxelShape trackShape, TrackMaterial material) {
if (material == CRTrackMaterials.MONORAIL) {
if (trackShape.equals(AccessorTrackBlockOutline.getLONG_ORTHO_OFFSET())) {
if (trackShape.equals(AccessorTrackBlockOutline.getLongOrthoOffset())) {
return MONORAIL_LONG_ORTHO_OFFSET;
} else if (trackShape.equals(AccessorTrackBlockOutline.getLONG_ORTHO())) {
} else if (trackShape.equals(AccessorTrackBlockOutline.getLongOrtho())) {
return MONORAIL_LONG_ORTHO;
} else if (trackShape.equals(AccessorTrackBlockOutline.getLONG_CROSS())) {
} else if (trackShape.equals(AccessorTrackBlockOutline.getLongCross())) {
return MONORAIL_LONG_CROSS;
}
return TRACK_TO_MONORAIL.getOrDefault(trackShape, trackShape);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@

@Mixin(TrackBlockOutline.class)
public interface AccessorTrackBlockOutline {
@Accessor
static VoxelShape getLONG_CROSS() {
@Accessor("LONG_CROSS")
static VoxelShape getLongCross() {
throw new AssertionError();
}

@Accessor
static VoxelShape getLONG_ORTHO() {
@Accessor("LONG_ORTHO")
static VoxelShape getLongOrtho() {
throw new AssertionError();
}

@Accessor
static VoxelShape getLONG_ORTHO_OFFSET() {
@Accessor("LONG_ORTHO_OFFSET")
static VoxelShape getLongOrthoOffset() {
throw new AssertionError();
}
}

0 comments on commit 225cb6a

Please sign in to comment.