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 @@ -76,6 +76,7 @@
| Basic | [MC-123605](https://bugs.mojang.com/browse/MC-123605) | Debug world still sets clear weather time instead of deactivating gamerule doWeatherCycle |
| Basic | [MC-129909](https://bugs.mojang.com/browse/MC-129909) | Players in spectator mode continue to consume foods and liquids shortly after switching game modes |
| Basic | [MC-132878](https://bugs.mojang.com/browse/MC-132878) | Armor stands destroyed by explosions/lava/fire don't produce particles |
| Basic | [MC-133218](https://bugs.mojang.com/browse/MC-133218) | Usable items continue to be used on the death screen after dying when the "keepInventory" gamerule is set to "true" |
| Basic | [MC-134110](https://bugs.mojang.com/browse/MC-134110) | Structure mirroring breaking apart double chests |
| Basic | [MC-136249](https://bugs.mojang.com/browse/MC-136249) | Wearing boots enchanted with depth strider decreases the strength of the riptide enchantment |
| Basic | [MC-139041](https://bugs.mojang.com/browse/MC-139041) | The sounds of fishing bobbers aren't controlled by the "Players" sound slider |
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package dev.isxander.debugify.mixins.basic.mc133218;

import com.mojang.authlib.GameProfile;
import dev.isxander.debugify.fixes.BugFix;
import dev.isxander.debugify.fixes.FixCategory;
import net.minecraft.server.level.ServerPlayer;
import net.minecraft.world.damagesource.DamageSource;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.level.Level;
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-133218", category = FixCategory.BASIC, env = BugFix.Env.SERVER, description = "Usable items continue to be used on the death screen after dying when the \"keepInventory\" gamerule is set to \"true\"")
@Mixin(ServerPlayer.class)
public abstract class ServerPlayerMixin extends Player {
public ServerPlayerMixin(Level level, GameProfile gameProfile) {
super(level, gameProfile);
}

@Inject(method = "die", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/scores/Scoreboard;forAllObjectives(Lnet/minecraft/world/scores/criteria/ObjectiveCriteria;Lnet/minecraft/world/scores/ScoreHolder;Ljava/util/function/Consumer;)V"))
private void stopUsingItemOnDeath(DamageSource damageSource, CallbackInfo ci) {
this.stopUsingItem();
}
}
1 change: 1 addition & 0 deletions src/main/resources/debugify.mixins.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"basic.mc123605.MinecraftServerMixin",
"basic.mc129909.ServerPlayerMixin",
"basic.mc132878.ArmorStandMixin",
"basic.mc133218.ServerPlayerMixin",
"basic.mc134110.ChestBlockMixin",
"basic.mc136249.LivingEntityMixin",
"basic.mc139041.FishingRodItemMixin",
Expand Down