mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-11 08:27:29 -04:00
reformat code
This commit is contained in:
parent
8cf5d1bc44
commit
a143e79c25
@ -151,7 +151,6 @@ public class Configuration {
|
||||
config.getAsJsonObject("servers").getAsJsonObject("entries").remove(String.valueOf(server.getId()));
|
||||
}
|
||||
|
||||
|
||||
public void saveToFile() {
|
||||
thread.interrupt();
|
||||
}
|
||||
|
@ -24,7 +24,6 @@ public class BlockBreakAnimationEvent extends CancelableEvent {
|
||||
private final BlockPosition position;
|
||||
private final byte stage;
|
||||
|
||||
|
||||
public BlockBreakAnimationEvent(Connection connection, int entityId, BlockPosition position, byte stage) {
|
||||
super(connection);
|
||||
this.entityId = entityId;
|
||||
|
@ -45,7 +45,6 @@ public class NettyNetwork implements Network {
|
||||
.channel(NioSocketChannel.class)
|
||||
.handler(new TCPClientChannelInitializer(connection, this));
|
||||
|
||||
|
||||
try {
|
||||
ChannelFuture channelFuture = clientBootstrap.connect(address.getHostname(), address.getPort()).sync();
|
||||
if (channelFuture.isSuccess()) {
|
||||
|
@ -13,7 +13,6 @@
|
||||
|
||||
package de.bixilon.minosoft.protocol.network.netty;
|
||||
|
||||
|
||||
import de.bixilon.minosoft.logging.Log;
|
||||
import de.bixilon.minosoft.logging.LogLevels;
|
||||
import de.bixilon.minosoft.protocol.network.Connection;
|
||||
|
@ -13,7 +13,6 @@
|
||||
|
||||
package de.bixilon.minosoft.protocol.network.netty;
|
||||
|
||||
|
||||
import de.bixilon.minosoft.protocol.network.Connection;
|
||||
import de.bixilon.minosoft.protocol.packets.ServerboundPacket;
|
||||
import de.bixilon.minosoft.protocol.packets.serverbound.login.PacketEncryptionResponse;
|
||||
|
@ -36,7 +36,6 @@ public class PacketParticle implements ClientboundPacket {
|
||||
@Override
|
||||
public boolean read(InByteBuffer buffer) {
|
||||
if (buffer.getProtocolId() < 569) {
|
||||
|
||||
if (buffer.getProtocolId() < 17) {
|
||||
particleType = buffer.getConnection().getMapping().getParticleByIdentifier(buffer.readString());
|
||||
} else {
|
||||
|
@ -33,13 +33,10 @@ public class PacketScoreboardObjective implements ClientboundPacket {
|
||||
}
|
||||
action = ScoreboardObjectiveActions.byId(buffer.readByte());
|
||||
if (action == ScoreboardObjectiveActions.CREATE || action == ScoreboardObjectiveActions.UPDATE) {
|
||||
|
||||
if (buffer.getProtocolId() >= 7) { // ToDo
|
||||
value = buffer.readTextComponent();
|
||||
|
||||
}
|
||||
if (buffer.getProtocolId() >= 12) {
|
||||
|
||||
if (buffer.getProtocolId() >= 346 && buffer.getProtocolId() < 349) {
|
||||
// got removed in these 3 versions
|
||||
return true;
|
||||
|
@ -309,7 +309,6 @@ public class InByteBuffer {
|
||||
|
||||
public Slot readSlot() {
|
||||
if (protocolId < 402) {
|
||||
|
||||
short id = readShort();
|
||||
if (id == -1) {
|
||||
return null;
|
||||
|
@ -54,13 +54,11 @@ public final class ChunkUtil {
|
||||
HashMap<Byte, ChunkNibble> nibbleMap = new HashMap<>();
|
||||
for (byte c = 0; c < 16; c++) { // max sections per chunks in chunk column
|
||||
if (BitByte.isBitSet(sectionBitMask, c)) {
|
||||
|
||||
HashMap<ChunkNibbleLocation, Block> blockMap = new HashMap<>();
|
||||
|
||||
for (int nibbleY = 0; nibbleY < 16; nibbleY++) {
|
||||
for (int nibbleZ = 0; nibbleZ < 16; nibbleZ++) {
|
||||
for (int nibbleX = 0; nibbleX < 16; nibbleX++) {
|
||||
|
||||
short singeBlockId = (short) (blockTypes[arrayPos] & 0xFF);
|
||||
byte singleMeta;
|
||||
// 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 nibbleZ = 0; nibbleZ < 16; nibbleZ++) {
|
||||
for (int nibbleX = 0; nibbleX < 16; nibbleX++) {
|
||||
|
||||
int blockNumber = (((nibbleY * 16) + nibbleZ) * 16) + nibbleX;
|
||||
int startLong = (blockNumber * palette.getBitsPerBlock()) / 64;
|
||||
int startOffset = (blockNumber * palette.getBitsPerBlock()) % 64;
|
||||
|
Loading…
x
Reference in New Issue
Block a user