Skip to content

Commit 0eb44a4

Browse files
committed
[1.2+alpha.9] Worldborder changes
- Shrink default worldborder max size from 4.294 billion to 2 billion. - Allow toggling worldborder size (in game config coming soon) - Can now adjust worldborder - Updated README.md - Modrinth version
1 parent 43c7688 commit 0eb44a4

15 files changed

+124
-69
lines changed

README.md

Lines changed: 64 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,68 @@
11
# SolTweaks
2-
Formerly known as ZetaForged.
32

4-
Updated README coming soon!
3+
Formerly known as ZetaForged
54

6-
### Latest Update: [1.17.1] SolTweaks 1.2
7-
### Latest Build: [1.17.1] SolTweaks 1.2
8-
### Stable Build: [1.17.1] SolTweaks 1.2
5+
SolTweaks is a Minecraft mod for version 1.17.1, utilizing the Fabric mod loader. It adds quality of life changes and utility/configuration tweaks. With features like uncapped fireball explosion power, fleshed out coordinate scaling, the revival of the Far Lands, and an expanded world border.
96

10-
# Requirements
11-
### Fabric API
12-
### Requires Minecraft version 1.17.1 or newer!
7+
### Latest Update: [1.17.1] SolTweaks 1.2 alpha
8+
### Latest Build: [1.17.1] SolTweaks 1.2 alpha
9+
### Stable Build: [1.17.1] ZetaForged 1.1.0_02
10+
11+
## Features
12+
13+
- **Fireball Explosion Power**: Remove the limits imposed by Mojang in 1.17 and above on fireball explosion power, allowing for bedrock-breaking fireballs once more!
14+
- **Noise Scaling**:
15+
- *Horizontal Scaling*: The old `coordinateScale` option from custom worlds, now using doubles instead of floats.
16+
- *Scaling on Individual Axis*: Modify noise scale individually on the X, Y, and Z axes, allowing the fringelands to be viewed in their full, unmodified vanilla glory!
17+
- *Vertical Scaling*: Adjust vertical scaling to influence terrain generation and elevation, unlocking the sky Far Lands and variants.
18+
- **Far Lands Revival**: Reintroduces the Far Lands from earlier versions of Minecraft.
19+
- **Expanded World Border**: Teleport beyond Minecraft's 30 million limit, with a default worldborder size of 2 billion blocks, expandable up to 4294967294 blocks.
20+
- **Lush Nether**: A new, wetter version of the Nether featuring:
21+
- A base using the new Lush Caves biome.
22+
- A refreshing, vibrant atmosphere.
23+
- Future expansions, including custom structures and additional sub-biomes.
24+
- **Keystone tools**: A new mysterious tool and armor set, what could this be?
25+
26+
## Installation
27+
28+
1. **Prerequisites**:
29+
- Minecraft 1.17.1 installed.
30+
- [Fabric Mod Loader](https://fabricmc.net/use/) installed.
31+
- [Fabric API](https://modrinth.com/mod/fabric-api) installed.
32+
33+
2. **Download**:
34+
- Obtain the latest release of SolTweaks from the [Modrinth site](https://modrinth.com/mod/zetaforged/).
35+
36+
3. **Install**:
37+
- Place the downloaded `.jar` file into your Minecraft `mods` folder:
38+
- Windows: `%appdata%/.minecraft/mods`
39+
- macOS: `~/Library/Application Support/minecraft/mods`
40+
- Linux: `~/.minecraft/mods`
41+
- Launch Minecraft using the Fabric profile.
42+
43+
## Configuration
44+
45+
After installation, configuration files will be generated in the `config` folder within your Minecraft directory. Edit these files to adjust mod settings, such as noise scale.
46+
47+
There are currently plans to move to ModMenu's config system soon.
48+
49+
## Development Status
50+
51+
SolTweaks is currently undergoing a code cleanup with plans to:
52+
- Update to newer Minecraft versions.
53+
- Add more features and improvements.
54+
55+
Stay up-to-date by checking the [dev/1.2 branch](https://github.com/SolDev69/ZetaForged/tree/dev/1.2) of the repository.
56+
57+
## Contributions
58+
59+
Contributions are welcome! If you'd like to contribute:
60+
1. Fork the repository.
61+
2. Make your changes.
62+
3. Submit a pull request.
63+
64+
Please ensure your contributions include proper documentation for any changes.
65+
66+
## License
67+
68+
This project currently has no license but plans to adopt a suitable open-source license soon. Contributions and forks must credit the original project and abide by the forthcoming license's terms.

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ dependencies {
6161
include "me.zeroeightsix:fiber:${project.fiberversion}"
6262
//modImplementation "zeta.soltweaks:zetas-api:1.0.0-alpha.2"
6363
//include "zeta.soltweaks:zetas-api:1.0.0-alpha.2"
64-
modImplementation "com.github.paulevsGitch:BCLib:${project.bclib_version}"
65-
include "com.github.paulevsGitch:BCLib:${project.bclib_version}"
64+
//modImplementation "com.github.paulevsGitch:BCLib:${project.bclib_version}"
65+
//include "com.github.paulevsGitch:BCLib:${project.bclib_version}"
6666
}
6767

6868
processResources {

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ org.gradle.jvmargs=-Xmx4G
99

1010
# Mod Properties
1111

12-
mod_version = 1.2.0+alpha.8
12+
mod_version = 1.2.0+alpha.9
1313
maven_group = soltweaks
1414
archives_base_name = soltweaks
1515

src/main/java/dev/solcraft/soltweaks/managers/ConfigManager.java

Lines changed: 19 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package dev.solcraft.soltweaks.managers;
22

3+
import com.ibm.icu.impl.Relation;
34
import me.zeroeightsix.fiber.JanksonSettings;
45
import me.zeroeightsix.fiber.exception.FiberException;
56
import me.zeroeightsix.fiber.tree.ConfigNode;
@@ -33,6 +34,7 @@ public class ConfigManager {
3334
public static boolean farlandsDefaultValue() {
3435
return true;
3536
}
37+
3638
public ConfigValue<Boolean> useClassicVersionString = ConfigValue.builder(Boolean.class)
3739
.withName("useClassicVersionString")
3840
.withComment("This will add back the \"v\" before the version number and the extra 0 at the end if no minor version is found")
@@ -127,45 +129,29 @@ public static boolean farlandsDefaultValue() {
127129
.build();
128130
public ConfigValue<Boolean> worldborderExpansion = ConfigValue.builder(Boolean.class)
129131
.withName("expandWorldBorder")
130-
.withComment("Will be the config value to expand worldborder in a later version")
132+
.withComment("Enable worldborder expansion beyond 60 million blocks (default: true)")
131133
.withDefaultValue(true)
132134
.withParent(world)
133135
.build();
136+
137+
public ConfigValue<Double> worldBorderMaxSize = ConfigValue.builder(Double.class)
138+
.withName("worldBorderMaxSize")
139+
.withComment("The maximum size of the worldborder (default: 4294967294, requires 'expandWorldBorder' to be true.")
140+
.withDefaultValue(4294967294D)
141+
.withParent(world)
142+
.build();
143+
144+
public ConfigValue<Double> worldBorderSize = ConfigValue.builder(Double.class)
145+
.withName("worldBorderSize")
146+
.withComment("The default size of the worldborder (default: 2000000000D, requires 'expandWorldBorder' to be true.")
147+
.withDefaultValue(2E9D)
148+
.withParent(world)
149+
.build();
150+
134151
public static ConfigManager getConfig() {
135152
return GeneralManager.CONFIG;
136153
}
137-
/*
138-
private ConfigManager() throws FiberException, IOException {
139-
File currentConfigFile = new File(FabricLoader.getInstance().getGameDir().toFile(),
140-
CONFIG_FILE.getName() + ".tmp");
141-
currentConfigFile.createNewFile();
142-
save(currentConfigFile);
143-
File configFile = new File(FabricLoader.getInstance().getConfigDirectory(),
144-
CONFIG_FILE.getName() + ".tmp");
145-
configFile.createNewFile();
146-
//if(CONFIG_FILE.exists()) {
147-
// if(currentConfigFile.hashCode() != CONFIG_FILE.hashCode()) {
148-
149-
// } else {
150-
// LogManager.getLogger().log(Level.INFO, "Will not delete config file!");
151-
// }
152-
//}
153-
if((!configFile.exists()) && CONFIG_FILE.exists()) {
154-
try {
155-
copy(CONFIG_FILE, configFile);
156-
} catch (NoSuchFileException e) {
157-
e.printStackTrace();
158-
throw e;
159-
}
160-
}
161-
if(!HelperUtilities.hash(configFile).equals(HelperUtilities.hash(currentConfigFile))) {
162-
logger.error("CONFIG FOUND WITH DIFFERENT HASH, DELETING!");
163-
CONFIG_FILE.delete();
164-
//configFile.delete();
165-
}
166-
//currentConfigFile.delete();
167-
}
168-
*/
154+
169155
public ConfigManager() throws FiberException {}
170156

171157

src/main/java/dev/solcraft/soltweaks/managers/commands/CommandsManager.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package dev.solcraft.soltweaks.managers.commands;
22

33

4+
import dev.solcraft.soltweaks.managers.ConfigManager;
45
import net.fabricmc.fabric.api.command.v1.CommandRegistrationCallback;
56
import net.fabricmc.loader.api.FabricLoader;
67
import net.minecraft.SharedConstants;
@@ -65,7 +66,13 @@ public void initCommands() {
6566
);
6667
return 1;
6768
}
68-
).then(literal("debug").executes(context -> {
69+
).then(literal("worldborderSize").executes(ctx -> {
70+
ctx.getSource().sendFeedback(new LiteralText(String.valueOf(Boolean.TRUE.equals(ConfigManager.getConfig().worldborderExpansion.getValue()) ? ConfigManager.getConfig().worldBorderSize.getValue() : 6E7D)),true);
71+
return 0;
72+
})).then(literal("worldborderMaxSize").executes(ctx -> {
73+
ctx.getSource().sendFeedback(new LiteralText(String.valueOf(Boolean.TRUE.equals(ConfigManager.getConfig().worldborderExpansion.getValue()) ? ConfigManager.getConfig().worldBorderMaxSize.getValue() : 6E7D)),true);
74+
return 0;
75+
})).then(literal("debug").executes(context -> {
6976
context.getSource().sendError(new LiteralText("this feature was removed, please just use the normal /soltweaks version command"));
7077
return 2;
7178
})

src/main/java/dev/solcraft/soltweaks/mixins/worldborder/supercoder/MixinEntity.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package dev.solcraft.soltweaks.mixins.worldborder.supercoder;
22

3+
import dev.solcraft.soltweaks.managers.ConfigManager;
34
import org.spongepowered.asm.mixin.Mixin;
45
import org.spongepowered.asm.mixin.injection.At;
56
import org.spongepowered.asm.mixin.injection.Redirect;
@@ -11,6 +12,6 @@
1112
public class MixinEntity {
1213
@Redirect(method = "updatePosition", at = @At(target = "Lnet/minecraft/util/math/MathHelper;clamp(DDD)D", value = "INVOKE"))
1314
private double redirectClamp(double value, double min, double max) {
14-
return MathHelper.clamp(value, Integer.MIN_VALUE, Integer.MAX_VALUE);
15+
return MathHelper.clamp(value, -((int) Math.max(Integer.MIN_VALUE, Math.min(Integer.MAX_VALUE, Boolean.TRUE.equals(ConfigManager.getConfig().worldborderExpansion.getValue()) ? ConfigManager.getConfig().worldBorderMaxSize.getValue() : 6E7D / 2.0D))), (int) Math.max(Integer.MIN_VALUE, Math.min(Integer.MAX_VALUE, Boolean.TRUE.equals(ConfigManager.getConfig().worldborderExpansion.getValue()) ? ConfigManager.getConfig().worldBorderMaxSize.getValue() : 6E7D / 2.0D)));
1516
}
1617
}

src/main/java/dev/solcraft/soltweaks/mixins/worldborder/supercoder/MixinMinecraftServer.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package dev.solcraft.soltweaks.mixins.worldborder.supercoder;
22

3+
import dev.solcraft.soltweaks.managers.ConfigManager;
34
import org.spongepowered.asm.mixin.Mixin;
45
import org.spongepowered.asm.mixin.Overwrite;
56

@@ -13,6 +14,6 @@ public class MixinMinecraftServer {
1314
*/
1415
@Overwrite
1516
public int getMaxWorldBorderRadius() {
16-
return Integer.MAX_VALUE;
17+
return (int) Math.max(Integer.MIN_VALUE, Math.min(Integer.MAX_VALUE, Boolean.TRUE.equals(ConfigManager.getConfig().worldborderExpansion.getValue()) ? ConfigManager.getConfig().worldBorderMaxSize.getValue() : 6E7D / 2.0D));
1718
}
1819
}

src/main/java/dev/solcraft/soltweaks/mixins/worldborder/supercoder/MixinPlayerEntity.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package dev.solcraft.soltweaks.mixins.worldborder.supercoder;
22

3+
import dev.solcraft.soltweaks.managers.ConfigManager;
34
import org.spongepowered.asm.mixin.Mixin;
45
import org.spongepowered.asm.mixin.injection.At;
56
import org.spongepowered.asm.mixin.injection.Redirect;
@@ -11,6 +12,6 @@
1112
public class MixinPlayerEntity {
1213
@Redirect(method = "tick", at = @At(target = "Lnet/minecraft/util/math/MathHelper;clamp(DDD)D", value = "INVOKE"))
1314
private double redirectClamp(double value, double min, double max) {
14-
return MathHelper.clamp(value, Integer.MIN_VALUE, Integer.MAX_VALUE);
15+
return MathHelper.clamp(value, -((int) Math.max(Integer.MIN_VALUE, Math.min(Integer.MAX_VALUE, Boolean.TRUE.equals(ConfigManager.getConfig().worldborderExpansion.getValue()) ? ConfigManager.getConfig().worldBorderMaxSize.getValue() : 6E7D / 2.0D))), (int) Math.max(Integer.MIN_VALUE, Math.min(Integer.MAX_VALUE, Boolean.TRUE.equals(ConfigManager.getConfig().worldborderExpansion.getValue()) ? ConfigManager.getConfig().worldBorderMaxSize.getValue() : 6E7D / 2.0D)));
1516
}
1617
}

src/main/java/dev/solcraft/soltweaks/mixins/worldborder/supercoder/MixinWorld.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package dev.solcraft.soltweaks.mixins.worldborder.supercoder;
22

3+
import dev.solcraft.soltweaks.managers.ConfigManager;
34
import net.minecraft.util.math.ChunkSectionPos;
45
import net.minecraft.world.Heightmap;
56
import net.minecraft.world.WorldAccess;
@@ -30,7 +31,7 @@ private static boolean isValidHorizontally(BlockPos pos) {
3031
*/
3132
@Overwrite @Final
3233
private static boolean isInvalidVertically(int y) {
33-
return y < Integer.MIN_VALUE || y >= Integer.MAX_VALUE;
34+
return y < -((int) Math.max(Integer.MIN_VALUE, Math.min(Integer.MAX_VALUE, Boolean.TRUE.equals(ConfigManager.getConfig().worldborderExpansion.getValue()) ? ConfigManager.getConfig().worldBorderMaxSize.getValue() : 6E7D / 2.0D))) || y >= (int) Math.max(Integer.MIN_VALUE, Math.min(Integer.MAX_VALUE, Boolean.TRUE.equals(ConfigManager.getConfig().worldborderExpansion.getValue()) ? ConfigManager.getConfig().worldBorderMaxSize.getValue() : 6E7D / 2.0D));
3435
}
3536

3637
/**
@@ -39,7 +40,7 @@ private static boolean isInvalidVertically(int y) {
3940
@Overwrite
4041
public int getTopY(Heightmap.Type heightmap, int x, int z) {
4142
int k;
42-
if (x >= Integer.MIN_VALUE && z >= Integer.MIN_VALUE && x < Integer.MAX_VALUE && z < Integer.MAX_VALUE) {
43+
if (x >= -((int) Math.max(Integer.MIN_VALUE, Math.min(Integer.MAX_VALUE, Boolean.TRUE.equals(ConfigManager.getConfig().worldborderExpansion.getValue()) ? ConfigManager.getConfig().worldBorderMaxSize.getValue() : 6E7D / 2.0D))) && z >= -((int) Math.max(Integer.MIN_VALUE, Math.min(Integer.MAX_VALUE, Boolean.TRUE.equals(ConfigManager.getConfig().worldborderExpansion.getValue()) ? ConfigManager.getConfig().worldBorderMaxSize.getValue() : 6E7D / 2.0D))) && x < (int) Math.max(Integer.MIN_VALUE, Math.min(Integer.MAX_VALUE, Boolean.TRUE.equals(ConfigManager.getConfig().worldborderExpansion.getValue()) ? ConfigManager.getConfig().worldBorderMaxSize.getValue() : 6E7D / 2.0D)) && z < (int) Math.max(Integer.MIN_VALUE, Math.min(Integer.MAX_VALUE, Boolean.TRUE.equals(ConfigManager.getConfig().worldborderExpansion.getValue()) ? ConfigManager.getConfig().worldBorderMaxSize.getValue() : 6E7D / 2.0D))) {
4344
if (this.isChunkLoaded(ChunkSectionPos.getSectionCoord(x), ChunkSectionPos.getSectionCoord(z))) {
4445
k = this.getChunk(ChunkSectionPos.getSectionCoord(x), ChunkSectionPos.getSectionCoord(z)).sampleHeightmap(heightmap, x & 15, z & 15) + 1;
4546
} else {

src/main/java/dev/solcraft/soltweaks/mixins/worldborder/supercoder/MixinWorldBorder.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package dev.solcraft.soltweaks.mixins.worldborder.supercoder;
22

3+
import dev.solcraft.soltweaks.managers.ConfigManager;
34
import org.spongepowered.asm.mixin.Mixin;
45
import org.spongepowered.asm.mixin.Shadow;
56
import org.spongepowered.asm.mixin.injection.At;
@@ -16,7 +17,7 @@ public class MixinWorldBorder {
1617

1718
@Inject(method = "<init>", at = @At("RETURN"))
1819
private void handleConstructor(CallbackInfo ci) {
19-
this.maxRadius = Integer.MAX_VALUE;
20-
this.area = ((WorldBorder)(Object)this).new StaticArea(4294967294D);
20+
this.maxRadius = (int) Math.max(Integer.MIN_VALUE, Math.min(Integer.MAX_VALUE, Boolean.TRUE.equals(ConfigManager.getConfig().worldborderExpansion.getValue()) ? ConfigManager.getConfig().worldBorderMaxSize.getValue() : 6E7D / 2.0D));
21+
this.area = ((WorldBorder)(Object)this).new StaticArea(Boolean.TRUE.equals(ConfigManager.getConfig().worldborderExpansion.getValue()) ? ConfigManager.getConfig().worldBorderSize.getValue() : 6E7D);
2122
}
2223
}

0 commit comments

Comments
 (0)