Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ dependencies {
jij(libs.netty.handler.proxy) { isTransitive = false }
jij(libs.netty.codec.socks) { isTransitive = false }
jij(libs.waybackauthlib)
jij(libs.cubiomes)
}

sourceSets {
Expand Down Expand Up @@ -190,8 +191,8 @@ tasks {
}

java {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
sourceCompatibility = JavaVersion.VERSION_25
targetCompatibility = JavaVersion.VERSION_25

if (System.getenv("CI")?.toBoolean() == true) {
withSourcesJar()
Expand Down
3 changes: 3 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ netty = "4.2.7.Final"
viafabricplus = "4.4.0"
# WaybackAuthLib (https://github.com/FlorianMichael/WaybackAuthLib)
waybackauthlib = "1.0.1"
# cubiomes (https://github.com/xpple/cubiomes)
cubiomes = "0.0.0-2026.2.5.1770319418+6c922327e2836bb03b0d8fe93008598c3b8daedd"

[libraries]
# Fabric base
Expand All @@ -58,6 +60,7 @@ reflections = { module = "org.reflections:reflections", version.ref = "reflectio
netty-handler-proxy = { module = "io.netty:netty-handler-proxy", version.ref = "netty" }
netty-codec-socks = { module = "io.netty:netty-codec-socks", version.ref = "netty" }
waybackauthlib = { module = "de.florianmichael:WaybackAuthLib", version.ref = "waybackauthlib" }
cubiomes = { module = "dev.xpple:cubiomes", version.ref = "cubiomes" }

[plugins]
fabric-loom = { id = "fabric-loom", version.ref = "loom" }
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

package meteordevelopment.meteorclient;

import dev.xpple.cubiomes.CubiomesInit;
import meteordevelopment.meteorclient.addons.AddonManager;
import meteordevelopment.meteorclient.addons.MeteorAddon;
import meteordevelopment.meteorclient.events.game.OpenScreenEvent;
Expand Down Expand Up @@ -83,6 +84,9 @@ public void onInitializeClient() {
return;
}

// Needs to be loaded early
CubiomesInit.load();

// Global minecraft client accessor
mc = MinecraftClient.getInstance();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ public DefaultSettingsWidgetFactory(GuiTheme theme) {
factories.put(IntSetting.class, (table, setting) -> intW(table, (IntSetting) setting));
factories.put(DoubleSetting.class, (table, setting) -> doubleW(table, (DoubleSetting) setting));
factories.put(StringSetting.class, (table, setting) -> stringW(table, (StringSetting) setting));
factories.put(SeedSetting.class, (table, setting) -> seedW(table, (SeedSetting) setting));
factories.put(EnumSetting.class, (table, setting) -> enumW(table, (EnumSetting<? extends Enum<?>>) setting));
factories.put(ProvidedStringSetting.class, (table, setting) -> providedStringW(table, (ProvidedStringSetting) setting));
factories.put(GenericSetting.class, (table, setting) -> genericW(table, (GenericSetting<?>) setting));
Expand Down Expand Up @@ -197,6 +198,15 @@ private void stringW(WTable table, StringSetting setting) {
reset(table, setting, () -> textBox.set(setting.get()));
}

private void seedW(WTable table, SeedSetting setting) {
Cell<WTextBox> cell = table.add(theme.textBox(String.valueOf(setting.get()), "Seed"));

WTextBox textBox = cell.expandX().widget();
textBox.action = () -> setting.parse(textBox.get());

reset(table, setting, () -> textBox.set(String.valueOf(setting.get())));
}

private void stringListW(WTable table, StringListSetting setting) {
WTable wtable = table.add(theme.table()).expandX().widget();
StringListSetting.fillTable(theme, wtable, setting);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
/*
* This file is part of the Meteor Client distribution (https://github.com/MeteorDevelopment/meteor-client).
* Copyright (c) Meteor Development.
*/

package meteordevelopment.meteorclient.settings;

import net.minecraft.nbt.NbtCompound;
import net.minecraft.world.gen.GeneratorOptions;

import java.util.OptionalLong;
import java.util.function.Consumer;

public class SeedSetting extends Setting<Long> {

private SeedSetting(String name, String description, Long defaultValue, Consumer<Long> onChanged, Consumer<Setting<Long>> onModuleActivated, IVisible visible) {
super(name, description, defaultValue, onChanged, onModuleActivated, visible);
}

@Override
protected Long parseImpl(String str) {
OptionalLong optionalLong = GeneratorOptions.parseSeed(str);
if (optionalLong.isPresent()) {
return optionalLong.getAsLong();
}
return null;
}

@Override
protected boolean isValueValid(Long value) {
return value != null;
}

@Override
public NbtCompound save(NbtCompound tag) {
tag.putLong("seed", get());

return tag;
}

@Override
public Long load(NbtCompound tag) {
set(tag.getLong("seed", 0));

return get();
}

public static class Builder extends SettingBuilder<Builder, Long, SeedSetting> {

public Builder() {
super(null);
}

@Override
public SeedSetting build() {
return new SeedSetting(name, description, defaultValue, onChanged, onModuleActivated, visible);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -556,6 +556,7 @@ private void initWorld() {
add(new SpawnProofer());
add(new Timer());
add(new VeinMiner());
add(new ChestPredictor());

if (BaritoneUtils.IS_AVAILABLE) {
add(new Excavator());
Expand Down
Loading