Skip to content

Commit ab6a928

Browse files
committed
finish some things up
1.19 release coming soon
1 parent a0a4691 commit ab6a928

File tree

20 files changed

+260
-93
lines changed

20 files changed

+260
-93
lines changed

LICENSE

Lines changed: 164 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,167 @@
1-
Copyright (C) 2020 LoganDark
1+
Copyright (C) 2020 moehreag + Contributors
22

3-
This program is free software: you can redistribute it and/or modify
4-
it under the terms of the GNU General Public License as published by
5-
the Free Software Foundation, either version 3 of the License, or
6-
(at your option) any later version.
3+
GNU LESSER GENERAL PUBLIC LICENSE
4+
Version 3, 29 June 2007
75

8-
This program is distributed in the hope that it will be useful,
9-
but WITHOUT ANY WARRANTY; without even the implied warranty of
10-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11-
GNU General Public License for more details.
6+
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
7+
Everyone is permitted to copy and distribute verbatim copies
8+
of this license document, but changing it is not allowed.
129

13-
You should have received a copy of the GNU General Public License
14-
along with this program. If not, see <https://www.gnu.org/licenses/>.
10+
11+
This version of the GNU Lesser General Public License incorporates
12+
the terms and conditions of version 3 of the GNU General Public
13+
License, supplemented by the additional permissions listed below.
14+
15+
0. Additional Definitions.
16+
17+
As used herein, "this License" refers to version 3 of the GNU Lesser
18+
General Public License, and the "GNU GPL" refers to version 3 of the GNU
19+
General Public License.
20+
21+
"The Library" refers to a covered work governed by this License,
22+
other than an Application or a Combined Work as defined below.
23+
24+
An "Application" is any work that makes use of an interface provided
25+
by the Library, but which is not otherwise based on the Library.
26+
Defining a subclass of a class defined by the Library is deemed a mode
27+
of using an interface provided by the Library.
28+
29+
A "Combined Work" is a work produced by combining or linking an
30+
Application with the Library. The particular version of the Library
31+
with which the Combined Work was made is also called the "Linked
32+
Version".
33+
34+
The "Minimal Corresponding Source" for a Combined Work means the
35+
Corresponding Source for the Combined Work, excluding any source code
36+
for portions of the Combined Work that, considered in isolation, are
37+
based on the Application, and not on the Linked Version.
38+
39+
The "Corresponding Application Code" for a Combined Work means the
40+
object code and/or source code for the Application, including any data
41+
and utility programs needed for reproducing the Combined Work from the
42+
Application, but excluding the System Libraries of the Combined Work.
43+
44+
1. Exception to Section 3 of the GNU GPL.
45+
46+
You may convey a covered work under sections 3 and 4 of this License
47+
without being bound by section 3 of the GNU GPL.
48+
49+
2. Conveying Modified Versions.
50+
51+
If you modify a copy of the Library, and, in your modifications, a
52+
facility refers to a function or data to be supplied by an Application
53+
that uses the facility (other than as an argument passed when the
54+
facility is invoked), then you may convey a copy of the modified
55+
version:
56+
57+
a) under this License, provided that you make a good faith effort to
58+
ensure that, in the event an Application does not supply the
59+
function or data, the facility still operates, and performs
60+
whatever part of its purpose remains meaningful, or
61+
62+
b) under the GNU GPL, with none of the additional permissions of
63+
this License applicable to that copy.
64+
65+
3. Object Code Incorporating Material from Library Header Files.
66+
67+
The object code form of an Application may incorporate material from
68+
a header file that is part of the Library. You may convey such object
69+
code under terms of your choice, provided that, if the incorporated
70+
material is not limited to numerical parameters, data structure
71+
layouts and accessors, or small macros, inline functions and templates
72+
(ten or fewer lines in length), you do both of the following:
73+
74+
a) Give prominent notice with each copy of the object code that the
75+
Library is used in it and that the Library and its use are
76+
covered by this License.
77+
78+
b) Accompany the object code with a copy of the GNU GPL and this license
79+
document.
80+
81+
4. Combined Works.
82+
83+
You may convey a Combined Work under terms of your choice that,
84+
taken together, effectively do not restrict modification of the
85+
portions of the Library contained in the Combined Work and reverse
86+
engineering for debugging such modifications, if you also do each of
87+
the following:
88+
89+
a) Give prominent notice with each copy of the Combined Work that
90+
the Library is used in it and that the Library and its use are
91+
covered by this License.
92+
93+
b) Accompany the Combined Work with a copy of the GNU GPL and this license
94+
document.
95+
96+
c) For a Combined Work that displays copyright notices during
97+
execution, include the copyright notice for the Library among
98+
these notices, as well as a reference directing the user to the
99+
copies of the GNU GPL and this license document.
100+
101+
d) Do one of the following:
102+
103+
0) Convey the Minimal Corresponding Source under the terms of this
104+
License, and the Corresponding Application Code in a form
105+
suitable for, and under terms that permit, the user to
106+
recombine or relink the Application with a modified version of
107+
the Linked Version to produce a modified Combined Work, in the
108+
manner specified by section 6 of the GNU GPL for conveying
109+
Corresponding Source.
110+
111+
1) Use a suitable shared library mechanism for linking with the
112+
Library. A suitable mechanism is one that (a) uses at run time
113+
a copy of the Library already present on the user's computer
114+
system, and (b) will operate properly with a modified version
115+
of the Library that is interface-compatible with the Linked
116+
Version.
117+
118+
e) Provide Installation Information, but only if you would otherwise
119+
be required to provide such information under section 6 of the
120+
GNU GPL, and only to the extent that such information is
121+
necessary to install and execute a modified version of the
122+
Combined Work produced by recombining or relinking the
123+
Application with a modified version of the Linked Version. (If
124+
you use option 4d0, the Installation Information must accompany
125+
the Minimal Corresponding Source and Corresponding Application
126+
Code. If you use option 4d1, you must provide the Installation
127+
Information in the manner specified by section 6 of the GNU GPL
128+
for conveying Corresponding Source.)
129+
130+
5. Combined Libraries.
131+
132+
You may place library facilities that are a work based on the
133+
Library side by side in a single library together with other library
134+
facilities that are not Applications and are not covered by this
135+
License, and convey such a combined library under terms of your
136+
choice, if you do both of the following:
137+
138+
a) Accompany the combined library with a copy of the same work based
139+
on the Library, uncombined with any other library facilities,
140+
conveyed under the terms of this License.
141+
142+
b) Give prominent notice with the combined library that part of it
143+
is a work based on the Library, and explaining where to find the
144+
accompanying uncombined form of the same work.
145+
146+
6. Revised Versions of the GNU Lesser General Public License.
147+
148+
The Free Software Foundation may publish revised and/or new versions
149+
of the GNU Lesser General Public License from time to time. Such new
150+
versions will be similar in spirit to the present version, but may
151+
differ in detail to address new problems or concerns.
152+
153+
Each version is given a distinguishing version number. If the
154+
Library as you received it specifies that a certain numbered version
155+
of the GNU Lesser General Public License "or any later version"
156+
applies to it, you have the option of following the terms and
157+
conditions either of that published version or of any later version
158+
published by the Free Software Foundation. If the Library as you
159+
received it does not specify a version number of the GNU Lesser
160+
General Public License, you may choose any version of the GNU Lesser
161+
General Public License ever published by the Free Software Foundation.
162+
163+
If the Library as you received it specifies that a proxy can decide
164+
whether future versions of the GNU Lesser General Public License shall
165+
apply, that proxy's public statement of acceptance of any version is
166+
permanent authorization for you to choose that version for the
167+
Library.

README.md

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,22 @@
1-
# fabric-branding (Fork for AxolotlClient)
1+
# Axolotlclient-Mod
22

3-
Removes different /Fabric and Minecraft modding signs in AxolotlClient
3+
The mod for Axolotlclient.
4+
5+
## Features
6+
Features currently include:
7+
- Various HUD modules
8+
- Badges for players using the mod
9+
- Custom Skies (any known format)
10+
- Configurable Zoom
11+
- Hypixel Mods
12+
- AutoGG
13+
- AutoTip
14+
- LevelHead
15+
- AutoBoop
16+
- A complete config API for addon modules
17+
- Discord RPC with in-game activity support
18+
19+
- in total > 200 options
420

521
### Licensing
622
This mod (and all of its branches) is licensed under the LGPL 3 (or later). This means you need to give credit to the authors of the code you use in your own project.

run/options.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ toggleSprint:false
2222
darkMojangStudiosBackground:false
2323
hideLightningFlashes:false
2424
mouseSensitivity:0.5
25-
fov:0.4
25+
fov:1.0
2626
screenEffectScale:1.0
2727
fovEffectScale:1.0
2828
darknessEffectScale:1.0
@@ -38,8 +38,8 @@ ao:2
3838
prioritizeChunkUpdates:0
3939
biomeBlendRadius:2
4040
renderClouds:"false"
41-
resourcePacks:["vanilla","file/! §bNebula - [sky only]","file/testpack","file/astralex-sky-overlay-for-1-8--sgdsdrgdyhd38745634867djhfkgkdyh.zip"]
42-
incompatibleResourcePacks:["file/! §bNebula - [sky only]","file/testpack","file/astralex-sky-overlay-for-1-8--sgdsdrgdyhd38745634867djhfkgkdyh.zip"]
41+
resourcePacks:["vanilla","file/! §bNebula - [sky only]","file/testpack"]
42+
incompatibleResourcePacks:["file/! §bNebula - [sky only]","file/testpack"]
4343
lastServer:
4444
lang:en_us
4545
soundDevice:""

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

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public class AxolotlClientConfig {
1919
public final BooleanOption customSky = new BooleanOption("customSky", true);
2020
public final BooleanOption showSunMoon = new BooleanOption("showSunMoon", true);
2121
public final BooleanOption customCloudHeight = new BooleanOption("customCloudHeight", false);
22-
public final FloatOption cloudHeight = new FloatOption("cloudHeight", 192F, 100F, 512F);
22+
public final FloatOption cloudHeight = new FloatOption("cloudHeight", 100F, 512F, 192F);
2323
public final BooleanOption dynamicFOV = new BooleanOption("dynamicFov", true);
2424
public final BooleanOption fullBright = new BooleanOption("fullBright", false);
2525
public final IntegerOption chromaSpeed = new IntegerOption("chromaSpeed", 20, 10, 50);
@@ -36,12 +36,10 @@ public class AxolotlClientConfig {
3636
public final ColorOption loadingScreenColor = new ColorOption("loadingBgColor", new Color(-1));
3737
public final BooleanOption nightMode = new BooleanOption("nightMode", false);
3838

39-
public final BooleanOption rotateWorld = new BooleanOption("rotateWorld", false);
40-
4139
public final BooleanOption enableCustomOutlines = new BooleanOption("enabled", false);
4240
public final ColorOption outlineColor = new ColorOption("color", Color.parse("#04000000"));
4341
public final BooleanOption outlineChroma = new BooleanOption("chroma", false);
44-
public final IntegerOption outlineWidth = new IntegerOption("outlineWidth", 1, 1, 10);
42+
public final DoubleOption outlineWidth = new DoubleOption("outlineWidth", 1, 1, 10);
4543

4644
public final BooleanOption creditsBGM = new BooleanOption("creditsBGM", true);
4745

@@ -115,7 +113,7 @@ public void init(){
115113
outlines.add(enableCustomOutlines);
116114
outlines.add(outlineColor);
117115
outlines.add(outlineChroma);
118-
outlines.add(outlineWidth);
116+
//outlines.add(outlineWidth); // I could not get this to have an effect.
119117

120118
AxolotlClient.config.add(creditsBGM);
121119

src/main/java/io/github/axolotlclient/config/screen/widgets/ColorSelectionWidget.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ public ColorSelectionWidget(ColorOption option) {
2727
super(0, 0, 100, 50, Text.empty(), buttonWidget -> {});
2828
this.option=option;
2929
Window window= MinecraftClient.getInstance().getWindow();
30-
width=window.getWidth()-200;
31-
height=window.getHeight()-100;
30+
width=window.getScaledWidth()-200;
31+
height=window.getScaledHeight()-100;
3232

3333
pickerImage = new Rectangle(120, 70, width/2, height/3);
3434

src/main/java/io/github/axolotlclient/mixin/MixinGameRenderer.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package io.github.axolotlclient.mixin;
22

3+
import com.mojang.blaze3d.systems.RenderSystem;
34
import io.github.axolotlclient.AxolotlClient;
45
import io.github.axolotlclient.modules.motionblur.MotionBlur;
56
import io.github.axolotlclient.modules.zoom.Zoom;
@@ -111,15 +112,15 @@ public void setZoom(Camera camera, float tickDelta, boolean changingFov, Callbac
111112
cir.setReturnValue(returnValue);
112113
}
113114

114-
@Inject(method = "render", at = @At(value = "INVOKE", target = "Lcom/mojang/blaze3d/systems/RenderSystem;viewport(IIII)V",
115-
shift = Shift.BEFORE))
115+
@Inject(method = "render", at = @At(value = "INVOKE", target = "Lcom/mojang/blaze3d/framebuffer/Framebuffer;beginWrite(Z)V",
116+
shift = Shift.BEFORE), remap = false)
116117
public void worldMotionBlur(float tickDelta, long startTime, boolean tick, CallbackInfo ci) {
117118
motionBlur(tickDelta, startTime, tick, null);
118119
}
119120

120121
@Inject(method = "render", at = @At("TAIL"))
121122
public void motionBlur(float tickDelta, long startTime, boolean tick, CallbackInfo ci){
122-
if(ci !=null && !AxolotlClient.CONFIG.motionBlurInGuis.get()) {
123+
if(ci != null && !AxolotlClient.CONFIG.motionBlurInGuis.get()) {
123124
return;
124125
}
125126

src/main/java/io/github/axolotlclient/mixin/MixinReloadableResourceManager.java

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,18 +25,25 @@
2525
@Mixin(ReloadableResourceManager.class)
2626
public class MixinReloadableResourceManager {
2727

28-
@Inject(method = "reload", at=@At("HEAD"))
28+
@Inject(method = "reload", at = @At("HEAD"))
29+
public void reloadStart(Executor prepareExecutor, Executor applyExecutor, CompletableFuture<Unit> initialStage, List<ResourcePack> packs, CallbackInfoReturnable<ResourceReload> cir){
30+
SkyboxManager.getInstance().clearSkyboxes();
31+
}
32+
33+
@Inject(method = "reload", at=@At("TAIL"))
2934
public void loadSkies(Executor prepareExecutor, Executor applyExecutor, CompletableFuture<Unit> initialStage, List<ResourcePack> resourcePacks, CallbackInfoReturnable<ResourceReload> cir){
3035
HypixelAbstractionLayer.clearPlayerData();
31-
SkyboxManager.getInstance().clearSkyboxes();
3236
SkyResourceManager.reload(resourcePacks);
3337

38+
AxolotlClient.packs=resourcePacks;
39+
3440
PackDisplayHud hud = (PackDisplayHud) HudManager.getINSTANCE().get(PackDisplayHud.ID);
3541
if(hud.isEnabled()){
3642
hud.widgets.clear();
43+
hud.init();
3744
}
3845

39-
AxolotlClient.packs=resourcePacks;
46+
4047
}
4148

4249
@Inject(method = "method_14486", at = @At("HEAD"), cancellable = true)
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
package io.github.axolotlclient.mixin;
2+
3+
import com.mojang.blaze3d.systems.RenderSystem;
4+
import io.github.axolotlclient.AxolotlClient;
5+
import net.minecraft.obfuscate.DontObfuscate;
6+
import org.spongepowered.asm.mixin.Final;
7+
import org.spongepowered.asm.mixin.Mixin;
8+
import org.spongepowered.asm.mixin.Shadow;
9+
import org.spongepowered.asm.mixin.injection.At;
10+
import org.spongepowered.asm.mixin.injection.Inject;
11+
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
12+
13+
@Mixin(RenderSystem.class)
14+
public abstract class MixinRenderSystem {
15+
16+
@Shadow @Final @DontObfuscate
17+
private static float[] shaderColor;
18+
19+
@Inject(method = "_setShaderColor", at = @At(value = "HEAD"), cancellable = true, remap = false)
20+
private static void reduceBlue(float red, float green, float blue, float alpha, CallbackInfo ci){
21+
if(AxolotlClient.CONFIG.nightMode.get()){
22+
shaderColor[0] = red;
23+
shaderColor[1] = green;
24+
shaderColor[2] = blue/2;
25+
shaderColor[3] = alpha;
26+
ci.cancel();
27+
}
28+
}
29+
}

src/main/java/io/github/axolotlclient/mixin/MixinWorldRenderer.java

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
import net.minecraft.util.math.Vec3d;
2626
import net.minecraft.util.math.Vec3f;
2727
import org.jetbrains.annotations.Nullable;
28+
import org.quiltmc.loader.api.QuiltLoader;
2829
import org.spongepowered.asm.mixin.Final;
2930
import org.spongepowered.asm.mixin.Mixin;
3031
import org.spongepowered.asm.mixin.Shadow;
@@ -56,9 +57,9 @@ public abstract class MixinWorldRenderer {
5657

5758
@Shadow @Nullable private VertexBuffer lightSkyBuffer;
5859

59-
@Inject(method = "renderSky", at = @At(value = "INVOKE", target = "Lcom/mojang/blaze3d/systems/RenderSystem;disableTexture()V"), cancellable = true)
60+
@Inject(method = "renderSky", at = @At(value = "INVOKE", target = "Lcom/mojang/blaze3d/systems/RenderSystem;disableTexture()V"), cancellable = true, remap = false)
6061
public void renderSky(MatrixStack matrices, Matrix4f projectionMatrix, float tickDelta, Camera preStep, boolean bl, Runnable runnable, CallbackInfo ci){
61-
if(AxolotlClient.CONFIG.customSky.get() && SkyboxManager.getInstance().hasSkyBoxes()) {
62+
if(AxolotlClient.CONFIG.customSky.get() && SkyboxManager.getInstance().hasSkyBoxes() && !QuiltLoader.isModLoaded("fabricskyboxes")) {
6263
RenderSystem.disableTexture();
6364
Vec3d vec3d = this.world.getSkyColor(this.client.gameRenderer.getCamera().getPos(), tickDelta);
6465
float f = (float) vec3d.x;
@@ -194,14 +195,6 @@ public float customCloudHeight(SkyProperties instance){
194195
return instance.getCloudsHeight();
195196
}
196197

197-
/*@ModifyArg(method = "method_1380", at = @At(value = "INVOKE", target = "Lorg/lwjgl/opengl/GL11;glLineWidth(F)V"))
198-
public float OutlineWidth(float width){
199-
if(AxolotlClient.CONFIG.enableCustomOutlines.get() && AxolotlClient.CONFIG.outlineWidth.get()>1){
200-
return 1.0F+ AxolotlClient.CONFIG.outlineWidth.get();
201-
}
202-
return width;
203-
}*/
204-
205198
@ModifyArgs(method = "drawBlockOutline", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/WorldRenderer;drawShapeOutline(Lnet/minecraft/client/util/math/MatrixStack;Lcom/mojang/blaze3d/vertex/VertexConsumer;Lnet/minecraft/util/shape/VoxelShape;DDDFFFF)V"))
206199
public void customOutlineColor(Args args){
207200
if(AxolotlClient.CONFIG.enableCustomOutlines.get()){

0 commit comments

Comments
 (0)