Skip to content
Open
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 @@ -110,6 +110,7 @@
| 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-267125](https://bugs.mojang.com/browse/MC-267125) | Command suggestions for reloadable content are not affected by /reload |
| Basic | [MC-263999](https://bugs.mojang.com/browse/MC-263999) | Zombies breaking doors do not show break particles |
| 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 |
| Basic | [MC-272431](https://bugs.mojang.com/browse/MC-272431) | Ender Dragon incorrect vertical velocity causes erratic behavior |
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
package dev.isxander.debugify.mixins.basic.mc263999;

import com.llamalad7.mixinextras.injector.ModifyExpressionValue;
import com.llamalad7.mixinextras.sugar.Share;
import com.llamalad7.mixinextras.sugar.ref.LocalRef;
import dev.isxander.debugify.fixes.BugFix;
import dev.isxander.debugify.fixes.FixCategory;
import net.minecraft.world.entity.Mob;
import net.minecraft.world.entity.ai.goal.BreakDoorGoal;
import net.minecraft.world.entity.ai.goal.DoorInteractGoal;
import net.minecraft.world.level.block.state.BlockState;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;

@BugFix(id = "MC-263999", category = FixCategory.BASIC, env = BugFix.Env.SERVER, description = "Zombies breaking doors do not show break particles")
@Mixin(BreakDoorGoal.class)
public class BreakDoorGoalMixin extends DoorInteractGoal {
public BreakDoorGoalMixin(Mob mob) {
super(mob);
}

/**
* Minecraft removes the door block before finding the door's position.
* Instead, we make a copy of the block state prior to removing the door block to supply the block state check
*/
@Inject(method = "tick", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/level/Level;removeBlock(Lnet/minecraft/core/BlockPos;Z)Z"))
private void getOldBlockState(CallbackInfo ci, @Share("doorBlockState") LocalRef<BlockState> blockStateRef) {
blockStateRef.set(this.mob.level().getBlockState(this.doorPos));
}

@ModifyExpressionValue(method = "tick", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/level/Level;getBlockState(Lnet/minecraft/core/BlockPos;)Lnet/minecraft/world/level/block/state/BlockState;"))
private BlockState setBlockState(BlockState original, @Share("doorBlockState") LocalRef<BlockState> blockStateRef) {
return blockStateRef.get();
}
}
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.mc263999.BreakDoorGoalMixin",
"basic.mc267125.MinecraftServerMixin",
"basic.mc268617.FileUtilMixin",
"basic.mc271899.StructureTemplateMixin",
Expand Down