Skip to content

Commit ffc9914

Browse files
fix MC-268617
1 parent e4c2c56 commit ffc9914

3 files changed

Lines changed: 22 additions & 0 deletions

File tree

PATCHED.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@
6262
| Basic | [MC-224729](https://bugs.mojang.com/browse/MC-224729) | Partially generated chunks are not saved in some situations |
6363
| Basic | [MC-231743](https://bugs.mojang.com/browse/MC-231743) | minecraft.used:minecraft.POTTABLE_PLANT doesn't increase when placing plants into flower pots |
6464
| Basic | [MC-232869](https://bugs.mojang.com/browse/MC-232869) | Adult striders can spawn with saddles in peaceful mode |
65+
| 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 |
6566

6667
## Previously patched
6768
Bugs that this mod has patched but has been superseded by a vanilla update.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
package dev.isxander.debugify.mixins.basic.mc268617;
2+
3+
import com.llamalad7.mixinextras.injector.wrapoperation.Operation;
4+
import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation;
5+
import dev.isxander.debugify.fixes.BugFix;
6+
import dev.isxander.debugify.fixes.FixCategory;
7+
import net.minecraft.FileUtil;
8+
import org.spongepowered.asm.mixin.Mixin;
9+
import org.spongepowered.asm.mixin.injection.At;
10+
11+
import java.util.regex.Pattern;
12+
13+
@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")
14+
@Mixin(FileUtil.class)
15+
public class FileUtilMixin {
16+
@WrapOperation(method = "<clinit>", at = @At(value = "INVOKE", target = "Ljava/util/regex/Pattern;compile(Ljava/lang/String;I)Ljava/util/regex/Pattern;", ordinal = 1))
17+
private static Pattern fixWindowsReservedFilename(String regex, int flags, Operation<Pattern> original) {
18+
return original.call(".*\\.|(?:CON|PRN|AUX|NUL|CLOCK\\$|CONIN\\$|CONOUT\\$|(?:COM|LPT)[¹²³0-9])(?:\\..*)?", flags);
19+
}
20+
}

src/main/resources/debugify.mixins.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
"basic.mc224729.ChunkMapMixin",
3131
"basic.mc231743.FlowerPotBlockMixin",
3232
"basic.mc232869.StriderMixin",
33+
"basic.mc268617.FileUtilMixin",
3334
"basic.mc30391.LivingEntityMixin",
3435
"basic.mc69216.ServerPlayerMixin",
3536
"basic.mc7569.RconConsoleSourceMixin",

0 commit comments

Comments
 (0)