Skip to content

Commit a28b765

Browse files
committed
fix a small chathud issue
- delay chinese translations due to funky unicode stuff
1 parent 1f43574 commit a28b765

File tree

7 files changed

+13
-305
lines changed

7 files changed

+13
-305
lines changed

CHANGELOG.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,3 @@
4343
- fix some nasty bugs
4444
- re-add an option that had been removed in 2.2.2
4545
- update german translation
46-
- Added chinese (People's Republic of China (aka. Mainland China), Republic of China (aka. Taiwan)) translation

src/main/java/io/github/axolotlclient/config/AxolotlClientConfig.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,12 @@ public class AxolotlClientConfig extends ConfigHolder {
5757
public final OptionCategory timeChanger = new OptionCategory("axolotlclient.timeChanger");
5858
public final OptionCategory searchFilters = new OptionCategory("searchFilters");
5959

60-
private final List<Option> options = new ArrayList<>();
60+
private final List<Option<?>> options = new ArrayList<>();
6161
private final List<OptionCategory> categories = new ArrayList<>();
6262

6363
public final List<OptionCategory> config = new ArrayList<>();
6464

65-
public void add(Option option){
65+
public void add(Option<?> option){
6666
options.add(option);
6767
}
6868

@@ -74,7 +74,7 @@ public List<OptionCategory> getCategories(){
7474
return categories;
7575
}
7676

77-
public List<Option> getOptions(){
77+
public List<Option<?>> getOptions(){
7878
return options;
7979
}
8080

src/main/java/io/github/axolotlclient/modules/hud/gui/hud/ChatHud.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ public boolean tickable() {
157157
public void tick() {
158158
//setWidth((int) (client.options.chatWidth*320));
159159
int lastHeight = height;
160-
setHeight(this.getHeight());//int) (client.options.chatHeightUnfocused*180)+11);
160+
setHeight(getHeight(this.isChatFocused() ? this.client.options.chatHeightFocused : this.client.options.chatHeightUnfocused));//int) (client.options.chatHeightUnfocused*180)+11);
161161
if(lastHeight != getHeight()){
162162
onBoundsUpdate();
163163
}
@@ -206,9 +206,9 @@ public boolean isChatFocused() {
206206
return this.client.currentScreen instanceof ChatScreen;
207207
}
208208

209-
public int getHeight() {
209+
/*public int getHeight() {
210210
return getHeight(this.isChatFocused() ? this.client.options.chatHeightFocused : this.client.options.chatHeightUnfocused);
211-
}
211+
}*/
212212

213213
public static int getHeight(float chatHeight) {
214214
int i = 180;

src/main/java/io/github/axolotlclient/util/Util.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,9 @@ public static <T> T make(T object, Consumer<T> initializer) {
203203
}
204204

205205
public static boolean currentServerAddressContains(String address){
206+
if(MinecraftClient.getInstance().isInSingleplayer() || MinecraftClient.getInstance().isIntegratedServerRunning()){
207+
return false;
208+
}
206209
if(MinecraftClient.getInstance().getCurrentServerEntry() != null){
207210
return MinecraftClient.getInstance().getCurrentServerEntry().address.contains(address);
208211
}
@@ -211,6 +214,10 @@ public static boolean currentServerAddressContains(String address){
211214
}
212215

213216
public static String getCurrentServerAddress(){
217+
if(MinecraftClient.getInstance().isInSingleplayer()){
218+
return null;
219+
}
220+
214221
if(MinecraftClient.getInstance().getCurrentServerEntry() != null){
215222
return MinecraftClient.getInstance().getCurrentServerEntry().address;
216223
}

src/main/resources/assets/axolotlclient/lang/zh_cn.json

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)