1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2025-11-24 00:54:48 +00:00

Minor code style fixups

- Add missing @Override annotations. I can't find a way to enforce this
   with checkstyle - maybe I need spotbugs too D:.
 - Remove superflous "this"es.
This commit is contained in:
Jonathan Coates
2021-06-12 22:18:35 +01:00
parent d4745ae47e
commit 2fab1a3054
24 changed files with 57 additions and 53 deletions

View File

@@ -54,36 +54,36 @@ public class TerminalState
if( terminal == null )
{
this.width = this.height = 0;
this.buffer = null;
width = height = 0;
buffer = null;
}
else
{
this.width = terminal.getWidth();
this.height = terminal.getHeight();
width = terminal.getWidth();
height = terminal.getHeight();
ByteBuf buf = this.buffer = Unpooled.buffer();
ByteBuf buf = buffer = Unpooled.buffer();
terminal.write( new PacketBuffer( buf ) );
}
}
public TerminalState( PacketBuffer buf )
{
this.colour = buf.readBoolean();
this.compress = buf.readBoolean();
colour = buf.readBoolean();
compress = buf.readBoolean();
if( buf.readBoolean() )
{
this.width = buf.readVarInt();
this.height = buf.readVarInt();
width = buf.readVarInt();
height = buf.readVarInt();
int length = buf.readVarInt();
this.buffer = readCompressed( buf, length, compress );
buffer = readCompressed( buf, length, compress );
}
else
{
this.width = this.height = 0;
this.buffer = null;
width = height = 0;
buffer = null;
}
}

View File

@@ -16,14 +16,14 @@ public class ComputerContainerData implements ContainerData
public ComputerContainerData( ServerComputer computer )
{
this.id = computer.getInstanceID();
this.family = computer.getFamily();
id = computer.getInstanceID();
family = computer.getFamily();
}
public ComputerContainerData( PacketBuffer buf )
{
this.id = buf.readInt();
this.family = buf.readEnum( ComputerFamily.class );
id = buf.readInt();
family = buf.readEnum( ComputerFamily.class );
}
@Override