Skip to content

Commit ede6e4a

Browse files
committed
1.19.3 update
1 parent 95e6159 commit ede6e4a

File tree

5 files changed

+13
-14
lines changed

5 files changed

+13
-14
lines changed

gradle.properties

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ org.gradle.jvmargs=-Xmx1G
33

44
# Fabric Properties
55
# check these on https://fabricmc.net/develop
6-
minecraft_version=1.19.2
7-
yarn_mappings=1.19.2+build.28
6+
minecraft_version=1.19.3
7+
yarn_mappings=1.19.3+build.5
88
loader_version=0.14.19
99

1010
# Mod Properties
@@ -13,4 +13,4 @@ org.gradle.jvmargs=-Xmx1G
1313
archives_base_name = survival-debug-mod
1414

1515
# Dependencies
16-
fabric_version=0.76.0+1.19.2
16+
fabric_version=0.76.1+1.19.3

src/main/java/net/just_s/sds/Config.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
package net.just_s.sds;
22

33
import net.minecraft.block.Block;
4-
import net.minecraft.tag.TagKey;
5-
import net.minecraft.util.registry.Registry;
4+
import net.minecraft.registry.tag.TagKey;
5+
import net.minecraft.registry.Registries;
66
import org.jetbrains.annotations.Nullable;
77

88
import net.fabricmc.loader.api.FabricLoader;
99

1010
import java.io.*;
11+
import java.nio.charset.StandardCharsets;
1112
import java.util.ArrayList;
1213
import java.util.HashMap;
1314
import java.util.List;
@@ -191,7 +192,7 @@ public static void save() {
191192
String prettyJsonString = gson.toJson(je);
192193

193194
try {
194-
FileWriter writer = new FileWriter(configFile);
195+
FileWriter writer = new FileWriter(configFile, StandardCharsets.UTF_8);
195196
writer.write(prettyJsonString);
196197
writer.close();
197198
SDSMod.LOGGER.error("Saved new config file.");
@@ -220,7 +221,7 @@ private static void populate(HashMap<String, List<String>> map, JSONArray source
220221

221222
public static boolean isBlockAllowed(Block block) {
222223
// 1) check if block has been mentioned in BLOCKS part
223-
String blockName = Registry.BLOCK.getId(block).toString();
224+
String blockName = Registries.BLOCK.getId(block).toString();
224225

225226
if (blocks_allowed.containsKey(blockName)) return true;
226227
if (blocks_forbidden.containsKey(blockName)) {
@@ -245,7 +246,7 @@ public static boolean isBlockAllowed(Block block) {
245246

246247
public static boolean isPropertyAllowed(String propertyName, @Nullable Block block) {
247248
if (block != null) {
248-
String blockName = Registry.BLOCK.getId(block).toString();
249+
String blockName = Registries.BLOCK.getId(block).toString();
249250
// 1) Check for exactly this block
250251
if (blocks_forbidden.containsKey(blockName)) {
251252
List<String> forbidden_props = blocks_forbidden.get(blockName);

src/main/java/net/just_s/sds/mixin/DebugStickMixin.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
import net.minecraft.text.Text;
1313
import net.minecraft.util.Util;
1414
import net.minecraft.util.math.BlockPos;
15-
import net.minecraft.util.registry.Registry;
15+
import net.minecraft.registry.Registries;
1616
import net.minecraft.world.WorldAccess;
1717
import org.jetbrains.annotations.Nullable;
1818
import org.spongepowered.asm.mixin.Mixin;
@@ -38,7 +38,7 @@ private static <T extends Comparable<T>> BlockState cycle(BlockState state, Prop
3838

3939
@Inject(at = @At("HEAD"), method = "use", cancellable = true)
4040
private void onUSE(PlayerEntity player, BlockState state, WorldAccess world, BlockPos pos, boolean update, ItemStack stack, CallbackInfoReturnable<Boolean> cir) {
41-
// if player is not in Survival or Hardcore mode, the mod should not interfere
41+
// if the player already does have the rights to use Debug Stick, the mod should not interfere
4242
if (player.isCreativeLevelTwoOp()) {return;}
4343

4444
Block block = state.getBlock();
@@ -58,7 +58,7 @@ private void onUSE(PlayerEntity player, BlockState state, WorldAccess world, Blo
5858
// Who am I to disagree?
5959
NbtCompound nbtCompound = stack.getOrCreateSubNbt("DebugProperty");
6060

61-
String blockName = Registry.BLOCK.getId(block).toString();
61+
String blockName = Registries.BLOCK.getId(block).toString();
6262
String propertyName = nbtCompound.getString(blockName);
6363

6464
Property<?> property = stateManager.getProperty(propertyName);

src/main/resources/fabric.mod.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"depends": {
3030
"fabricloader": ">=0.14.6",
3131
"fabric": "*",
32-
"minecraft": "~1.19",
32+
"minecraft": "1.19.3",
3333
"java": ">=17"
3434
},
3535
"suggests": {

src/main/resources/sds.mixins.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
"mixins": [
77
"DebugStickMixin"
88
],
9-
"client": [
10-
],
119
"injectors": {
1210
"defaultRequire": 1
1311
}

0 commit comments

Comments
 (0)