Skip to content

Commit 93a019e

Browse files
committed
add option to hide beacon beams
1 parent ca781b1 commit 93a019e

File tree

8 files changed

+115
-1
lines changed

8 files changed

+115
-1
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,8 @@
6262
- add Chinese (TW) translation (@HowardZHY)
6363
- update config library to 1.0.13
6464

65+
### 2.2.6
66+
67+
- add sourcesJar to files to be uploaded to modrinth
68+
- add option to hide Beacon Beams
69+

build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ modrinth {
149149
versionNumber = "${project.version}"
150150
versionType = "release"
151151
uploadFile = remapJar
152+
additionalFiles = [sourcesJar]
152153
gameVersions = ["${project.minecraft_version}"]
153154
loaders = ["fabric"]
154155
dependencies {

src/main/java/io/github/axolotlclient/AxolotlClient.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
import io.github.axolotlclient.modules.hypixel.nickhider.NickHider;
3939
import io.github.axolotlclient.modules.motionblur.MotionBlur;
4040
import io.github.axolotlclient.modules.particles.Particles;
41+
import io.github.axolotlclient.modules.renderOptions.BeaconBeam;
4142
import io.github.axolotlclient.modules.rpc.DiscordRPC;
4243
import io.github.axolotlclient.modules.screenshotUtils.ScreenshotUtils;
4344
import io.github.axolotlclient.modules.scrollableTooltips.ScrollableTooltips;
@@ -134,6 +135,7 @@ private static void getModules() {
134135
modules.add(TntTime.getInstance());
135136
modules.add(Particles.getInstance());
136137
modules.add(ScreenshotUtils.getInstance());
138+
modules.add(BeaconBeam.getInstance());
137139
}
138140

139141
private static void addExternalModules() {
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
/*
2+
* Copyright © 2021-2022 moehreag <[email protected]> & Contributors
3+
*
4+
* This file is part of AxolotlClient.
5+
*
6+
* This program is free software; you can redistribute it and/or
7+
* modify it under the terms of the GNU Lesser General Public
8+
* License as published by the Free Software Foundation; either
9+
* version 3 of the License, or (at your option) any later version.
10+
*
11+
* This program is distributed in the hope that it will be useful,
12+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14+
* Lesser General Public License for more details.
15+
*
16+
* You should have received a copy of the GNU Lesser General Public License
17+
* along with this program; if not, write to the Free Software Foundation,
18+
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19+
*
20+
* For more information, see the LICENSE file.
21+
*/
22+
23+
package io.github.axolotlclient.mixin;
24+
25+
import io.github.axolotlclient.modules.renderOptions.BeaconBeam;
26+
import net.minecraft.block.entity.BeaconBlockEntity;
27+
import net.minecraft.client.render.block.entity.BeaconBlockEntityRenderer;
28+
import org.spongepowered.asm.mixin.Mixin;
29+
import org.spongepowered.asm.mixin.injection.At;
30+
import org.spongepowered.asm.mixin.injection.Inject;
31+
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
32+
33+
@Mixin(BeaconBlockEntityRenderer.class)
34+
public abstract class BeaconBlockEntityRendererMixin {
35+
36+
@Inject(method = "render(Lnet/minecraft/block/entity/BeaconBlockEntity;DDDFI)V", at = @At("HEAD"), cancellable = true)
37+
private void cancelBeamRendering(BeaconBlockEntity beaconBlockEntity, double d, double e, double f, float g, int i, CallbackInfo ci) {
38+
if(!BeaconBeam.getInstance().showBeam()) {
39+
ci.cancel();
40+
}
41+
}
42+
}
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
/*
2+
* Copyright © 2021-2022 moehreag <[email protected]> & Contributors
3+
*
4+
* This file is part of AxolotlClient.
5+
*
6+
* This program is free software; you can redistribute it and/or
7+
* modify it under the terms of the GNU Lesser General Public
8+
* License as published by the Free Software Foundation; either
9+
* version 3 of the License, or (at your option) any later version.
10+
*
11+
* This program is distributed in the hope that it will be useful,
12+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14+
* Lesser General Public License for more details.
15+
*
16+
* You should have received a copy of the GNU Lesser General Public License
17+
* along with this program; if not, write to the Free Software Foundation,
18+
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19+
*
20+
* For more information, see the LICENSE file.
21+
*/
22+
23+
package io.github.axolotlclient.modules.renderOptions;
24+
25+
import io.github.axolotlclient.AxolotlClient;
26+
import io.github.axolotlclient.AxolotlclientConfig.options.BooleanOption;
27+
import io.github.axolotlclient.AxolotlclientConfig.options.OptionCategory;
28+
import io.github.axolotlclient.modules.AbstractModule;
29+
import lombok.Getter;
30+
31+
public class BeaconBeam extends AbstractModule {
32+
33+
@Getter
34+
private final static BeaconBeam Instance = new BeaconBeam();
35+
36+
private final BooleanOption showBeaconBeams = new BooleanOption("axolotlclient.showBeaconBeams", true);
37+
38+
private final OptionCategory beams = new OptionCategory("axolotlclient.beams");
39+
40+
@Override
41+
public void init() {
42+
beams.add(showBeaconBeams);
43+
44+
AxolotlClient.CONFIG.rendering.add(beams);
45+
}
46+
47+
public boolean showBeam(){
48+
return showBeaconBeams.get();
49+
}
50+
}

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

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,5 +290,16 @@
290290
"majorindicator": "Indikatorfarbe (Major)",
291291
"minorindicator": "Indikatorfarbe (Minor)",
292292
"dynamicrotation": "Dynamische Rotation",
293-
"rotation": "Rotation"
293+
"rotation": "Rotation",
294+
"openAction": "[Öffnen]",
295+
"open_image": "Dieses Bild Öffnen",
296+
"autoExec": "Automatische Ausführung",
297+
"autoExec.tooltip": "Eine Aktion automatisch ausführen.",
298+
"hideTipMessages": "Tip-Nachrichten verstecken",
299+
"hideTipMessages.tooltip": "Versteckt Tip-Nachrichten. Funktioniert nur, <br>wenn deine Hypixel-Sprache auf Englisch eingestellt ist.",
300+
"autoHide": "Automatisch verstecken",
301+
"toggle": "Toggle",
302+
"toggle.tooltip": "Verwende die Taste um Freelook zu toggeln.",
303+
"beams": "Beacon Beams",
304+
"showBeaconBeams": "Zeige Beacon Beams"
294305
}

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,8 @@
211211
"horizontal": "Horizontal Only",
212212
"applyBlend": "Apply Blending",
213213
"overrideF3": "Show on Debug HUD",
214+
"beams": "Beacon Beams",
215+
"showBeaconBeams": "Show Beacon Beams",
214216

215217
"enabled": "Enabled",
216218
"enabled.tooltip": "Whether this module is enabled or not.",

src/main/resources/axolotlclient.mixins.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"compatibilityLevel": "JAVA_8",
66
"client": [
77
"AddServerScreenMixin",
8+
"BeaconBlockEntityRendererMixin",
89
"BiPedModelMixin",
910
"ChatHudAccessor",
1011
"ChatHudMixin",

0 commit comments

Comments
 (0)