reformat code

This commit is contained in:
Bixilon 2020-10-02 21:51:11 +02:00
parent 8cf5d1bc44
commit a143e79c25
No known key found for this signature in database
GPG Key ID: 5CAD791931B09AC4
9 changed files with 0 additions and 13 deletions

View File

@ -151,7 +151,6 @@ public class Configuration {
config.getAsJsonObject("servers").getAsJsonObject("entries").remove(String.valueOf(server.getId())); config.getAsJsonObject("servers").getAsJsonObject("entries").remove(String.valueOf(server.getId()));
} }
public void saveToFile() { public void saveToFile() {
thread.interrupt(); thread.interrupt();
} }

View File

@ -24,7 +24,6 @@ public class BlockBreakAnimationEvent extends CancelableEvent {
private final BlockPosition position; private final BlockPosition position;
private final byte stage; private final byte stage;
public BlockBreakAnimationEvent(Connection connection, int entityId, BlockPosition position, byte stage) { public BlockBreakAnimationEvent(Connection connection, int entityId, BlockPosition position, byte stage) {
super(connection); super(connection);
this.entityId = entityId; this.entityId = entityId;

View File

@ -45,7 +45,6 @@ public class NettyNetwork implements Network {
.channel(NioSocketChannel.class) .channel(NioSocketChannel.class)
.handler(new TCPClientChannelInitializer(connection, this)); .handler(new TCPClientChannelInitializer(connection, this));
try { try {
ChannelFuture channelFuture = clientBootstrap.connect(address.getHostname(), address.getPort()).sync(); ChannelFuture channelFuture = clientBootstrap.connect(address.getHostname(), address.getPort()).sync();
if (channelFuture.isSuccess()) { if (channelFuture.isSuccess()) {

View File

@ -13,7 +13,6 @@
package de.bixilon.minosoft.protocol.network.netty; package de.bixilon.minosoft.protocol.network.netty;
import de.bixilon.minosoft.logging.Log; import de.bixilon.minosoft.logging.Log;
import de.bixilon.minosoft.logging.LogLevels; import de.bixilon.minosoft.logging.LogLevels;
import de.bixilon.minosoft.protocol.network.Connection; import de.bixilon.minosoft.protocol.network.Connection;

View File

@ -13,7 +13,6 @@
package de.bixilon.minosoft.protocol.network.netty; package de.bixilon.minosoft.protocol.network.netty;
import de.bixilon.minosoft.protocol.network.Connection; import de.bixilon.minosoft.protocol.network.Connection;
import de.bixilon.minosoft.protocol.packets.ServerboundPacket; import de.bixilon.minosoft.protocol.packets.ServerboundPacket;
import de.bixilon.minosoft.protocol.packets.serverbound.login.PacketEncryptionResponse; import de.bixilon.minosoft.protocol.packets.serverbound.login.PacketEncryptionResponse;

View File

@ -36,7 +36,6 @@ public class PacketParticle implements ClientboundPacket {
@Override @Override
public boolean read(InByteBuffer buffer) { public boolean read(InByteBuffer buffer) {
if (buffer.getProtocolId() < 569) { if (buffer.getProtocolId() < 569) {
if (buffer.getProtocolId() < 17) { if (buffer.getProtocolId() < 17) {
particleType = buffer.getConnection().getMapping().getParticleByIdentifier(buffer.readString()); particleType = buffer.getConnection().getMapping().getParticleByIdentifier(buffer.readString());
} else { } else {

View File

@ -33,13 +33,10 @@ public class PacketScoreboardObjective implements ClientboundPacket {
} }
action = ScoreboardObjectiveActions.byId(buffer.readByte()); action = ScoreboardObjectiveActions.byId(buffer.readByte());
if (action == ScoreboardObjectiveActions.CREATE || action == ScoreboardObjectiveActions.UPDATE) { if (action == ScoreboardObjectiveActions.CREATE || action == ScoreboardObjectiveActions.UPDATE) {
if (buffer.getProtocolId() >= 7) { // ToDo if (buffer.getProtocolId() >= 7) { // ToDo
value = buffer.readTextComponent(); value = buffer.readTextComponent();
} }
if (buffer.getProtocolId() >= 12) { if (buffer.getProtocolId() >= 12) {
if (buffer.getProtocolId() >= 346 && buffer.getProtocolId() < 349) { if (buffer.getProtocolId() >= 346 && buffer.getProtocolId() < 349) {
// got removed in these 3 versions // got removed in these 3 versions
return true; return true;

View File

@ -309,7 +309,6 @@ public class InByteBuffer {
public Slot readSlot() { public Slot readSlot() {
if (protocolId < 402) { if (protocolId < 402) {
short id = readShort(); short id = readShort();
if (id == -1) { if (id == -1) {
return null; return null;

View File

@ -54,13 +54,11 @@ public final class ChunkUtil {
HashMap<Byte, ChunkNibble> nibbleMap = new HashMap<>(); HashMap<Byte, ChunkNibble> nibbleMap = new HashMap<>();
for (byte c = 0; c < 16; c++) { // max sections per chunks in chunk column for (byte c = 0; c < 16; c++) { // max sections per chunks in chunk column
if (BitByte.isBitSet(sectionBitMask, c)) { if (BitByte.isBitSet(sectionBitMask, c)) {
HashMap<ChunkNibbleLocation, Block> blockMap = new HashMap<>(); HashMap<ChunkNibbleLocation, Block> blockMap = new HashMap<>();
for (int nibbleY = 0; nibbleY < 16; nibbleY++) { for (int nibbleY = 0; nibbleY < 16; nibbleY++) {
for (int nibbleZ = 0; nibbleZ < 16; nibbleZ++) { for (int nibbleZ = 0; nibbleZ < 16; nibbleZ++) {
for (int nibbleX = 0; nibbleX < 16; nibbleX++) { for (int nibbleX = 0; nibbleX < 16; nibbleX++) {
short singeBlockId = (short) (blockTypes[arrayPos] & 0xFF); short singeBlockId = (short) (blockTypes[arrayPos] & 0xFF);
byte singleMeta; byte singleMeta;
// get block meta and shift and add (merge) id if needed // get block meta and shift and add (merge) id if needed
@ -159,7 +157,6 @@ public final class ChunkUtil {
for (int nibbleY = 0; nibbleY < 16; nibbleY++) { for (int nibbleY = 0; nibbleY < 16; nibbleY++) {
for (int nibbleZ = 0; nibbleZ < 16; nibbleZ++) { for (int nibbleZ = 0; nibbleZ < 16; nibbleZ++) {
for (int nibbleX = 0; nibbleX < 16; nibbleX++) { for (int nibbleX = 0; nibbleX < 16; nibbleX++) {
int blockNumber = (((nibbleY * 16) + nibbleZ) * 16) + nibbleX; int blockNumber = (((nibbleY * 16) + nibbleZ) * 16) + nibbleX;
int startLong = (blockNumber * palette.getBitsPerBlock()) / 64; int startLong = (blockNumber * palette.getBitsPerBlock()) / 64;
int startOffset = (blockNumber * palette.getBitsPerBlock()) % 64; int startOffset = (blockNumber * palette.getBitsPerBlock()) % 64;