Minor code refactoring
This commit is contained in:
@@ -145,7 +145,7 @@ public class GuiReplaySettings extends GuiScreen {
|
||||
case RECORDSP_ID:
|
||||
enabled = ReplayMod.replaySettings.isEnableRecordingSingleplayer();
|
||||
enabled = !enabled;
|
||||
recordSPButton.displayString = I18n.format("replaymod.gui.settings.singleplayer")+": " + onOff(enabled);
|
||||
recordSPButton.displayString = I18n.format("replaymod.gui.settings.recordsingleplayer")+": " + onOff(enabled);
|
||||
ReplayMod.replaySettings.setEnableRecordingSingleplayer(enabled);
|
||||
break;
|
||||
case SEND_CHAT:
|
||||
|
||||
@@ -153,7 +153,7 @@ public class GuiRegister extends GuiScreen {
|
||||
if(usernameInput.getText().length() < 5) {
|
||||
message = I18n.format("replaymod.gui.register.error.shortusername");
|
||||
} else if(!EmailAddressUtils.isValidEmailAddress(mailInput.getText())) {
|
||||
message = I18n.format("replaymod.gui.register.error.invalidmail");
|
||||
message = I18n.format("replaymod.api.invalidmail");
|
||||
} else if(!(passwordInput.getText().length() >= 5)) {
|
||||
message = I18n.format("replaymod.gui.register.error.shortpw");
|
||||
} else if(!passwordConfirmation.getText().equals(passwordInput.getText())) {
|
||||
|
||||
@@ -76,6 +76,7 @@ public class ReplaySender extends ChannelInboundHandlerAdapter {
|
||||
joinPacketDimension, joinPacketDifficulty, joinPacketMaxPlayers;
|
||||
private Field effectPacketEntityId;
|
||||
private Field metadataPacketEntityId, metadataPacketList;
|
||||
private Field objectTypeField;
|
||||
private Minecraft mc = Minecraft.getMinecraft();
|
||||
private int replayLength = 0;
|
||||
private int actualID = -1;
|
||||
@@ -344,6 +345,14 @@ public class ReplaySender extends ChannelInboundHandlerAdapter {
|
||||
if(hurryToTimestamp && (!ReplayHandler.isInPath() || (desiredTimeStamp - currentTimeStamp > 1000))) {
|
||||
if(p instanceof S45PacketTitle ||
|
||||
p instanceof S2APacketParticles) return;
|
||||
|
||||
if(p instanceof S0EPacketSpawnObject) {
|
||||
S0EPacketSpawnObject pso = (S0EPacketSpawnObject)p;
|
||||
int type = pso.func_148993_l();
|
||||
if(type == 76) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(p instanceof S29PacketSoundEffect && ReplayHandler.isInPath() && ReplayProcess.isVideoRecording()) {
|
||||
|
||||
Reference in New Issue
Block a user