diff --git a/PATCHED.md b/PATCHED.md index 9023064e..6dd0abab 100644 --- a/PATCHED.md +++ b/PATCHED.md @@ -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-264285](https://bugs.mojang.com/browse/MC-264285) | Unbreakable flint and steels are completely consumed when igniting a creeper | | 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 | diff --git a/src/main/java/dev/isxander/debugify/mixins/basic/mc264285/CreeperMixin.java b/src/main/java/dev/isxander/debugify/mixins/basic/mc264285/CreeperMixin.java new file mode 100644 index 00000000..fcefd984 --- /dev/null +++ b/src/main/java/dev/isxander/debugify/mixins/basic/mc264285/CreeperMixin.java @@ -0,0 +1,19 @@ +package dev.isxander.debugify.mixins.basic.mc264285; + +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.world.entity.monster.Creeper; +import net.minecraft.world.item.ItemStack; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.injection.At; + +@BugFix(id = "MC-264285", category = FixCategory.BASIC, env = BugFix.Env.SERVER, description = "Unbreakable flint and steels are completely consumed when igniting a creeper") +@Mixin(Creeper.class) +public class CreeperMixin { + @WrapOperation(method = "mobInteract", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/item/ItemStack;isDamageableItem()Z")) + private boolean fixUnbreakableItems(ItemStack instance, Operation original) { + return instance.getMaxDamage() != 0; + } +} diff --git a/src/main/resources/debugify.mixins.json b/src/main/resources/debugify.mixins.json index cf77856d..bbb9c1c1 100644 --- a/src/main/resources/debugify.mixins.json +++ b/src/main/resources/debugify.mixins.json @@ -54,6 +54,7 @@ "basic.mc231743.FlowerPotBlockMixin", "basic.mc232869.StriderMixin", "basic.mc245394.RaidMixin", + "basic.mc264285.CreeperMixin", "basic.mc267125.MinecraftServerMixin", "basic.mc268617.FileUtilMixin", "basic.mc271899.StructureTemplateMixin",