Skip to content

Commit 2042cf0

Browse files
authored
Merge pull request #104 from Tschipcraft/dev
v1.9.2
2 parents 0a2e20f + fff1c9a commit 2042cf0

11 files changed

Lines changed: 149 additions & 13 deletions

File tree

.github/workflows/cd.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ on:
1919
required: false
2020
default: false
2121
type: boolean
22+
separate_forge:
23+
description: 'If false, separate Modrinth Forge mod version will not be uploaded'
24+
required: false
25+
default: true
26+
type: boolean
2227

2328
jobs:
2429
deploy:
@@ -254,7 +259,7 @@ jobs:
254259
- name: Upload Forge mod version to Modrinth # Forge mod version is uploaded separately atm due to it not being compatible with Minecraft 1.21.6 or above
255260
id: upload_forge_modrinth_mod
256261
uses: Kir-Antipov/mc-publish@v3.3
257-
if: steps.check_mod_folder.outputs.files_exists == 'true' && github.event.inputs.dry_run == 'false'
262+
if: steps.check_mod_folder.outputs.files_exists == 'true' && github.event.inputs.dry_run == 'false' && github.event.inputs.separate_forge == 'true'
258263
with:
259264
modrinth-id: 7YjclEGc
260265
modrinth-token: ${{ secrets.MODRINTH_TOKEN }}

CHANGES.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
- **Added support for Minecraft 1.21.11** 🐎
2-
- Updated rain detection to use our own `#is_dry` biome tag combo instead of the now removed `#snow_golem_melts` tag
3-
- Removed broken hide feedback code for 1.21+
1+
- **Added support for Minecraft 26.1x** 🐤
2+
- Added router to handle [unobfuscated code](https://www.minecraft.net/en-us/article/removing-obfuscation-in-java-edition)
43
- Bumped pack format and protocol version
5-
- Reduced non-player entity cap from 1000 to 750 ([#91](https://github.com/Tschipcraft/dynamiclights/issues/91))

data/dynamiclights/function/internal/version_checker/start.mcfunction

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
scoreboard objectives add ts.dl.version dummy
44
execute store result score $global ts.dl.version run data get entity @r DataVersion
5-
execute unless score $global tvc_ignore matches 1 if score $global ts.dl.version matches 4700.. run tellraw @a [{"text":"[Dynamic Lights] ","color":"gray"},{"text":"?","bold":true,"color":"gold"},{"text":" Future unknown Minecraft version above 1.21.11 detected! This data pack/mod may not work correctly anymore! Please make sure to check for updates in the menu! (","color":"gold"},{"text":"/trigger tschipcraft.menu","underlined":true,"color":"gold","click_event":{"action":"run_command","command":"trigger tschipcraft.menu"},"hover_event":{"action":"show_text","value":"Click here","text":"Click here"}},{"text":")","color":"gold"}]
5+
execute unless score $global tvc_ignore matches 1 if score $global ts.dl.version matches 4800.. run tellraw @a [{"text":"[Dynamic Lights] ","color":"gray"},{"text":"?","bold":true,"color":"gold"},{"text":" Future unknown Minecraft version above 26.1 detected! This data pack/mod may not work correctly anymore! Please make sure to check for updates in the menu! (","color":"gold"},{"text":"/trigger tschipcraft.menu","underlined":true,"color":"gold","click_event":{"action":"run_command","command":"trigger tschipcraft.menu"},"hover_event":{"action":"show_text","value":"Click here","text":"Click here"}},{"text":")","color":"gold"}]
66
# Note: 1.17x-1.20x uses the old folder names (function -> functions)
77

88
# Announce escape sequence handling changes

fabric.mod.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
},
2323
"depends": {
2424
"minecraft": "${mc_version_range_fabric}",
25-
"fabric": ">=0.34.0",
2625
"java": ">=8"
2726
},
2827
"recommends": {
303 Bytes
Binary file not shown.
35 Bytes
Binary file not shown.
7.03 KB
Binary file not shown.

pack.mcmeta

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
"id": "dynamiclights",
33
"pack": {
44
"pack_format": 15,
5-
"supported_formats": [7,94],
5+
"supported_formats": [7,101],
66
"min_format": 7,
7-
"max_format": 94,
7+
"max_format": 101,
88
"description": "Tschipcraft's Dynamic Lights \n└ v${version} ● mc${mc_human_version_range}"
99
},
1010
"overlays": {

src/main/java/net/tschipcraft/dynamiclights/fabric/Init.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,13 @@ public void onInitialize() {
3131
if (FabricLoader.getInstance().isModLoaded("midnightlib")) {
3232
// Use MidnightLib features
3333
LOGGER.info("[Dynamic Lights] Sending global config to world ...");
34-
sendConfig.sendConfig(server);
34+
try {
35+
// Check for obfuscated class name to determine if we're running a pre 26.1 version
36+
Class.forName("net.minecraft.class_2168");
37+
sendConfigObf.sendConfig(server);
38+
} catch (ClassNotFoundException e) {
39+
sendConfig.sendConfig(server);
40+
}
3541
}
3642
});
3743
}

src/main/java/net/tschipcraft/dynamiclights/fabric/sendConfig.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package net.tschipcraft.dynamiclights.fabric;
22

33
import com.mojang.brigadier.exceptions.CommandSyntaxException;
4+
import net.minecraft.commands.CommandSourceStack;
45
import net.minecraft.server.MinecraftServer;
5-
import net.minecraft.server.command.ServerCommandSource;
66

77
public class sendConfig {
88

@@ -118,9 +118,9 @@ public static void sendConfig(MinecraftServer server) {
118118
}
119119

120120
public static void sendCommand(String command, MinecraftServer server) {
121-
ServerCommandSource commandSource = server.getCommandSource();
121+
CommandSourceStack commandSource = server.createCommandSourceStack();
122122
try {
123-
server.getCommandManager().getDispatcher().execute(command, commandSource);
123+
server.getCommands().getDispatcher().execute(command, commandSource);
124124
} catch (CommandSyntaxException ignored) {
125125
}
126126
}

0 commit comments

Comments
 (0)