Skip to content

Commit

Permalink
Fix Trick: Debug not working in MPUs
Browse files Browse the repository at this point in the history
  • Loading branch information
gdavid04 committed Mar 7, 2024
1 parent 567197e commit c60d291
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/main/java/gdavid/phi/block/tile/MPUTile.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
import java.util.UUID;

import net.minecraft.network.PacketSendListener;
import net.minecraft.network.chat.ChatType;
import net.minecraft.network.chat.OutgoingPlayerChatMessage;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.player.Player;
Expand Down Expand Up @@ -305,7 +307,16 @@ public void fix() {
}

@Override
public void displayClientMessage(Component component, boolean actionBar) {
public void sendSystemMessage(Component component, boolean bypassHidden) {
sendMessage(component);
}

@Override
public void sendChatMessage(OutgoingPlayerChatMessage message, boolean filter, ChatType.Bound bound) {
sendMessage(message.serverContent());
}

private void sendMessage(Component component) {
message = component;
setChanged();
MPUTile.this.level.sendBlockUpdated(worldPosition, getFeetBlockState(), getFeetBlockState(), 18);
Expand Down

0 comments on commit c60d291

Please sign in to comment.