-
Notifications
You must be signed in to change notification settings - Fork 1
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
6 changed files
with
61 additions
and
0 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
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
12 changes: 12 additions & 0 deletions
12
src/main/java/xyz/violaflower/legacy_tweaks/client/gui/extention/SlotExtension.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,12 @@ | ||
package xyz.violaflower.legacy_tweaks.client.gui.extention; | ||
|
||
public interface SlotExtension { | ||
void lt$setVisualX(float x); | ||
void lt$setVisualY(float y); | ||
float lt$getVisualX(); | ||
float lt$getVisualY(); | ||
|
||
/// @param size size in scaled pixels | ||
void lt$setSize(int size); | ||
/*let's assume it's an int*/int lt$getSize(); | ||
} |
45 changes: 45 additions & 0 deletions
45
src/main/java/xyz/violaflower/legacy_tweaks/mixin/client/tweak/legacy_ui/slot/SlotMixin.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,45 @@ | ||
package xyz.violaflower.legacy_tweaks.mixin.client.tweak.legacy_ui.slot; | ||
|
||
import net.minecraft.world.inventory.Slot; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.Unique; | ||
import xyz.violaflower.legacy_tweaks.client.gui.extention.SlotExtension; | ||
|
||
@Mixin(Slot.class) | ||
public class SlotMixin implements SlotExtension { | ||
@Unique | ||
private float visualX; | ||
@Unique | ||
private float visualY; | ||
@Unique | ||
private int size; | ||
@Override | ||
public void lt$setVisualX(float x) { | ||
this.visualX = x; | ||
} | ||
|
||
@Override | ||
public void lt$setVisualY(float y) { | ||
this.visualY = y; | ||
} | ||
|
||
@Override | ||
public float lt$getVisualX() { | ||
return this.visualX; | ||
} | ||
|
||
@Override | ||
public float lt$getVisualY() { | ||
return this.visualY; | ||
} | ||
|
||
@Override | ||
public void lt$setSize(int size) { | ||
this.size = size; | ||
} | ||
|
||
@Override | ||
public int lt$getSize() { | ||
return this.size; | ||
} | ||
} |
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