Skip to content

Commit 9a00753

Browse files
[skip] Add in-game authentication (#61)
* add In-Game Authentication * add small notif system to 1.8.9 that was the only part missing for that on 1.8.9, and yes it's still a little ugly. * [skip] update german translation * add player heads to accounts view * improve notifications for 1.8.9 * add missing header * Add improvements suggested by @MochaFrappMc - second hat layer in the Accounts view - skin head on the button on the title screen * fix some (small) issues * add support for offline accounts - only possible after at least one other account is added - fixes bug of infinite resource reloads in 1.16 versions - update mappings - update qsl * cleanup code * include necessary fapi modules - on 1.16 versions - fix some more bugs * update Changelog * use correct method naming on 1.16.5 * fix more bugs - thanks to MonstoBusta for reporting some of these * fix running 1.16 with java 8 (i hope these were all things that aren't java 8 syntax, it doesn't crash anymore) * fix.. more issues - including a StackOverflowError reported by decobra - there are still some bugs in here that should be fixed * minimize a small shading issue * fix scaling issues when toggling fullscreen * fix speedHud value * [skip] sort translations * [skip] remove duplicate options * Update fr_fr.json (#62) --------- Co-authored-by: CornetPanique86 <[email protected]>
1 parent 4b75221 commit 9a00753

File tree

469 files changed

+6365
-2075
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

469 files changed

+6365
-2075
lines changed

.editorconfig

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,29 +6,16 @@ end_of_line = lf
66
insert_final_newline = true
77
tab_width = 4
88
trim_trailing_whitespace = true
9-
10-
[*.gradle]
119
indent_style = tab
1210

13-
[*.java]
14-
indent_style = space
15-
1611
[*.json]
17-
indent_style = space
1812
indent_size = 2
1913

2014
[quilt.mod.json]
21-
indent_style = space
22-
tab_width = 2
23-
24-
[*.toml]
25-
indent_style = space
2615
tab_width = 2
2716

2817
[*.properties]
29-
indent_style = space
3018
indent_size = 2
3119

3220
[.editorconfig]
33-
indent_style = space
3421
indent_size = 4

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Automated build
22

3-
on: [push, pull_request]
3+
on: push
44

55
jobs:
66
build:

.github/workflows/release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,5 @@ jobs:
2828
with:
2929
repo_token: "${{ secrets.GH_TOKEN }}"
3030
prerelease: false
31+
draft: true
3132
files: 1.*/build/libs/*

1.16.5/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ dependencies {
2222

2323
modImplementation "net.fabricmc:fabric-loader:${fabric_loader}"
2424

25-
modImplementation "net.fabricmc.fabric-api:fabric-api:${fabric_1165}"
25+
modImplementation include("net.fabricmc.fabric-api:fabric-networking-api-v1:1.0.5+3cc0f0907d")
2626

2727
modImplementation ("io.github.axolotlclient:AxolotlClient-config:${project.config}+1.16") {
2828
exclude group: "com.terraformersmc"
@@ -80,11 +80,11 @@ modrinth {
8080
versionNumber = "${project.version}"
8181
versionType = "release"
8282
uploadFile = remapJar
83-
gameVersions = ["${project.minecraft_1192}"]
83+
gameVersions = ["${project.minecraft_1165}"]
8484
loaders = ["fabric"]
8585
additionalFiles = [remapSourcesJar]
8686
dependencies {
87-
required.project "fabric-api"
87+
required.version "IQ3UGSc2"
8888
}
8989

9090
// Changelog fetching: Credit LambdAurora.

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

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
import io.github.axolotlclient.config.AxolotlClientConfig;
3232
import io.github.axolotlclient.modules.Module;
3333
import io.github.axolotlclient.modules.ModuleLoader;
34+
import io.github.axolotlclient.modules.auth.Auth;
3435
import io.github.axolotlclient.modules.blur.MenuBlur;
3536
import io.github.axolotlclient.modules.blur.MotionBlur;
3637
import io.github.axolotlclient.modules.freelook.Freelook;
@@ -159,6 +160,7 @@ public static void getModules() {
159160
modules.add(ScreenshotUtils.getInstance());
160161
modules.add(BeaconBeam.getInstance());
161162
modules.add(Tablist.getInstance());
163+
modules.add(Auth.getInstance());
162164
}
163165

164166
private static void addExternalModules() {
@@ -198,16 +200,16 @@ public static void addBadge(Entity entity, MatrixStack matrices) {
198200
.getWidth(
199201
entity.getUuid() == MinecraftClient.getInstance().player.getUuid()
200202
? (NickHider.getInstance().hideOwnName.get()
201-
? NickHider.getInstance().hiddenNameSelf.get()
202-
: Team.decorateName(entity.getScoreboardTeam(), entity.getName())
203-
.getString())
203+
? NickHider.getInstance().hiddenNameSelf.get()
204+
: Team.decorateName(entity.getScoreboardTeam(), entity.getName())
205+
.getString())
204206
: (NickHider.getInstance().hideOtherNames.get()
205-
? NickHider.getInstance().hiddenNameOthers.get()
206-
: Team.decorateName(entity.getScoreboardTeam(), entity.getName())
207-
.getString()))
207+
? NickHider.getInstance().hiddenNameOthers.get()
208+
: Team.decorateName(entity.getScoreboardTeam(), entity.getName())
209+
.getString()))
208210
/ 2
209211
+ (AxolotlClient.CONFIG.customBadge.get() ? MinecraftClient.getInstance().textRenderer
210-
.getWidth(" " + Formatting.strip(AxolotlClient.CONFIG.badgeText.get())) : 10));
212+
.getWidth(" " + Formatting.strip(AxolotlClient.CONFIG.badgeText.get())) : 10));
211213

212214
RenderSystem.color4f(1, 1, 1, 1);
213215

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

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public class AxolotlClientConfig extends ConfigHolder {
4848
public final BooleanOption nametagBackground = new BooleanOption("nametagBackground", true);
4949

5050
public final BooleanOption showBadges = new BooleanOption("showBadges", value -> {
51-
if(value){
51+
if (value) {
5252
NetworkHelper.setOnline();
5353
} else {
5454
NetworkHelper.setOffline();
@@ -57,8 +57,8 @@ public class AxolotlClientConfig extends ConfigHolder {
5757
public final BooleanOption customBadge = new BooleanOption("customBadge", false);
5858
public final StringOption badgeText = new StringOption("badgeText", "");
5959

60-
public final BooleanOption timeChangerEnabled = new BooleanOption("enabled", false);
61-
public final IntegerOption customTime = new IntegerOption("time", 0, 0, 24000);
60+
public final BooleanOption timeChangerEnabled = new BooleanOption("enabled", false);
61+
public final IntegerOption customTime = new IntegerOption("time", 0, 0, 24000);
6262
public final BooleanOption customSky = new BooleanOption("customSky", true);
6363
public final BooleanOption showSunMoon = new BooleanOption("showSunMoon", true);
6464
public final BooleanOption dynamicFOV = new BooleanOption("dynamicFov", true);
@@ -71,13 +71,13 @@ public class AxolotlClientConfig extends ConfigHolder {
7171
NativeImageBackedTexture texture = ((OverlayTextureAccessor) MinecraftClient.getInstance().gameRenderer.getOverlayTexture()).getTexture();
7272
NativeImage nativeImage = texture.getImage();
7373
if (nativeImage != null) {
74-
int color = 255-value.getAlpha();
74+
int color = 255 - value.getAlpha();
7575
color = (color << 8) + value.getBlue();
7676
color = (color << 8) + value.getGreen();
7777
color = (color << 8) + value.getRed();
7878

79-
for (int i = 0; i <8 ; ++i) {
80-
for (int j = 0; j <8; ++j) {
79+
for (int i = 0; i < 8; ++i) {
80+
for (int j = 0; j < 8; ++j) {
8181
nativeImage.setPixelColor(j, i, color);
8282
}
8383
}
@@ -88,7 +88,8 @@ public class AxolotlClientConfig extends ConfigHolder {
8888
nativeImage.getWidth(), nativeImage.getHeight(), false, true, false, false);
8989
RenderSystem.activeTexture(33984);
9090
}
91-
} catch (Exception ignored){}
91+
} catch (Exception ignored) {
92+
}
9293
},
9394
new Color(255, 0, 0, 77));
9495

@@ -99,21 +100,21 @@ public class AxolotlClientConfig extends ConfigHolder {
99100
public final BooleanOption enableCustomOutlines = new BooleanOption("enabled", false);
100101
public final ColorOption outlineColor = new ColorOption("color", Color.parse("#DD000000"));
101102
public final BooleanOption outlineChroma = new BooleanOption("chroma", false);
102-
public final DoubleOption outlineWidth = new DoubleOption("outlineWidth",1, 1, 10);
103+
public final DoubleOption outlineWidth = new DoubleOption("outlineWidth", 1, 1, 10);
103104

104105
public final BooleanOption noRain = new BooleanOption("noRain", false);
105106

106-
public final GenericOption openCredits = new GenericOption("Credits", "Open Credits", (mouseX, mouseY)->
107+
public final GenericOption openCredits = new GenericOption("Credits", "Open Credits", (mouseX, mouseY) ->
107108
MinecraftClient.getInstance().openScreen(new CreditsScreen(MinecraftClient.getInstance().currentScreen))
108109
);
109110
public final BooleanOption debugLogOutput = new BooleanOption("debugLogOutput", false);
110111
public final BooleanOption creditsBGM = new BooleanOption("creditsBGM", true);
111112

112113
public final OptionCategory general = new io.github.axolotlclient.AxolotlClientConfig.options.OptionCategory("general");
113-
public final OptionCategory nametagOptions = new io.github.axolotlclient.AxolotlClientConfig.options.OptionCategory( "nametagOptions");
114+
public final OptionCategory nametagOptions = new io.github.axolotlclient.AxolotlClientConfig.options.OptionCategory("nametagOptions");
114115
public final OptionCategory rendering = new io.github.axolotlclient.AxolotlClientConfig.options.OptionCategory("rendering");
115-
public final OptionCategory outlines= new io.github.axolotlclient.AxolotlClientConfig.options.OptionCategory("blockOutlines");
116-
public final OptionCategory timeChanger = new io.github.axolotlclient.AxolotlClientConfig.options.OptionCategory("timeChanger");
116+
public final OptionCategory outlines = new io.github.axolotlclient.AxolotlClientConfig.options.OptionCategory("blockOutlines");
117+
public final OptionCategory timeChanger = new io.github.axolotlclient.AxolotlClientConfig.options.OptionCategory("timeChanger");
117118
public final OptionCategory searchFilters = new io.github.axolotlclient.AxolotlClientConfig.options.OptionCategory("searchFilters");
118119

119120
private final List<Option<?>> options = new ArrayList<>();
@@ -122,24 +123,24 @@ public class AxolotlClientConfig extends ConfigHolder {
122123
@Getter
123124
private final List<OptionCategory> config = new ArrayList<>();
124125

125-
public void add(Option<?> option){
126+
public void add(Option<?> option) {
126127
options.add(option);
127128
}
128129

129-
public void addCategory(OptionCategory cat){
130+
public void addCategory(OptionCategory cat) {
130131
categories.add(cat);
131132
}
132133

133-
public List<OptionCategory> getCategories(){
134+
public List<OptionCategory> getCategories() {
134135
return categories;
135136
}
136137

137-
public List<Option<?>> getOptions(){
138+
public List<Option<?>> getOptions() {
138139
return options;
139140
}
140141

141142

142-
public void init(){
143+
public void init() {
143144

144145
categories.add(general);
145146
categories.add(nametagOptions);
@@ -181,9 +182,9 @@ public void init(){
181182
lowShield,
182183
hitColor);
183184

184-
timeChanger.add(timeChangerEnabled);
185-
timeChanger.add(customTime);
186-
rendering.addSubCategory(timeChanger);
185+
timeChanger.add(timeChangerEnabled);
186+
timeChanger.add(customTime);
187+
rendering.addSubCategory(timeChanger);
187188

188189
outlines.add(enableCustomOutlines);
189190
outlines.add(outlineColor);

1.16.5/src/main/java/io/github/axolotlclient/config/screen/CreditsScreen.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ public List<? extends Element> children() {
225225
private class CreditsList extends ElementListWidget<Credit> {
226226

227227
public CreditsList(MinecraftClient minecraftClient, int width, int height, int top, int bottom,
228-
int entryHeight) {
228+
int entryHeight) {
229229
super(minecraftClient, width, height, top, bottom, entryHeight);
230230

231231
this.setRenderHeader(false, 0);
@@ -242,16 +242,16 @@ public void render(MatrixStack matrices, int mouseX, int mouseY, float delta) {
242242
Tessellator tessellator = Tessellator.getInstance();
243243
BufferBuilder bufferBuilder = tessellator.getBuffer();
244244
int k = this.getRowLeft();
245-
int l = this.top + 4 - (int)this.getScrollAmount();
245+
int l = this.top + 4 - (int) this.getScrollAmount();
246246
this.renderList(matrices, k, l, mouseX, mouseY, delta);
247247
RenderSystem.disableAlphaTest();
248248
RenderSystem.shadeModel(7425);
249249
RenderSystem.disableTexture();
250250
int o = Math.max(0, this.getMaxPosition() - (this.bottom - this.top - 4));
251251
if (o > 0) {
252-
int p = (int)((float)((this.bottom - this.top) * (this.bottom - this.top)) / (float)this.getMaxPosition());
252+
int p = (int) ((float) ((this.bottom - this.top) * (this.bottom - this.top)) / (float) this.getMaxPosition());
253253
p = MathHelper.clamp(p, 32, this.bottom - this.top - 8);
254-
int q = (int)this.getScrollAmount() * (this.bottom - this.top - p) / o + this.top;
254+
int q = (int) this.getScrollAmount() * (this.bottom - this.top - p) / o + this.top;
255255
if (q < this.top) {
256256
q = this.top;
257257
}
@@ -331,7 +331,7 @@ public Credit(String name, String... things) {
331331

332332
@Override
333333
public void render(MatrixStack matrices, int index, int y, int x, int entryWidth, int entryHeight, int mouseX,
334-
int mouseY, boolean hovered, float tickDelta) {
334+
int mouseY, boolean hovered, float tickDelta) {
335335
if (hovered || c.isFocused()) {
336336
drawVerticalLine(matrices, x - 100, y, y + 20,
337337
io.github.axolotlclient.AxolotlClientConfig.Color.ERROR.getAsInt());
@@ -447,7 +447,7 @@ public SpacerTitle(String name) {
447447

448448
@Override
449449
public void render(MatrixStack matrices, int index, int y, int x, int entryWidth, int entryHeight, int mouseX,
450-
int mouseY, boolean hovered, float tickDelta) {
450+
int mouseY, boolean hovered, float tickDelta) {
451451
DrawUtil.drawCenteredString(matrices, MinecraftClient.getInstance().textRenderer, super.name, x, y, -128374,
452452
true);
453453
}

1.16.5/src/main/java/io/github/axolotlclient/mixin/BeaconBlockEntityRendererMixin.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ public abstract class BeaconBlockEntityRendererMixin {
3838

3939
@Inject(method = "renderBeam(Lnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/render/VertexConsumerProvider;Lnet/minecraft/util/Identifier;FFJII[FFF)V", at = @At("HEAD"), cancellable = true)
4040
private static void axolotlclient$cancelBeamRender(MatrixStack matrices, VertexConsumerProvider vertexConsumers, Identifier textureId, float tickDelta,
41-
float heightScale, long worldTime, int yOffset, int maxY, float[] color, float innerRadius, float outerRadius, CallbackInfo ci) {
42-
if(!BeaconBeam.getInstance().showBeam(textureId.getPath().contains("end_gateway"))) {
41+
float heightScale, long worldTime, int yOffset, int maxY, float[] color, float innerRadius, float outerRadius, CallbackInfo ci) {
42+
if (!BeaconBeam.getInstance().showBeam(textureId.getPath().contains("end_gateway"))) {
4343
ci.cancel();
4444
}
4545
}

1.16.5/src/main/java/io/github/axolotlclient/mixin/BuiltinModelItemRendererMixin.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,11 @@ public abstract class BuiltinModelItemRendererMixin {
3939

4040
@Inject(method = "render", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/entity/model/ShieldEntityModel;getHandle()Lnet/minecraft/client/model/ModelPart;"))
4141
public void axolotlclient$lowShield(ItemStack itemStack, ModelTransformation.Mode mode, MatrixStack matrixStack,
42-
VertexConsumerProvider vertexConsumerProvider, int i, int j, CallbackInfo ci) {
42+
VertexConsumerProvider vertexConsumerProvider, int i, int j, CallbackInfo ci) {
4343
if (AxolotlClient.CONFIG.lowShield.get()
4444
&& MinecraftClient.getInstance().options.getPerspective().isFirstPerson()
4545
&& (mode.equals(ModelTransformation.Mode.FIRST_PERSON_LEFT_HAND)
46-
|| mode.equals(ModelTransformation.Mode.FIRST_PERSON_RIGHT_HAND))) {
46+
|| mode.equals(ModelTransformation.Mode.FIRST_PERSON_RIGHT_HAND))) {
4747
matrixStack.translate(0, 0.2F, 0);
4848
}
4949
}

1.16.5/src/main/java/io/github/axolotlclient/mixin/CameraMixin.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public abstract class CameraMixin {
5050

5151
@Inject(method = "update", at = @At(value = "INVOKE", target = "net/minecraft/client/render/Camera.moveBy(DDD)V", ordinal = 0))
5252
private void axolotlclient$perspectiveUpdatePitchYaw(BlockView area, Entity focusedEntity, boolean thirdPerson,
53-
boolean inverseView, float tickDelta, CallbackInfo ci) {
53+
boolean inverseView, float tickDelta, CallbackInfo ci) {
5454
this.pitch = Freelook.getInstance().pitch(pitch)
5555
* (inverseView && Freelook.getInstance().enabled.get() && Freelook.getInstance().active ? -1 : 1);
5656
this.yaw = Freelook.getInstance().yaw(yaw)

0 commit comments

Comments
 (0)