Skip to content

Commit f319cf0

Browse files
committed
Fix to SBBoxes and changes to archive output.
1 parent 5f83a7d commit f319cf0

File tree

3 files changed

+18
-5
lines changed

3 files changed

+18
-5
lines changed

build.gradle

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,11 +144,12 @@ jar {
144144
"TweakOrder": "0",
145145
'TweakClass': "cc.polyfrost.oneconfig.loader.stage0.LaunchWrapperTweaker"
146146
)
147-
//set the destination directory to be the desktop for easy testing
148147
}
149148

150149
remapJar {
151-
archiveFileName.set("${mod_name}-${mod_version}.jar")
150+
doLast {
151+
delete jar.archiveFile
152+
}
152153
}
153154

154155
publishing {

src/main/java/llc/redstone/hysentials/guis/utils/SBBoxes.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424

2525
public class SBBoxes {
2626
public static List<SBBoxes> boxes = new ArrayList<>();
27-
public static List<SBBoxesHud> huds = new ArrayList<>();
2827
public transient Position position;
2928
private transient String display = "";
3029
@SerializedName("display")

src/main/java/llc/redstone/hysentials/guis/utils/SBBoxesHud.java

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
import cc.polyfrost.oneconfig.hud.Hud;
44
import cc.polyfrost.oneconfig.libs.universal.UMatrixStack;
55
import llc.redstone.hysentials.config.EditorConfig;
6+
import llc.redstone.hysentials.config.HysentialsConfig;
7+
import llc.redstone.hysentials.config.hysentialmods.ScorebarsConfig;
68
import llc.redstone.hysentials.event.events.GuiMouseClickEvent;
79
import net.minecraft.client.renderer.GlStateManager;
810

@@ -17,6 +19,16 @@ public SBBoxesHud(SBBoxes box) {
1719
box.setDisplay(box.getText());
1820
}
1921

22+
@Override
23+
protected void preRender(boolean example) {
24+
if (box == null) {
25+
return;
26+
}
27+
28+
if (!example) {
29+
position.setPosition(box.getX(), box.getY());
30+
}
31+
}
2032

2133
@Override
2234
public void draw(UMatrixStack matrices, float x, float y, float scale, boolean example) {
@@ -30,17 +42,18 @@ public void draw(UMatrixStack matrices, float x, float y, float scale, boolean e
3042

3143
public void mouseClick(GuiMouseClickEvent event) {
3244
// This is a custom method that is called when the mouse is clicked on the HUD
45+
// Only happens when the right mouse button is clicked
3346
new EditorConfig(box).openGuI();
3447
}
3548

3649
@Override
3750
protected boolean shouldShow() {
38-
return super.shouldShow() && box.canRender();
51+
return super.shouldShow() && box.canRender() && ScorebarsConfig.scoreboardBoxes;
3952
}
4053

4154
@Override
4255
public boolean isEnabled() {
43-
return box.canRender();
56+
return box.canRender() && ScorebarsConfig.scoreboardBoxes;
4457
}
4558

4659
@Override

0 commit comments

Comments
 (0)