-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
# Conflicts: # common/src/main/java/xaeroplus/mixin/client/MixinMinimapFBORenderer.java # common/src/main/java/xaeroplus/mixin/client/MixinMinimapRenderer.java # fabric/build.gradle.kts # settings.gradle.kts
- Loading branch information
Showing
23 changed files
with
318 additions
and
506 deletions.
There are no files selected for viewing
9 changes: 0 additions & 9 deletions
9
common/src/main/java/xaeroplus/feature/extensions/IWaypointDimension.java
This file was deleted.
Oops, something went wrong.
16 changes: 16 additions & 0 deletions
16
common/src/main/java/xaeroplus/mixin/client/AccessorWaypointSet.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package xaeroplus.mixin.client; | ||
|
||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.gen.Accessor; | ||
import xaero.common.minimap.waypoints.Waypoint; | ||
import xaero.hud.minimap.waypoint.set.WaypointSet; | ||
|
||
import java.util.List; | ||
|
||
@Mixin(value = WaypointSet.class, remap = false) | ||
public interface AccessorWaypointSet { | ||
// we could alternatively just cast the iterable getter back to list | ||
// but doing an accessor should cause compile errors if the type ever changes from under us in future updates | ||
@Accessor | ||
List<Waypoint> getList(); | ||
} |
30 changes: 30 additions & 0 deletions
30
common/src/main/java/xaeroplus/mixin/client/MixinBuiltInInfoDisplays.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package xaeroplus.mixin.client; | ||
|
||
import com.llamalad7.mixinextras.injector.wrapoperation.Operation; | ||
import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation; | ||
import com.llamalad7.mixinextras.sugar.Local; | ||
import net.minecraft.resources.ResourceKey; | ||
import net.minecraft.world.level.Level; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
import xaero.common.minimap.info.BuiltInInfoDisplays; | ||
import xaero.common.minimap.info.render.compile.InfoDisplayCompiler; | ||
import xaero.hud.minimap.world.MinimapWorld; | ||
import xaeroplus.settings.XaeroPlusSettingRegistry; | ||
import xaeroplus.util.ChunkUtils; | ||
|
||
@Mixin(value = BuiltInInfoDisplays.class, remap = false) | ||
public class MixinBuiltInInfoDisplays { | ||
|
||
@WrapOperation(method = "lambda$static$13", at = @At( | ||
value = "INVOKE", | ||
target = "Lxaero/common/minimap/info/render/compile/InfoDisplayCompiler;addWords(ILjava/lang/String;)V")) | ||
private static void hideAutoSubworldInfoWhenOwAutoWaypointsEnabled(final InfoDisplayCompiler instance, final int lineWidth, final String text, final Operation<Void> original, | ||
@Local(name = "currentWorld") MinimapWorld currentWorld) { | ||
if (XaeroPlusSettingRegistry.owAutoWaypointDimension.getValue()) { | ||
ResourceKey<Level> actualDimension = ChunkUtils.getActualDimension(); | ||
if (actualDimension == Level.NETHER && currentWorld.getDimId() == Level.OVERWORLD) return; | ||
} | ||
original.call(instance, lineWidth, text); | ||
} | ||
} |
44 changes: 0 additions & 44 deletions
44
common/src/main/java/xaeroplus/mixin/client/MixinGuiAddWaypoint.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 0 additions & 29 deletions
29
common/src/main/java/xaeroplus/mixin/client/MixinGuiWaypoint.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.