reformat code

This commit is contained in:
Bixilon 2020-11-21 15:12:22 +01:00
parent a5d26a6448
commit 5fe7c73a6e
No known key found for this signature in database
GPG Key ID: 5CAD791931B09AC4
9 changed files with 28 additions and 28 deletions

View File

@ -267,7 +267,7 @@ public enum EntityMetaDataFields {
THROWN_EYE_OF_ENDER_ITEM;
final Object defaultValue;
private final Object defaultValue;
EntityMetaDataFields() {
defaultValue = null;

View File

@ -226,9 +226,10 @@ public abstract class Entity {
}
@EntityMetaDataFunction(identifier = "ticksFrozen")
public int getTicksFrozen(){
public int getTicksFrozen() {
return metaData.getSets().getInt(EntityMetaDataFields.ENTITY_TICKS_FROZEN);
}
@Override
public String toString() {
return String.format("%s:%s", information.getMod(), information.getIdentifier());

View File

@ -23,9 +23,9 @@ import java.util.UUID;
public class FishingHook extends Projectile {
public FishingHook(Connection connection, int entityId, UUID uuid, Location location, EntityRotation rotation) {
super(connection, entityId, uuid, location, rotation);
}
public FishingHook(Connection connection, int entityId, UUID uuid, Location location, EntityRotation rotation) {
super(connection, entityId, uuid, location, rotation);
}
@EntityMetaDataFunction(identifier = "hookedEntityId")
public int getHookedEntityId() {

View File

@ -430,7 +430,8 @@ public enum BlockProperties {
PROPERTIES_MAPPING.get(property.getGroup()).put(property.getValue(), property);
}
}
final String group;
final String group;
final String value;
BlockProperties() {

View File

@ -16,7 +16,7 @@ package de.bixilon.minosoft.data.mappings.particle;
import de.bixilon.minosoft.data.mappings.ModIdentifier;
public class Particle extends ModIdentifier {
public Particle(String mod, String identifier) {
super(mod, identifier);
}

View File

@ -22,9 +22,9 @@ import java.text.SimpleDateFormat;
import java.util.concurrent.LinkedBlockingQueue;
public class Log {
public final static long MINOSOFT_START_TIME = System.currentTimeMillis();
final static SimpleDateFormat timeFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS");
final static LinkedBlockingQueue<String> queue = new LinkedBlockingQueue<>();
public final static long MINOSOFT_START_TIME = System.currentTimeMillis();
static LogLevels level = LogLevels.PROTOCOL;
static {

View File

@ -74,7 +74,7 @@ public class PacketMapData implements ClientboundPacket {
if (buffer.getVersionId() >= 452) {
locked = buffer.readBoolean();
}
int pinCount = 0;
int pinCount = 0;
if (buffer.getVersionId() < 759) {
pinCount = buffer.readVarInt();
} else {

View File

@ -146,8 +146,7 @@ public class OutByteBuffer {
public void writeVarInt(int value) {
// thanks https://wiki.vg/Protocol#VarInt_and_VarLong
do
{
do {
byte temp = (byte) (value & 0x7F);
value >>>= 7;
if (value != 0) {
@ -160,8 +159,7 @@ public class OutByteBuffer {
public void prefixVarInt(int value) {
int count = 0;
// thanks https://wiki.vg/Protocol#VarInt_and_VarLong
do
{
do {
byte temp = (byte) (value & 0x7F);
value >>>= 7;
if (value != 0) {

View File

@ -294,7 +294,7 @@ public class PacketHandler {
public void handle(PacketEntityMovementAndRotation pkg) {
Entity entity = connection.getPlayer().getWorld().getEntity(pkg.getEntityId());
if(entity == null){
if (entity == null) {
// thanks mojang
return;
}
@ -304,7 +304,7 @@ public class PacketHandler {
public void handle(PacketEntityMovement pkg) {
Entity entity = connection.getPlayer().getWorld().getEntity(pkg.getEntityId());
if(entity == null){
if (entity == null) {
// thanks mojang
return;
}
@ -313,11 +313,11 @@ public class PacketHandler {
public void handle(PacketEntityRotation pkg) {
Entity entity = connection.getPlayer().getWorld().getEntity(pkg.getEntityId());
if(entity == null){
if (entity == null) {
// thanks mojang
return;
}
entity.setRotation(pkg.getYaw(), pkg.getPitch());
entity.setRotation(pkg.getYaw(), pkg.getPitch());
}
public void handle(PacketDestroyEntity pkg) {
@ -336,7 +336,7 @@ public class PacketHandler {
} else {
entity = connection.getPlayer().getWorld().getEntity(pkg.getEntityId());
}
if(entity == null){
if (entity == null) {
// thanks mojang
return;
}
@ -352,7 +352,7 @@ public class PacketHandler {
public void handle(PacketEntityTeleport pkg) {
Entity entity = connection.getPlayer().getWorld().getEntity(pkg.getEntityId());
if(entity == null){
if (entity == null) {
// thanks mojang
return;
}
@ -362,7 +362,7 @@ public class PacketHandler {
public void handle(PacketEntityHeadRotation pkg) {
Entity entity = connection.getPlayer().getWorld().getEntity(pkg.getEntityId());
if(entity == null){
if (entity == null) {
// thanks mojang
return;
}
@ -376,8 +376,8 @@ public class PacketHandler {
}
public void handle(PacketEntityMetadata pkg) {
Entity entity= connection.getPlayer().getWorld().getEntity(pkg.getEntityId());
if(entity == null){
Entity entity = connection.getPlayer().getWorld().getEntity(pkg.getEntityId());
if (entity == null) {
// thanks mojang
return;
}
@ -388,7 +388,7 @@ public class PacketHandler {
connection.fireEvent(new EntityEquipmentChangeEvent(connection, pkg));
Entity entity = connection.getPlayer().getWorld().getEntity(pkg.getEntityId());
if(entity == null){
if (entity == null) {
// thanks mojang
return;
}
@ -397,7 +397,7 @@ public class PacketHandler {
public void handle(PacketBlockChange pkg) {
Chunk chunk = connection.getPlayer().getWorld().getChunk(pkg.getPosition().getChunkLocation());
if(chunk == null){
if (chunk == null) {
// thanks mojang
return;
}
@ -462,8 +462,8 @@ public class PacketHandler {
}
public void handle(PacketEntityEffect pkg) {
Entity entity= connection.getPlayer().getWorld().getEntity(pkg.getEntityId());
if(entity == null){
Entity entity = connection.getPlayer().getWorld().getEntity(pkg.getEntityId());
if (entity == null) {
// thanks mojang
return;
}
@ -472,7 +472,7 @@ public class PacketHandler {
public void handle(PacketRemoveEntityEffect pkg) {
Entity entity = connection.getPlayer().getWorld().getEntity(pkg.getEntityId());
if(entity == null){
if (entity == null) {
// thanks mojang
return;
}
@ -510,7 +510,7 @@ public class PacketHandler {
public void handle(PacketAttachEntity pkg) {
Entity entity = connection.getPlayer().getWorld().getEntity(pkg.getEntityId());
if(entity == null){
if (entity == null) {
// thanks mojang
return;
}