Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
1 change: 1 addition & 0 deletions PATCHED.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
| Basic | [MC-224729](https://bugs.mojang.com/browse/MC-224729) | Partially generated chunks are not saved in some situations |
| Basic | [MC-231743](https://bugs.mojang.com/browse/MC-231743) | minecraft.used:minecraft.POTTABLE_PLANT doesn't increase when placing plants into flower pots |
| Basic | [MC-232869](https://bugs.mojang.com/browse/MC-232869) | Adult striders can spawn with saddles in peaceful mode |
| Basic | [MC-268617](https://bugs.mojang.com/browse/MC-268617) | Structures can't be saved if the game directory is named in a certain way |

## Previously patched
Bugs that this mod has patched but has been superseded by a vanilla update.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package dev.isxander.debugify.mixins.basic.mc268617;

import com.llamalad7.mixinextras.injector.wrapoperation.Operation;
import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation;
import dev.isxander.debugify.fixes.BugFix;
import dev.isxander.debugify.fixes.FixCategory;
import net.minecraft.FileUtil;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;

import java.util.regex.Pattern;

@BugFix(id = "MC-268617", category = FixCategory.BASIC, env = BugFix.Env.SERVER, description = "Structures can't be saved if the game directory is named in a certain way")
@Mixin(FileUtil.class)
public class FileUtilMixin {
@WrapOperation(method = "<clinit>", at = @At(value = "INVOKE", target = "Ljava/util/regex/Pattern;compile(Ljava/lang/String;I)Ljava/util/regex/Pattern;", ordinal = 1))
private static Pattern fixWindowsReservedFilename(String regex, int flags, Operation<Pattern> original) {
return original.call(".*\\.|(?:CON|PRN|AUX|NUL|CLOCK\\$|CONIN\\$|CONOUT\\$|(?:COM|LPT)[¹²³0-9])(?:\\..*)?", flags);
}
}
1 change: 1 addition & 0 deletions src/main/resources/debugify.mixins.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"basic.mc224729.ChunkMapMixin",
"basic.mc231743.FlowerPotBlockMixin",
"basic.mc232869.StriderMixin",
"basic.mc268617.FileUtilMixin",
"basic.mc30391.LivingEntityMixin",
"basic.mc69216.ServerPlayerMixin",
"basic.mc7569.RconConsoleSourceMixin",
Expand Down