diff --git a/PATCHED.md b/PATCHED.md index 683f52ca..85e83bb3 100644 --- a/PATCHED.md +++ b/PATCHED.md @@ -86,6 +86,7 @@ | Basic | [MC-227337](https://bugs.mojang.com/browse/MC-227337) | When a shulker bullet hits an entity, the explodes sound is not played and particles are not produced | | 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-271899](https://bugs.mojang.com/browse/MC-271899) | StructureTemplate Palette's caches are not thread safe | | 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-268617](https://bugs.mojang.com/browse/MC-268617) | Structures can't be saved if the game directory is named in a certain way | diff --git a/src/main/java/dev/isxander/debugify/mixins/basic/mc271899/StructureTemplateMixin.java b/src/main/java/dev/isxander/debugify/mixins/basic/mc271899/StructureTemplateMixin.java new file mode 100644 index 00000000..365ae429 --- /dev/null +++ b/src/main/java/dev/isxander/debugify/mixins/basic/mc271899/StructureTemplateMixin.java @@ -0,0 +1,23 @@ +package dev.isxander.debugify.mixins.basic.mc271899; + +import com.google.common.collect.Maps; +import dev.isxander.debugify.fixes.BugFix; +import dev.isxander.debugify.fixes.FixCategory; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplate; +import org.spongepowered.asm.mixin.Final; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.Mutable; +import org.spongepowered.asm.mixin.Shadow; + +import java.util.List; +import java.util.Map; + +@BugFix(id = "MC-271899", category = FixCategory.BASIC, env = BugFix.Env.SERVER, description = "StructureTemplate Palette's caches are not thread safe") +@Mixin(StructureTemplate.Palette.class) +public class StructureTemplateMixin { + @Mutable + @Shadow + @Final + private Map> cache = Maps.newConcurrentMap(); +} diff --git a/src/main/resources/debugify.mixins.json b/src/main/resources/debugify.mixins.json index 3ad5ae4f..ee7bf700 100644 --- a/src/main/resources/debugify.mixins.json +++ b/src/main/resources/debugify.mixins.json @@ -39,6 +39,7 @@ "basic.mc227337.ShulkerBulletMixin", "basic.mc231743.FlowerPotBlockMixin", "basic.mc232869.StriderMixin", + "basic.mc271899.StructureTemplateMixin", "basic.mc245394.RaidMixin", "basic.mc268617.FileUtilMixin", "basic.mc30391.LivingEntityMixin",