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 @@ -75,6 +75,7 @@
| Basic | [MC-123450](https://bugs.mojang.com/browse/MC-123450) | Item frames play sounds when the item within them is read from NBT |
| 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-131562](https://bugs.mojang.com/browse/MC-131562) | Pressing the "Done" button in empty command block minecarts prints the message "Command set:" in chat |
| Basic | [MC-132878](https://bugs.mojang.com/browse/MC-132878) | Armor stands destroyed by explosions/lava/fire don't produce particles |
| 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 |
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package dev.isxander.debugify.mixins.basic.mc131562;

import com.llamalad7.mixinextras.injector.v2.WrapWithCondition;
import dev.isxander.debugify.fixes.BugFix;
import dev.isxander.debugify.fixes.FixCategory;
import net.minecraft.network.chat.Component;
import net.minecraft.network.protocol.game.ServerboundSetCommandMinecartPacket;
import net.minecraft.server.level.ServerPlayer;
import net.minecraft.server.network.ServerGamePacketListenerImpl;
import net.minecraft.util.StringUtil;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;

@BugFix(id = "MC-131562", category = FixCategory.BASIC, env = BugFix.Env.SERVER, description = "Pressing the \"Done\" button in empty command block minecarts prints the message \"Command set:\" in chat")
@Mixin(ServerGamePacketListenerImpl.class)
public class ServerGamePacketListenerImplMixin {
@WrapWithCondition(method = "handleSetCommandMinecart", at = @At(value = "INVOKE", target = "Lnet/minecraft/server/level/ServerPlayer;sendSystemMessage(Lnet/minecraft/network/chat/Component;)V"))
private boolean checkEmptyCommand(ServerPlayer instance, Component message, ServerboundSetCommandMinecartPacket packet) {
return !StringUtil.isNullOrEmpty(packet.getCommand());
}
}
1 change: 1 addition & 0 deletions src/main/resources/debugify.mixins.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"basic.mc123450.ItemFrameMixin",
"basic.mc123605.MinecraftServerMixin",
"basic.mc129909.ServerPlayerMixin",
"basic.mc131562.ServerGamePacketListenerImplMixin",
"basic.mc132878.ArmorStandMixin",
"basic.mc134110.ChestBlockMixin",
"basic.mc136249.LivingEntityMixin",
Expand Down