Skip to content

Commit 19cad42

Browse files
committed
run dev on cts 8 c
1 parent adfedea commit 19cad42

File tree

18 files changed

+74
-68
lines changed

18 files changed

+74
-68
lines changed

.idea/runConfigurations/Minecraft_Client.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build.gradle

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ version = project.version
99
group = project.maven_group
1010

1111
repositories {
12+
maven {
13+
name = 'CombatReforged'
14+
url = 'https://maven.combatreforged.com/'
15+
}
16+
1217
maven { url 'https://jitpack.io' }
1318
maven {
1419
url 'https://repo.hypixel.net/repository/Hypixel/'

gradle.properties

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@ org.gradle.jvmargs = -Xmx1G
33
org.gradle.parallel = true
44

55
# Dependencies
6-
minecraft_version = 1.16.2
7-
yarn_mappings=1.16.2+build.47
8-
loader_version = 0.12.0
6+
minecraft_version = 1.16_combat-6
7+
yarn_mappings=1.16_combat-6+build.2
8+
loader_version = 0.14.8
99

1010
#Fabric api
1111
fabric_version=0.42.0+1.16
1212

1313
# Mod Properties
14-
version = 2.1.3+1.16.2
14+
version = 2.1.5+1.16.2
1515
maven_group = io.github.axolotlclient
1616
archives_base_name = AxolotlClient

settings.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
pluginManagement {
22
repositories {
33
maven {
4-
name = 'Quilt'
5-
url = 'https://maven.quiltmc.org/repository/release/'
4+
name = 'CombatReforged'
5+
url = 'https://maven.combatreforged.com/'
66
}
77
// Currently needed for Intermediary and other temporary dependencies
88
maven {

src/main/java/io/github/axolotlclient/config/screen/ButtonWidgetList.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ public void render(MatrixStack matrixStack, int i, int j, float f) {
127127
int l = k + 6;
128128
Tessellator tessellator = Tessellator.getInstance();
129129
BufferBuilder bufferBuilder = tessellator.getBuffer();
130-
this.client.getTextureManager().bindTexture(DrawableHelper.BACKGROUND_TEXTURE);
130+
this.client.getTextureManager().bindTexture(DrawableHelper.OPTIONS_BACKGROUND_TEXTURE);
131131
RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F);
132132

133133
int m = this.getRowLeft();

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ public abstract class MixinKeyboardInput {
1818
* @param instance The sneak key
1919
* @return boolean whether the player should be sneaking or not
2020
*/
21-
/*@Redirect(method = "tick", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/options/KeyBinding;isPressed()Z", ordinal = 5))
21+
@Redirect(method = "tick", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/options/KeyBinding;isPressed()Z", ordinal = 5))
2222
public boolean toggleSneak(KeyBinding instance){
2323
ToggleSprintHud hud = (ToggleSprintHud) HudManager.getINSTANCE().get(ToggleSprintHud.ID);
2424
return hud.isEnabled() && hud.sneakToggled.get() && MinecraftClient.getInstance().currentScreen==null ||
2525
instance.isPressed();
26-
}*/
26+
}
2727
}

src/main/java/io/github/axolotlclient/modules/hud/HudManager.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,13 +116,16 @@ public AbstractHudEntry get(Identifier identifier) {
116116
}
117117

118118
public void render(MatrixStack matrices) {
119+
client.getProfiler().push("Hud Modules");
119120
if (!(client.currentScreen instanceof HudEditScreen) && !client.options.debugEnabled) {
120121
for (AbstractHudEntry hud : getEntries()) {
121122
if (hud.isEnabled()) {
123+
client.getProfiler().swap(hud.getName());
122124
hud.renderHud(matrices);
123125
}
124126
}
125127
}
128+
client.getProfiler().pop();
126129
}
127130

128131
public Optional<AbstractHudEntry> getEntryXY(int x, int y) {

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

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import io.github.axolotlclient.config.options.BooleanOption;
55
import io.github.axolotlclient.config.options.ColorOption;
66
import io.github.axolotlclient.config.options.DoubleOption;
7+
import io.github.axolotlclient.config.options.EnumOption;
78
import io.github.axolotlclient.config.options.OptionBase;
89
import io.github.axolotlclient.config.options.OptionCategory;
910
import io.github.axolotlclient.modules.hud.util.DrawPosition;
@@ -31,6 +32,7 @@ public abstract class AbstractHudEntry extends DrawUtil {
3132

3233
protected BooleanOption enabled = new BooleanOption("enabled",false);
3334
public DoubleOption scale = new DoubleOption("scale", 1, 0.1F, 5);
35+
protected EnumOption textAlignment = new EnumOption("textAlignment", new String[]{"center", "left", "right"}, "center");
3436
protected final ColorOption textColor = new ColorOption("textColor", Color.WHITE);
3537
protected final BooleanOption chroma = new BooleanOption("chroma", false);
3638
protected BooleanOption shadow = new BooleanOption("shadow", getShadowDefault());
@@ -191,6 +193,20 @@ public void addConfigOptions(List<OptionBase<?>> options) {
191193
options.add(scale);
192194
}
193195

196+
protected void drawString(MatrixStack matrices, String s, int x, int y, Color color, boolean shadow){
197+
switch (textAlignment.get()){
198+
case "center":
199+
drawCenteredString(matrices, MinecraftClient.getInstance().textRenderer, s, x+width/2, y, color.getAsInt());
200+
break;
201+
case "left":
202+
DrawUtil.drawString(matrices, MinecraftClient.getInstance().textRenderer, s, x, y, color.getAsInt(), shadow);
203+
break;
204+
case "right":
205+
DrawUtil.drawString(matrices, MinecraftClient.getInstance().textRenderer, s, x+width - MinecraftClient.getInstance().textRenderer.getWidth(s), y, color.getAsInt(), shadow);
206+
break;
207+
}
208+
}
209+
194210
public boolean isEnabled() {
195211
return enabled.get();
196212
}

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

Lines changed: 8 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -48,33 +48,14 @@ public void render(MatrixStack matrices) {
4848

4949
matrices.push();
5050
scale(matrices);
51-
if (shadow.get()){
52-
client.textRenderer.drawWithShadow(matrices, actionBar,
53-
(float)getPos().x + Math.round((float) width /2) - (float) client.textRenderer.getWidth(actionBar) /2,
54-
(float)getPos().y + 3,
55-
customTextColor.get() ? (textColor.get().getAlpha()==255 ?
56-
new Color(
57-
textColor.get().getRed(),
58-
textColor.get().getGreen(),
59-
textColor.get().getBlue(),
60-
vanillaColor.getAlpha()).getAsInt():
61-
textColor.get().getAsInt()) :
62-
color
63-
);
64-
} else {
65-
66-
client.textRenderer.draw(matrices, actionBar,
67-
(float)getPos().x + Math.round((float) width /2) - ((float) client.textRenderer.getWidth(actionBar) /2),
68-
(float)getPos().y + 3,
69-
customTextColor.get() ? (textColor.get().getAlpha()==255 ?
70-
new Color(textColor.get().getRed(),
71-
textColor.get().getGreen(),
72-
textColor.get().getBlue(),
73-
vanillaColor.getAlpha()).getAsInt():
74-
textColor.get().getAsInt()) :
75-
color
76-
);
77-
}
51+
drawString(matrices, actionBar.asOrderedText().toString(), getPos().x, getPos().y + 3, customTextColor.get() ? (textColor.get().getAlpha()==255 ?
52+
new Color(
53+
textColor.get().getRed(),
54+
textColor.get().getGreen(),
55+
textColor.get().getBlue(),
56+
vanillaColor.getAlpha()):
57+
textColor.get()) :
58+
vanillaColor, shadow.get());
7859
matrices.pop();
7960
ticksShown++;
8061
} else {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public void tick() {
7272
return;
7373
}
7474
if (!allArrowTypes.get()) {
75-
currentArrow = client.player.getArrowType(Items.BOW.getStackForRender());
75+
currentArrow = client.player.getArrowType(Items.BOW.getDefaultStack());
7676
} else {
7777
currentArrow = new ItemStack(Items.ARROW);
7878
}

0 commit comments

Comments
 (0)