-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
97 additions
and
65 deletions.
There are no files selected for viewing
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
13 changes: 10 additions & 3 deletions
13
...eatlasoverlay/AntiqueAtlasOverlayMod.java → ...eatlasoverlay/AntiqueAtlasOverlayMod.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 |
---|---|---|
@@ -1,12 +1,19 @@ | ||
package kenkron.antiqueatlasoverlay; | ||
|
||
import net.minecraftforge.fml.common.Mod; | ||
import net.fabricmc.api.ClientModInitializer; | ||
import org.apache.logging.log4j.LogManager; | ||
import org.apache.logging.log4j.Logger; | ||
|
||
@Mod(modid = AntiqueAtlasOverlayMod.MODID, version = AntiqueAtlasOverlayMod.VERSION, name = AntiqueAtlasOverlayMod.MODID, clientSideOnly = true, dependencies = "required-after:antiqueatlas;after:forge@[13.20.0.2262,)") | ||
public class AntiqueAtlasOverlayMod { | ||
|
||
public class AntiqueAtlasOverlayMod implements ClientModInitializer | ||
{ | ||
public static final String MODID = "antiqueatlasoverlay"; | ||
public static final String VERSION = "1.2"; | ||
public static final Logger LOGGER = LogManager.getLogger("AntiqueAtlasOverlay"); | ||
|
||
|
||
@Override | ||
public void onInitializeClient() | ||
{ | ||
} | ||
} |
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
22 changes: 22 additions & 0 deletions
22
src/main/java/kenkron/antiqueatlasoverlay/mixin/MixinInGameHud.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,22 @@ | ||
package kenkron.antiqueatlasoverlay.mixin; | ||
|
||
import kenkron.antiqueatlasoverlay.OverlayRenderer; | ||
import net.minecraft.client.gui.hud.InGameHud; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.Shadow; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
import org.spongepowered.asm.mixin.injection.Inject; | ||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; | ||
|
||
@Mixin(InGameHud.class) | ||
public class MixinInGameHud { | ||
@Shadow | ||
private int scaledWidth; | ||
@Shadow | ||
private int scaledHeight; | ||
|
||
@Inject(at = @At("TAIL"), method = "draw") | ||
public void draw(float partial, CallbackInfo info) { | ||
OverlayRenderer.drawOverlay(scaledWidth, scaledHeight); | ||
} | ||
} |
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,13 @@ | ||
{ | ||
"required": true, | ||
"package": "kenkron.antiqueatlasoverlay.mixin", | ||
"compatibilityLevel": "JAVA_8", | ||
"mixins": [ | ||
], | ||
"client": [ | ||
"MixinInGameHud" | ||
], | ||
"injectors": { | ||
"defaultRequire": 1 | ||
} | ||
} |
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