Add option for showing chat messages
This commit is contained in:
@@ -84,6 +84,8 @@ public class GuiReplaySettings extends GuiScreen {
|
||||
} else if(o == ReplayOptions.keyframeCleanCallback) {
|
||||
GuiToggleButton keyframeClearCallbackButton = new GuiSettingsOnOffButton(REPLAY_SETTINGS_CLEARCALLBACK_ID, xPos, yPos, 150, 20, o);
|
||||
buttonList.add(keyframeClearCallbackButton);
|
||||
} else if(o == ReplayOptions.showChat) {
|
||||
buttonList.add(new GuiSettingsOnOffButton(0, xPos, yPos, 150, 20, o));
|
||||
}
|
||||
|
||||
++i;
|
||||
|
||||
@@ -6,6 +6,7 @@ import com.google.common.util.concurrent.ListenableFutureTask;
|
||||
import eu.crushedpixel.replaymod.ReplayMod;
|
||||
import eu.crushedpixel.replaymod.entities.CameraEntity;
|
||||
import eu.crushedpixel.replaymod.holders.PacketData;
|
||||
import eu.crushedpixel.replaymod.settings.ReplaySettings;
|
||||
import eu.crushedpixel.replaymod.utils.ReplayFile;
|
||||
import eu.crushedpixel.replaymod.utils.ReplayFileIO;
|
||||
import io.netty.channel.ChannelHandler.Sharable;
|
||||
@@ -61,7 +62,6 @@ public class ReplaySender extends ChannelInboundHandlerAdapter {
|
||||
S1FPacketSetExperience.class,
|
||||
S43PacketCamera.class,
|
||||
S39PacketPlayerAbilities.class,
|
||||
S02PacketChat.class,
|
||||
S45PacketTitle.class);
|
||||
|
||||
/**
|
||||
@@ -409,6 +409,12 @@ public class ReplaySender extends ChannelInboundHandlerAdapter {
|
||||
}
|
||||
}
|
||||
|
||||
if (p instanceof S02PacketChat) {
|
||||
if (ReplaySettings.ReplayOptions.showChat.getValue() != Boolean.TRUE) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
return asyncMode ? processPacketAsync(p) : processPacketSync(p);
|
||||
}
|
||||
|
||||
|
||||
@@ -203,7 +203,8 @@ public class ReplaySettings {
|
||||
linear(false, "replaymod.gui.settings.interpolation"),
|
||||
lighting(false, "replaymod.gui.settings.lighting"),
|
||||
previewPath(false, "replaymod.gui.settings.pathpreview"),
|
||||
keyframeCleanCallback(true, "replaymod.gui.settings.keyframecleancallback");
|
||||
keyframeCleanCallback(true, "replaymod.gui.settings.keyframecleancallback"),
|
||||
showChat(false, "options.chat.visibility");
|
||||
|
||||
private Object value;
|
||||
private String name;
|
||||
|
||||
Reference in New Issue
Block a user