Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
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 @@ -109,6 +109,7 @@
| Basic | [MC-232869](https://bugs.mojang.com/browse/MC-232869) | Adult striders can spawn with saddles in peaceful mode |
| Basic | [MC-245394](https://bugs.mojang.com/browse/MC-245394) | The sounds of raid horns blaring aren't controlled by the correct sound slider |
| Basic | [MC-251068](https://bugs.mojang.com/browse/MC-251068) | If you delete your only world, then you are no longer automatically thrown into the menu of creating a new world |
| Basic | [MC-264979](https://bugs.mojang.com/browse/MC-264979) | Fresh installations print NoSuchFileException for server.properties |
| Basic | [MC-267125](https://bugs.mojang.com/browse/MC-267125) | Command suggestions for reloadable content are not affected by /reload |
| 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 |
| Basic | [MC-271899](https://bugs.mojang.com/browse/MC-271899) | StructureTemplate Palette's caches are not thread safe |
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package dev.isxander.debugify.mixins.basic.mc264979;

import com.llamalad7.mixinextras.injector.wrapmethod.WrapMethod;
import com.llamalad7.mixinextras.injector.wrapoperation.Operation;
import dev.isxander.debugify.fixes.BugFix;
import dev.isxander.debugify.fixes.FixCategory;
import net.minecraft.server.dedicated.Settings;
import org.spongepowered.asm.mixin.Mixin;

import java.nio.file.Files;
import java.nio.file.Path;
import java.util.Properties;

@BugFix(id = "MC-264979", category = FixCategory.BASIC, env = BugFix.Env.SERVER, description = "Fresh installations print NoSuchFileException for server.properties")
@Mixin(Settings.class)
public class SettingsMixin {
@WrapMethod(method = "loadFromFile")
private static Properties dontLoadMissingFile(Path path, Operation<Properties> original) {
if (!Files.exists(path)) {
return new Properties();
}
else return original.call(path);
}
}
1 change: 1 addition & 0 deletions src/main/resources/debugify.mixins.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
"basic.mc231743.FlowerPotBlockMixin",
"basic.mc232869.StriderMixin",
"basic.mc245394.RaidMixin",
"basic.mc264979.SettingsMixin",
"basic.mc267125.MinecraftServerMixin",
"basic.mc268617.FileUtilMixin",
"basic.mc271899.StructureTemplateMixin",
Expand Down