Update to 1.20.4

This commit is contained in:
Cameron Reed 2024-02-15 14:51:43 -07:00
parent ee3879dbf3
commit f0cc430e2e
11 changed files with 20 additions and 20 deletions

View File

@ -26,7 +26,7 @@ dependencies {
// Fabric API. This is technically optional, but you probably want it anyway. // Fabric API. This is technically optional, but you probably want it anyway.
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}" modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
modImplementation files("libs/cmods-1.2.0-dev.jar") modImplementation files("libs/cmods-1.2.1-dev.jar")
modCompileOnly "com.terraformersmc:modmenu:4.1.1" modCompileOnly "com.terraformersmc:modmenu:4.1.1"
} }

View File

@ -2,13 +2,13 @@
org.gradle.jvmargs=-Xmx2G org.gradle.jvmargs=-Xmx2G
# Fabric Properties # Fabric Properties
# check these on https://modmuss50.me/fabric.html # check these on https://modmuss50.me/fabric.html
minecraft_version=1.20.1 minecraft_version=1.20.4
yarn_mappings=1.20.1+build.10 yarn_mappings=1.20.4+build.3
loader_version=0.14.22 loader_version=0.15.6
# Mod Properties # Mod Properties
mod_version=2.4.0 mod_version=2.4.1
maven_group=cmods maven_group=cmods
archives_base_name=haxxor archives_base_name=haxxor
# Dependencies # Dependencies
# check this on https://modmuss50.me/fabric.html # check this on https://modmuss50.me/fabric.html
fabric_version=0.87.0+1.20.1 fabric_version=0.96.1+1.20.4

View File

@ -29,8 +29,8 @@ public class HaxxorModule extends Module {
} }
public static void init() { public static void init() {
HaxxorOptions options = HaxxorOptions.getInstance(); final HaxxorOptions options = HaxxorOptions.getInstance();
ArrayList<ButtonBuilder> optionButtons = new ArrayList<>(2); ArrayList<ButtonBuilder> optionButtons = new ArrayList<>(4);
ArrayList<ButtonBuilder> uiOptions = new ArrayList<>(2); ArrayList<ButtonBuilder> uiOptions = new ArrayList<>(2);

View File

@ -43,7 +43,7 @@ public class AutoFarmer { // Really just a namespace and needed to separate thin
PLACE_OFF_HAND PLACE_OFF_HAND
} }
private enum GROWTH_PATTERN { public enum GROWTH_PATTERN {
BASIC, BASIC,
LEAVE_BASE LEAVE_BASE
} }
@ -61,14 +61,14 @@ public class AutoFarmer { // Really just a namespace and needed to separate thin
} }
public static boolean canFarm() { public static boolean canFarm() {
return queuedActions.size() > 0; return !queuedActions.isEmpty();
} }
public static void tick(MinecraftClient client) { public static void tick(MinecraftClient client) {
if (client.player == null) if (client.player == null)
return; return;
if (queuedStopPackets.size() > 0) if (!queuedStopPackets.isEmpty())
sendStopPackets(client); sendStopPackets(client);
scanBlocks(client); scanBlocks(client);
@ -265,7 +265,7 @@ public class AutoFarmer { // Really just a namespace and needed to separate thin
if (block.getBlock() instanceof CropBlock) if (block.getBlock() instanceof CropBlock)
return ((CropBlock) block.getBlock()).isMature(block); return ((CropBlock) block.getBlock()).isMature(block);
if (blockType == NetherWartBlock.class) if (blockType == NetherWartBlock.class)
return block.get(NetherWartBlock.AGE) >= NetherWartBlock.field_31199; return block.get(NetherWartBlock.AGE) >= NetherWartBlock.MAX_AGE;
return false; return false;
} }

View File

@ -66,7 +66,7 @@ public class CropSelectScreen extends Screen {
final int column2 = width / 2 + column2_offset; final int column2 = width / 2 + column2_offset;
final int startHeight = (int) Math.floor(height * startHeight_multiplier) + heightOffset; final int startHeight = (int) Math.floor(height * startHeight_multiplier) + heightOffset;
this.renderBackground(context); this.renderBackground(context, mouseX, mouseY, delta);
context.drawCenteredTextWithShadow(textRenderer, Text.translatable("haxxor.options.farmer.crop_select.seeds"), context.drawCenteredTextWithShadow(textRenderer, Text.translatable("haxxor.options.farmer.crop_select.seeds"),
column1 + buttonWidth / 2, startHeight - rowIncrement, 0xffffff); column1 + buttonWidth / 2, startHeight - rowIncrement, 0xffffff);

View File

@ -53,7 +53,7 @@ public class ElevatorOptionsScreen extends Screen {
} }
public void render(DrawContext context, int mouseX, int mouseY, float delta) { public void render(DrawContext context, int mouseX, int mouseY, float delta) {
this.renderBackground(context); this.renderBackground(context, mouseX, mouseY, delta);
context.drawCenteredTextWithShadow(textRenderer, title, width / 2, 15, 0xffffff); context.drawCenteredTextWithShadow(textRenderer, title, width / 2, 15, 0xffffff);
super.render(context, mouseX, mouseY, delta); super.render(context, mouseX, mouseY, delta);
} }

View File

@ -77,7 +77,7 @@ public class FarmerOptionsScreen extends Screen {
} }
public void render(DrawContext context, int mouseX, int mouseY, float delta) { public void render(DrawContext context, int mouseX, int mouseY, float delta) {
this.renderBackground(context); this.renderBackground(context, mouseX, mouseY, delta);
context.drawCenteredTextWithShadow(textRenderer, title, width / 2, 15, 0xffffff); context.drawCenteredTextWithShadow(textRenderer, title, width / 2, 15, 0xffffff);
super.render(context, mouseX, mouseY, delta); super.render(context, mouseX, mouseY, delta);
} }

View File

@ -56,7 +56,7 @@ public class GlowOptionsScreen extends Screen {
} }
public void render(DrawContext context, int mouseX, int mouseY, float delta) { public void render(DrawContext context, int mouseX, int mouseY, float delta) {
this.renderBackground(context); this.renderBackground(context, mouseX, mouseY, delta);
context.drawCenteredTextWithShadow(textRenderer, title, width / 2, 15, 0xffffff); context.drawCenteredTextWithShadow(textRenderer, title, width / 2, 15, 0xffffff);
super.render(context, mouseX, mouseY, delta); super.render(context, mouseX, mouseY, delta);
} }

View File

@ -58,7 +58,7 @@ public class HaxxorOptionsScreen extends Screen {
} }
public void render(DrawContext context, int mouseX, int mouseY, float delta) { public void render(DrawContext context, int mouseX, int mouseY, float delta) {
renderBackground(context); renderBackground(context, mouseX, mouseY, delta);
Text versionText = Text.literal("v" + HaxxorClient.version); Text versionText = Text.literal("v" + HaxxorClient.version);

View File

@ -51,7 +51,7 @@ public class UIOptionsScreen extends Screen {
} }
public void render(DrawContext context, int mouseX, int mouseY, float delta) { public void render(DrawContext context, int mouseX, int mouseY, float delta) {
this.renderBackground(context); this.renderBackground(context, mouseX, mouseY, delta);
context.drawCenteredTextWithShadow(textRenderer, title, width / 2, 15, 0xffffff); context.drawCenteredTextWithShadow(textRenderer, title, width / 2, 15, 0xffffff);
super.render(context, mouseX, mouseY, delta); super.render(context, mouseX, mouseY, delta);
} }

View File

@ -23,7 +23,7 @@
"depends": { "depends": {
"fabricloader": ">=0.14.10", "fabricloader": ">=0.14.10",
"fabric": "*", "fabric": "*",
"minecraft": "1.20.1", "minecraft": "1.20.4",
"cmods": "1.2.0" "cmods": "1.2.1"
} }
} }