Skip to content

Commit 5c68d0a

Browse files
committed
New icons for holograms module
1 parent 7d2d85d commit 5c68d0a

File tree

16 files changed

+76
-12
lines changed

16 files changed

+76
-12
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ dependencies {
5757

5858
// Meteor Client
5959
modImplementation files("libs\\baritone-unoptimized-fabric-1.10.2.jar")
60-
modImplementation files("libs\\meteor-client-1.21.5-12.jar")
60+
modImplementation files("libs\\meteor-client-1.21.5-16.jar")
6161

6262
// Xaero's Mods
6363
modCompileOnly "maven.modrinth:xaeros-world-map:${project.xwm_fabric_version}" // Xaero's World Map
4.4 MB
Binary file not shown.

src/main/java/nekiplay/main/items/ModItems.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,16 @@ public static Item register(String path, Function<Item.Settings, Item> factory,
1717
public static Item METEOR_PLUS_LOGO_ITEM = null;
1818
public static Item METEOR_PLUS_LOGO_MODS_ITEM = null;
1919

20+
public static Item METEOR_PLUS_STAR_ITEM = null;
21+
public static Item METEOR_PLUS_DIAMOND_ITEM = null;
22+
public static Item METEOR_PLUS_MONEY_ITEM = null;
23+
2024
public static void initialize() {
2125
METEOR_PLUS_LOGO_ITEM = register("logo", Item::new, new Item.Settings());
2226
METEOR_PLUS_LOGO_MODS_ITEM = register("logo_mods", Item::new, new Item.Settings());
27+
28+
METEOR_PLUS_STAR_ITEM = register("star", Item::new, new Item.Settings());
29+
METEOR_PLUS_DIAMOND_ITEM = register("diamond", Item::new, new Item.Settings());
30+
METEOR_PLUS_MONEY_ITEM = register("money", Item::new, new Item.Settings());
2331
}
2432
}

src/main/java/nekiplay/meteorplus/mixin/meteorclient/gui/WBlockPosEditMixin.java

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,11 @@
99
import net.minecraft.util.math.BlockPos;
1010
import org.spongepowered.asm.mixin.Mixin;
1111
import org.spongepowered.asm.mixin.Shadow;
12+
import org.spongepowered.asm.mixin.Unique;
1213
import org.spongepowered.asm.mixin.injection.At;
1314
import org.spongepowered.asm.mixin.injection.Inject;
14-
import org.spongepowered.asm.mixin.injection.Redirect;
1515
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
16+
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
1617

1718
@Mixin(value = WBlockPosEdit.class, remap = false, priority = 1001)
1819
public class WBlockPosEditMixin extends WHorizontalList {
@@ -36,9 +37,9 @@ public class WBlockPosEditMixin extends WHorizontalList {
3637
private boolean clicking;
3738
@Inject(method = "addTextBox", at = @At("HEAD"), cancellable = true)
3839
private void addTextBox(CallbackInfo ci) {
39-
this.textBoxX = this.add(this.theme.textBox(Integer.toString(this.value.getX()), this::filter)).minWidth(75.0).widget();
40-
this.textBoxY = this.add(this.theme.textBox(Integer.toString(this.value.getY()), this::filter)).minWidth(75.0).widget();
41-
this.textBoxZ = this.add(this.theme.textBox(Integer.toString(this.value.getZ()), this::filter)).minWidth(75.0).widget();
40+
this.textBoxX = this.add(this.theme.textBox(Integer.toString(this.value.getX()), this::filterFixed)).minWidth(75.0).widget();
41+
this.textBoxY = this.add(this.theme.textBox(Integer.toString(this.value.getY()), this::filterFixed)).minWidth(75.0).widget();
42+
this.textBoxZ = this.add(this.theme.textBox(Integer.toString(this.value.getZ()), this::filterFixed)).minWidth(75.0).widget();
4243
this.textBoxX.actionOnUnfocused = () -> {
4344
try {
4445
this.lastValue = this.value;
@@ -84,20 +85,25 @@ private void addTextBox(CallbackInfo ci) {
8485
catch (NumberFormatException ignore) { }
8586
};
8687

87-
88-
8988
if (ConfigModifier.get().positionProtection.get()) {
9089
textBoxX.set("***");
91-
textBoxZ.set("***");
90+
updateRender(textBoxX);
9291
textBoxY.set("***");
92+
updateRender(textBoxY);
93+
textBoxZ.set("***");
94+
updateRender(textBoxZ);
9395
}
9496
ci.cancel();
9597
}
96-
@Shadow
97-
private boolean filter(String text, char c) {
98+
private void updateRender(WTextBox textBox) {
99+
textBoxX.setFocused(true);
100+
textBoxX.setFocused(false);
101+
}
102+
@Unique
103+
private boolean filterFixed(String text, char c) {
98104
boolean validate = true;
99105
boolean good;
100-
if (c == '-' && text.isEmpty() || text.equals("***")) {
106+
if ((c == '-' && text.isEmpty()) || text.equals("***")) {
101107
good = true;
102108
validate = false;
103109
} else {
@@ -111,7 +117,6 @@ private boolean filter(String text, char c) {
111117
good = false;
112118
}
113119
}
114-
115120
return good;
116121
}
117122
@Shadow
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"model": {
3+
"type": "model",
4+
"model": "meteorplus:item/diamond"
5+
}
6+
}
7+
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"model": {
3+
"type": "model",
4+
"model": "meteorplus:item/money"
5+
}
6+
}
7+
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"model": {
3+
"type": "model",
4+
"model": "meteorplus:item/star"
5+
}
6+
}
7+

src/main/resources/assets/meteorplus/lang/en_us.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66

77
"item.meteorplus.logo": "Meteor+ logo",
88
"item.meteorplus.logo_mods": "Meteor+ Integrations logo",
9+
"item.meteorplus.star": "Star",
10+
"item.meteorplus.diamond": "Diamond",
11+
"item.meteorplus.money": "Money",
912

1013
"modules.meteor-client.better-tooltips.beehive.honey-level": "§7Honey level: §e%d§7.",
1114
"modules.meteor-client.better-tooltips.beehive.bees": "§7Bees: §e%d§7.",

src/main/resources/assets/meteorplus/lang/ru_ru.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66

77
"item.meteorplus.logo": "Meteor+ логотип",
88
"item.meteorplus.logo_mods": "Meteor+ Integrations логотип",
9+
"item.meteorplus.star": "Звезда",
10+
"item.meteorplus.diamond": "Алмаз",
11+
"item.meteorplus.money": "Деньги",
912

1013
"modules.meteor-client.better-tooltips.beehive.honey-level": "§7Уровень мёда: §e%d§7.",
1114
"modules.meteor-client.better-tooltips.beehive.bees": "§7Пчел: §e%d§7.",

src/main/resources/assets/meteorplus/lang/uk_ua.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66

77
"item.meteorplus.logo": "Meteor+ логотип",
88
"item.meteorplus.logo_mods": "Meteor+ Integrations логотип",
9+
"item.meteorplus.star": "Зірка",
10+
"item.meteorplus.diamond": "Діамант",
11+
"item.meteorplus.money": "Гроші",
912

1013
"modules.meteor-client.better-tooltips.beehive.honey-level": "§7Рівень меду: §e%d§7.",
1114
"modules.meteor-client.better-tooltips.beehive.bees": "§7Бджіл: §e%d§7.",

0 commit comments

Comments
 (0)