Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
00282c1
fix incorrect key
JXSnack Feb 19, 2025
fb59883
gotta commit it
Lemonnik6484 Dec 14, 2025
99a967a
Fix shields and spears
tangoethan Jan 20, 2026
43ed99f
wtf was that
Lemonnik6484 Mar 21, 2026
fd7f0e9
update stonecutter
Lemonnik6484 Mar 21, 2026
e81cba5
update fabric & loom
Lemonnik6484 Mar 21, 2026
a2cbaf1
update wrapper
Lemonnik6484 Mar 21, 2026
b76100d
update stonecutter.gradle
Lemonnik6484 Mar 21, 2026
86644c6
split build scripts & 26.1 properties
Lemonnik6484 Mar 21, 2026
b5e500f
no stonecutter warning
Lemonnik6484 Mar 22, 2026
31c7078
26.1 versioning
Lemonnik6484 Mar 22, 2026
a2cb709
no accesswidener
Lemonnik6484 Mar 22, 2026
397d8a1
PortalManagerMixin placeholder
Lemonnik6484 Mar 22, 2026
2409f34
update metadata
Lemonnik6484 Mar 22, 2026
272b506
remove all accesswidener related stuff
Lemonnik6484 Mar 22, 2026
1e564ff
fix modmenu import
Lemonnik6484 Mar 22, 2026
2a93934
fix metadata version
Lemonnik6484 Mar 22, 2026
2ae5648
update properties for 26.1
Lemonnik6484 Mar 24, 2026
6f78118
fabric loader 0.18.5
Lemonnik6484 Mar 25, 2026
c0f8128
update dependencies
Lemonnik6484 Mar 25, 2026
1fe831c
26.1 -> 26.1.1
Lemonnik6484 Apr 5, 2026
ce9d7ac
fix 1.21.9 (?)
Lemonnik6484 Apr 5, 2026
e1c8e0d
fix 1.21.11 (??)
Lemonnik6484 Apr 5, 2026
50a2689
oops fix 26.1+ too
Lemonnik6484 Apr 5, 2026
8c89e54
Merge pull request #63 from tangoethan/main
Lemonnik6484 Apr 6, 2026
6f4ec84
Merge remote-tracking branch 'snackbag/main' into update/26.1-support
Lemonnik6484 Apr 6, 2026
0addf55
Merge pull request #68 from snackbag/update/26.1-support
Lemonnik6484 Apr 6, 2026
109e1d8
Merge remote-tracking branch 'origin/fix/server-watchdog-no-effect-24'
Lemonnik6484 Apr 6, 2026
6f263f8
refactor exporter and more
Lemonnik6484 Apr 6, 2026
ab2786e
Merge remote-tracking branch 'origin/main' into config-refactor
Lemonnik6484 Apr 6, 2026
a896b93
move packages, remove old config, fix logging
Lemonnik6484 Apr 30, 2026
280a2d1
Merge branch 'main' into config-refactor
Lemonnik6484 Apr 30, 2026
9965c9d
Merge branch 'main' into config-refactor
Lemonnik6484 May 29, 2026
e67546d
Merge branch 'main' into config-refactor
Lemonnik6484 May 31, 2026
149c094
sync config
Lemonnik6484 May 31, 2026
5712d53
scrap exporter
Lemonnik6484 May 31, 2026
e94db8b
remove leftovers
Lemonnik6484 Jun 6, 2026
b043ddb
lemon maven
Lemonnik6484 Jun 6, 2026
6ec4c09
BOOOOOM
Lemonnik6484 Jun 6, 2026
0fef310
oh and fix mixins
Lemonnik6484 Jun 6, 2026
fb39f3d
new maven url
Lemonnik6484 Jun 12, 2026
e17b2fc
bump fern to 1.2.0
Lemonnik6484 Jun 15, 2026
2123a08
fern 26.1.2 -> 26.1.1
Lemonnik6484 Jun 15, 2026
71b21c4
adapt to fern 1.2.0
Lemonnik6484 Jun 15, 2026
7a3f870
fern 1.2.0 -> 1.3.0
Lemonnik6484 Jun 18, 2026
418cfcf
update to fern 1.3.0
Lemonnik6484 Jun 18, 2026
4098633
change VCS version to 26.1.1
Lemonnik6484 Jun 16, 2026
855b0fa
Merge remote-tracking branch 'origin/main' into config-refactor
Lemonnik6484 Jun 18, 2026
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
17 changes: 14 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ repositories {
maven {
url 'https://maven.neoforged.net/releases'
}
maven {
/*maven {
name = 'papermc'
url = 'https://repo.papermc.io/repository/maven-public/'
}
}*/
maven {
url "https://libraries.minecraft.net"
}
Expand All @@ -44,6 +44,11 @@ repositories {
name = "Terraformers"
url = "https://maven.terraformersmc.com/"
}
maven {
name "lemonnik's maven"
url "https://maven.lemonnik.dev/releases/"
}

}

def use_architectury_loom = project.platform in ['fabric', 'quilt', 'forge', 'neoforge']
Expand Down Expand Up @@ -183,6 +188,12 @@ dependencies {
paperweight.paperDevBundle("${project.minecraft_version}-R0.1-SNAPSHOT")
}

if (mcVersion < 260100) {
modImplementation "dev.lemonnik:fern_config:${project.fern_version}"
} else {
implementation "dev.lemonnik:fern_config:${project.fern_version}"
}

implementation "net.snackbag.shit:shit:${project.shit_version}"
}

Expand All @@ -191,7 +202,7 @@ if (use_architectury_loom) {
runConfigs.configureEach {
// to make sure it generates all "Minecraft Client (:subproject_name)" applications
ideConfigGenerated = true
vmArgs ['']
vmArgs []
}

if (project.platform == 'forge') {
Expand Down
9 changes: 9 additions & 0 deletions fern-updater.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

OLD_PREFIX="1.2.0"
NEW_PREFIX="1.3.0"

find versions -type f -name "gradle.properties" | while read -r file; do
sed -i "s/\(fern_version=\)${OLD_PREFIX}/\1${NEW_PREFIX}/" "$file"
echo "Updated $file"
done
3 changes: 2 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ dev.kikugie.stonecutter.hard_mode=true
# Mod Properties
mod_id=tt20
mod_name=TT20
mod_version=0.8.3
mod_version=1.8.3
maven_group=net.snackbag

mod_description=TT20 helps reduce lag by optimizing how ticks work when the server's TPS is low.
Expand All @@ -24,6 +24,7 @@ shit_version=1.2.3
# Versioned Dependencies
minecraft_version=[VERSIONED]
platform=[VERSIONED]
fern_version=[VERSIONED]

# Mods
minecraft_dependency=[VERSIONED]
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/net/snackbag/tt20/ModUpdater.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ public class ModUpdater {
}

public static void check() {
if (!TT20.config.automaticUpdater()) {
TT20.LOGGER.info("(TT20) Not checking for updates, because the updater is disabled. Current patch: " + TT20.PATCH);
if (!TT20.config.enabled.get() || !TT20.config.updateChecker.get()) {
TT20.LOGGER.info("(TT20) Not checking for updates, because the updater or mod is disabled. Current patch: " + TT20.PATCH);
return;
}

Expand Down
9 changes: 4 additions & 5 deletions src/main/java/net/snackbag/tt20/TT20.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@
//? 1.18.2
//import net.minecraft.network.chat.TextComponent;

import net.snackbag.tt20.config.BlockEntityMaskConfig;
import net.snackbag.tt20.config.MainConfig;
import net.snackbag.tt20.util.TPSCalculator;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand All @@ -50,11 +48,10 @@ public class TT20
public static final Logger LOGGER = LoggerFactory.getLogger(MOD_ID);
public static final TPSCalculator TPS_CALCULATOR = new TPSCalculator();

public static final String VERSION = /*$ mod_version */"0.8.3";
public static final String VERSION = /*$ mod_version */"1.8.3";
public static final int PATCH = 3;

public static final MainConfig config = new MainConfig();
public static final BlockEntityMaskConfig blockEntityMaskConfig = new BlockEntityMaskConfig();
public static final TT20Config config = new TT20Config();

//? if fabric
@Override public void onInitialize()
Expand All @@ -71,6 +68,8 @@ public class TT20
{
LOGGER.info("Starting TT20...");

config.reload();

CompletableFuture.runAsync(() -> {
try {
ModUpdater.check();
Expand Down
44 changes: 21 additions & 23 deletions src/main/java/net/snackbag/tt20/TT20Command.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,36 +30,34 @@ public static void register(CommandDispatcher<CommandSourceStack> dispatcher) {
}

private static int executeStatus(CommandContext<CommandSourceStack> context) {
sendMessage(context, literal("§7TT20 enabled: " + (TT20.config.enabled() ? "§aON" : "§cOFF")));
sendMessage(context, literal("§7Block entity acceleration: " + (TT20.config.blockEntityAcceleration() ? "§aON" : "§cOFF")));
sendMessage(context, literal("§7Block breaking acceleration: " + (TT20.config.blockBreakingAcceleration() ? "§aON" : "§cOFF")));
sendMessage(context, literal("§7Potion effect acceleration: " + (TT20.config.potionEffectAcceleration() ? "§aON" : "§cOFF")));
sendMessage(context, literal("§7Fluid acceleration: " + (TT20.config.fluidAcceleration() ? "§aON" : "§cOFF")));
sendMessage(context, literal("§7Pickup acceleration: " + (TT20.config.pickupAcceleration() ? "§aON" : "§cOFF")));
sendMessage(context, literal("§7Eating acceleration: " + (TT20.config.eatingAcceleration() ? "§aON" : "§cOFF")));
sendMessage(context, literal("§7Portal acceleration: " + (TT20.config.portalAcceleration() ? "§aON" : "§cOFF")));
sendMessage(context, literal("§7Sleeping acceleration: " + (TT20.config.sleepingAcceleration() ? "§aON" : "§cOFF")));
sendMessage(context, literal("§7Time acceleration: " + (TT20.config.timeAcceleration() ? "§aON" : "§cOFF")));
sendMessage(context, literal("§7Bow pull acceleration: " + (TT20.config.bowAcceleration() ? "§aON" : "§cOFF")));
sendMessage(context, literal("§7Crossbow pull acceleration: " + (TT20.config.crossbowAcceleration() ? "§aON" : "§cOFF")));
sendMessage(context, literal("§7TNT acceleration: " + (TT20.config.tntAcceleration() ? "§aON" : "§cOFF")));
sendMessage(context, literal("§7Vanilla Lagback: " + (TT20.config.vanillaLagback() ? "§aON" : "§cOFF")));
sendMessage(context, literal("§7Random tickspeed acceleration: " + (TT20.config.randomTickSpeedAcceleration() ? "§aON" : "§cOFF")));
sendMessage(context, literal("§7Server watchdog: " + (TT20.config.serverWatchdog() ? "§aON" : "§cOFF")));
sendMessage(context, literal("§7TT20 enabled: " + (TT20.config.enabled.get() ? "§aON" : "§cOFF")));
sendMessage(context, literal("§7Block entity acceleration: " + (TT20.config.blockEntity.get() ? "§aON" : "§cOFF")));
sendMessage(context, literal("§7Block breaking acceleration: " + (TT20.config.blockBreaking.get() ? "§aON" : "§cOFF")));
sendMessage(context, literal("§7Potion effect acceleration: " + (TT20.config.potionEffect.get() ? "§aON" : "§cOFF")));
sendMessage(context, literal("§7Fluid acceleration: " + (TT20.config.fluid.get() ? "§aON" : "§cOFF")));
sendMessage(context, literal("§7Pickup acceleration: " + (TT20.config.pickup.get() ? "§aON" : "§cOFF")));
sendMessage(context, literal("§7Eating acceleration: " + (TT20.config.eating.get() ? "§aON" : "§cOFF")));
sendMessage(context, literal("§7Portal acceleration: " + (TT20.config.portal.get() ? "§aON" : "§cOFF")));
sendMessage(context, literal("§7Sleeping acceleration: " + (TT20.config.sleeping.get() ? "§aON" : "§cOFF")));
sendMessage(context, literal("§7Time acceleration: " + (TT20.config.time.get() ? "§aON" : "§cOFF")));
sendMessage(context, literal("§7Bow pull acceleration: " + (TT20.config.bow.get() ? "§aON" : "§cOFF")));
sendMessage(context, literal("§7Crossbow pull acceleration: " + (TT20.config.crossbow.get() ? "§aON" : "§cOFF")));
sendMessage(context, literal("§7TNT acceleration: " + (TT20.config.tnt.get() ? "§aON" : "§cOFF")));
sendMessage(context, literal("§7Vanilla Lagback: " + (TT20.config.lagback.get() ? "§aON" : "§cOFF")));
sendMessage(context, literal("§7Random tickspeed acceleration: " + (TT20.config.randomTickSpeed.get() ? "§aON" : "§cOFF")));
sendMessage(context, literal("§7Server watchdog: " + (TT20.config.watchdog.get() ? "§aON" : "§cOFF")));
executeTps(context, false);
sendMessage(context, literal("\n§8Version: §7" + TT20.VERSION));
sendMessage(context, literal("§8MSPT: §7" + TT20.TPS_CALCULATOR.getMSPT()));
sendMessage(context, literal("§8Missed ticks: §7" + TPSUtil.formatMissedTicks(TT20.TPS_CALCULATOR.getAllMissedTicks())));
sendMessage(context, literal("§8Automatic updater: §7" + (TT20.config.automaticUpdater() ? "§aenabled" : "§cdisabled")));
sendMessage(context, literal("§8Updater checker: §7" + (TT20.config.updateChecker.get() ? "§aenabled" : "§cdisabled")));

return 1;
}

private static int executeReload(CommandContext<CommandSourceStack> context) {
TT20.config.reload();
sendMessage(context, literal("Reloaded config"));
TT20.blockEntityMaskConfig.reload();
sendMessage(context, literal("Reloaded block entity mask config"));

return 1;
}
Expand All @@ -81,19 +79,19 @@ private static int executeTps(CommandContext<CommandSourceStack> context, boolea
}

private static int executeToggle(CommandContext<CommandSourceStack> context) {
TT20.config.enabled(!TT20.config.enabled());
TT20.config.enabled.set(!TT20.config.enabled.get());
TT20.config.save();

String enabledText = TT20.config.enabled() ? "enabled" : "disabled";
String enabledText = TT20.config.enabled.get() ? "enabled" : "disabled";
sendMessage(context, literal("TT20 is now " + enabledText));

return 1;
}


private static int executeMain(CommandContext<CommandSourceStack> context) {
sendMessage(context, literal("Running TT20 version " + TT20.VERSION));
sendMessage(context, literal("Enabled: " + TT20.config.enabled()));
sendMessage(context, literal("Running TT20 version " + TT20.VERSION + " (PATCH: " + TT20.PATCH + ")"));
sendMessage(context, literal("Enabled: " + TT20.config.enabled.get()));

return 1;
}
Expand Down
66 changes: 66 additions & 0 deletions src/main/java/net/snackbag/tt20/TT20Config.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
package net.snackbag.tt20;

import dev.lemonnik.fern_config.CConfig;
import dev.lemonnik.fern_config.CExporter;
import dev.lemonnik.fern_config.types.CBoolean;
import dev.lemonnik.fern_config.types.CEnum;
import dev.lemonnik.fern_config.types.CMask;
import dev.lemonnik.fern_config.utils.CCategory;
import dev.lemonnik.fern_config.utils.MaskType;

//? if >1.19.2 {
import net.minecraft.core.registries.BuiltInRegistries;
//?} else {
/*import net.minecraft.core.Registry;
*///?}

import org.jetbrains.annotations.NotNull;

@SuppressWarnings("deprecation")
public class TT20Config extends CConfig {
@Override
public @NotNull String getFileName() {
return TT20.MOD_ID;
}

@Override
protected @NotNull CExporter.Format getFormat() {
return CExporter.Format.JSON5;
}

private static final CCategory MAIN = CCategory.of("main", "Main TT20 configuration");

public final CBoolean enabled = register(MAIN, new CBoolean("enabled", "Controls if TT20 is accelerating anything", true));
public final CBoolean blockEntity = register(MAIN, new CBoolean("blockEntity", "ex. furnace work speed, this requires Block Entity Mask to be set up! (causes more lag otherwise)",false));
public final CBoolean blockBreaking = register(MAIN, new CBoolean("blockBreaking", "block breaking acceleration", true));
public final CBoolean eating = register(MAIN, new CBoolean("eating", "food consumption acceleration", true));
public final CBoolean potionEffect = register(MAIN, new CBoolean("potionEffect", "effect duration acceleration", true));
public final CBoolean fluid = register(MAIN, new CBoolean("fluid", "fluid flow acceleration", true));
public final CBoolean pickup = register(MAIN, new CBoolean("pickup", "item pickup acceleration", true));
public final CBoolean portal = register(MAIN, new CBoolean("portal", "time in portal acceleration", true));
public final CBoolean sleeping = register(MAIN, new CBoolean("sleeping", "time laying in bed acceleration", true));
public final CBoolean time = register(MAIN, new CBoolean("time", "daytime acceleration", true));
public final CBoolean bow = register(MAIN, new CBoolean("bow", "bow charge acceleration", true));
public final CBoolean crossbow = register(MAIN, new CBoolean("crossbow", "crossbow charge acceleration", true));
public final CBoolean randomTickSpeed = register(MAIN, new CBoolean("randomTickSpeed", "random tick speed acceleration (ex. crop growth)", true));
public final CBoolean tnt = register(MAIN, new CBoolean("tnt", "tnt timer acceleration", false));
public final CBoolean lagback = register(MAIN, new CBoolean("lagback", "vanilla player lagback", true));
public final CBoolean watchdog = register(MAIN, new CBoolean("watchdog", "server watchdog (vanilla's stop server after 1 minute of freeze behaviour)", true));

public final CBoolean updateChecker = register(MAIN, new CBoolean("updateChecker", "automatic update checker", true));

public final CMask blockEntityMask = register(MAIN, new CMask("blocks", "Block Entity Mask configuration, only change this if you know what you're doing!",
//? if >1.19.2 {
BuiltInRegistries.BLOCK,
//?} else {
/*Registry.BLOCK,
*///?}
new CEnum<>(
"type",
"mask type",
MaskType.class,
MaskType.WHITELIST
),
"*:*")
);
}
45 changes: 0 additions & 45 deletions src/main/java/net/snackbag/tt20/config/BlockEntityMaskConfig.java

This file was deleted.

Loading