mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-15 18:34:56 -04:00
reformat code
This commit is contained in:
parent
a5d26a6448
commit
5fe7c73a6e
@ -267,7 +267,7 @@ public enum EntityMetaDataFields {
|
|||||||
|
|
||||||
THROWN_EYE_OF_ENDER_ITEM;
|
THROWN_EYE_OF_ENDER_ITEM;
|
||||||
|
|
||||||
final Object defaultValue;
|
private final Object defaultValue;
|
||||||
|
|
||||||
EntityMetaDataFields() {
|
EntityMetaDataFields() {
|
||||||
defaultValue = null;
|
defaultValue = null;
|
||||||
|
@ -226,9 +226,10 @@ public abstract class Entity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@EntityMetaDataFunction(identifier = "ticksFrozen")
|
@EntityMetaDataFunction(identifier = "ticksFrozen")
|
||||||
public int getTicksFrozen(){
|
public int getTicksFrozen() {
|
||||||
return metaData.getSets().getInt(EntityMetaDataFields.ENTITY_TICKS_FROZEN);
|
return metaData.getSets().getInt(EntityMetaDataFields.ENTITY_TICKS_FROZEN);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return String.format("%s:%s", information.getMod(), information.getIdentifier());
|
return String.format("%s:%s", information.getMod(), information.getIdentifier());
|
||||||
|
@ -23,9 +23,9 @@ import java.util.UUID;
|
|||||||
|
|
||||||
public class FishingHook extends Projectile {
|
public class FishingHook extends Projectile {
|
||||||
|
|
||||||
public FishingHook(Connection connection, int entityId, UUID uuid, Location location, EntityRotation rotation) {
|
public FishingHook(Connection connection, int entityId, UUID uuid, Location location, EntityRotation rotation) {
|
||||||
super(connection, entityId, uuid, location, rotation);
|
super(connection, entityId, uuid, location, rotation);
|
||||||
}
|
}
|
||||||
|
|
||||||
@EntityMetaDataFunction(identifier = "hookedEntityId")
|
@EntityMetaDataFunction(identifier = "hookedEntityId")
|
||||||
public int getHookedEntityId() {
|
public int getHookedEntityId() {
|
||||||
|
@ -430,7 +430,8 @@ public enum BlockProperties {
|
|||||||
PROPERTIES_MAPPING.get(property.getGroup()).put(property.getValue(), property);
|
PROPERTIES_MAPPING.get(property.getGroup()).put(property.getValue(), property);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
final String group;
|
|
||||||
|
final String group;
|
||||||
final String value;
|
final String value;
|
||||||
|
|
||||||
BlockProperties() {
|
BlockProperties() {
|
||||||
|
@ -16,7 +16,7 @@ package de.bixilon.minosoft.data.mappings.particle;
|
|||||||
import de.bixilon.minosoft.data.mappings.ModIdentifier;
|
import de.bixilon.minosoft.data.mappings.ModIdentifier;
|
||||||
|
|
||||||
public class Particle extends ModIdentifier {
|
public class Particle extends ModIdentifier {
|
||||||
|
|
||||||
public Particle(String mod, String identifier) {
|
public Particle(String mod, String identifier) {
|
||||||
super(mod, identifier);
|
super(mod, identifier);
|
||||||
}
|
}
|
||||||
|
@ -22,9 +22,9 @@ import java.text.SimpleDateFormat;
|
|||||||
import java.util.concurrent.LinkedBlockingQueue;
|
import java.util.concurrent.LinkedBlockingQueue;
|
||||||
|
|
||||||
public class Log {
|
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 SimpleDateFormat timeFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS");
|
||||||
final static LinkedBlockingQueue<String> queue = new LinkedBlockingQueue<>();
|
final static LinkedBlockingQueue<String> queue = new LinkedBlockingQueue<>();
|
||||||
public final static long MINOSOFT_START_TIME = System.currentTimeMillis();
|
|
||||||
static LogLevels level = LogLevels.PROTOCOL;
|
static LogLevels level = LogLevels.PROTOCOL;
|
||||||
|
|
||||||
static {
|
static {
|
||||||
|
@ -74,7 +74,7 @@ public class PacketMapData implements ClientboundPacket {
|
|||||||
if (buffer.getVersionId() >= 452) {
|
if (buffer.getVersionId() >= 452) {
|
||||||
locked = buffer.readBoolean();
|
locked = buffer.readBoolean();
|
||||||
}
|
}
|
||||||
int pinCount = 0;
|
int pinCount = 0;
|
||||||
if (buffer.getVersionId() < 759) {
|
if (buffer.getVersionId() < 759) {
|
||||||
pinCount = buffer.readVarInt();
|
pinCount = buffer.readVarInt();
|
||||||
} else {
|
} else {
|
||||||
|
@ -146,8 +146,7 @@ public class OutByteBuffer {
|
|||||||
|
|
||||||
public void writeVarInt(int value) {
|
public void writeVarInt(int value) {
|
||||||
// thanks https://wiki.vg/Protocol#VarInt_and_VarLong
|
// thanks https://wiki.vg/Protocol#VarInt_and_VarLong
|
||||||
do
|
do {
|
||||||
{
|
|
||||||
byte temp = (byte) (value & 0x7F);
|
byte temp = (byte) (value & 0x7F);
|
||||||
value >>>= 7;
|
value >>>= 7;
|
||||||
if (value != 0) {
|
if (value != 0) {
|
||||||
@ -160,8 +159,7 @@ public class OutByteBuffer {
|
|||||||
public void prefixVarInt(int value) {
|
public void prefixVarInt(int value) {
|
||||||
int count = 0;
|
int count = 0;
|
||||||
// thanks https://wiki.vg/Protocol#VarInt_and_VarLong
|
// thanks https://wiki.vg/Protocol#VarInt_and_VarLong
|
||||||
do
|
do {
|
||||||
{
|
|
||||||
byte temp = (byte) (value & 0x7F);
|
byte temp = (byte) (value & 0x7F);
|
||||||
value >>>= 7;
|
value >>>= 7;
|
||||||
if (value != 0) {
|
if (value != 0) {
|
||||||
|
@ -294,7 +294,7 @@ public class PacketHandler {
|
|||||||
|
|
||||||
public void handle(PacketEntityMovementAndRotation pkg) {
|
public void handle(PacketEntityMovementAndRotation pkg) {
|
||||||
Entity entity = connection.getPlayer().getWorld().getEntity(pkg.getEntityId());
|
Entity entity = connection.getPlayer().getWorld().getEntity(pkg.getEntityId());
|
||||||
if(entity == null){
|
if (entity == null) {
|
||||||
// thanks mojang
|
// thanks mojang
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -304,7 +304,7 @@ public class PacketHandler {
|
|||||||
|
|
||||||
public void handle(PacketEntityMovement pkg) {
|
public void handle(PacketEntityMovement pkg) {
|
||||||
Entity entity = connection.getPlayer().getWorld().getEntity(pkg.getEntityId());
|
Entity entity = connection.getPlayer().getWorld().getEntity(pkg.getEntityId());
|
||||||
if(entity == null){
|
if (entity == null) {
|
||||||
// thanks mojang
|
// thanks mojang
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -313,11 +313,11 @@ public class PacketHandler {
|
|||||||
|
|
||||||
public void handle(PacketEntityRotation pkg) {
|
public void handle(PacketEntityRotation pkg) {
|
||||||
Entity entity = connection.getPlayer().getWorld().getEntity(pkg.getEntityId());
|
Entity entity = connection.getPlayer().getWorld().getEntity(pkg.getEntityId());
|
||||||
if(entity == null){
|
if (entity == null) {
|
||||||
// thanks mojang
|
// thanks mojang
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
entity.setRotation(pkg.getYaw(), pkg.getPitch());
|
entity.setRotation(pkg.getYaw(), pkg.getPitch());
|
||||||
}
|
}
|
||||||
|
|
||||||
public void handle(PacketDestroyEntity pkg) {
|
public void handle(PacketDestroyEntity pkg) {
|
||||||
@ -336,7 +336,7 @@ public class PacketHandler {
|
|||||||
} else {
|
} else {
|
||||||
entity = connection.getPlayer().getWorld().getEntity(pkg.getEntityId());
|
entity = connection.getPlayer().getWorld().getEntity(pkg.getEntityId());
|
||||||
}
|
}
|
||||||
if(entity == null){
|
if (entity == null) {
|
||||||
// thanks mojang
|
// thanks mojang
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -352,7 +352,7 @@ public class PacketHandler {
|
|||||||
|
|
||||||
public void handle(PacketEntityTeleport pkg) {
|
public void handle(PacketEntityTeleport pkg) {
|
||||||
Entity entity = connection.getPlayer().getWorld().getEntity(pkg.getEntityId());
|
Entity entity = connection.getPlayer().getWorld().getEntity(pkg.getEntityId());
|
||||||
if(entity == null){
|
if (entity == null) {
|
||||||
// thanks mojang
|
// thanks mojang
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -362,7 +362,7 @@ public class PacketHandler {
|
|||||||
|
|
||||||
public void handle(PacketEntityHeadRotation pkg) {
|
public void handle(PacketEntityHeadRotation pkg) {
|
||||||
Entity entity = connection.getPlayer().getWorld().getEntity(pkg.getEntityId());
|
Entity entity = connection.getPlayer().getWorld().getEntity(pkg.getEntityId());
|
||||||
if(entity == null){
|
if (entity == null) {
|
||||||
// thanks mojang
|
// thanks mojang
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -376,8 +376,8 @@ public class PacketHandler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void handle(PacketEntityMetadata pkg) {
|
public void handle(PacketEntityMetadata pkg) {
|
||||||
Entity entity= connection.getPlayer().getWorld().getEntity(pkg.getEntityId());
|
Entity entity = connection.getPlayer().getWorld().getEntity(pkg.getEntityId());
|
||||||
if(entity == null){
|
if (entity == null) {
|
||||||
// thanks mojang
|
// thanks mojang
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -388,7 +388,7 @@ public class PacketHandler {
|
|||||||
connection.fireEvent(new EntityEquipmentChangeEvent(connection, pkg));
|
connection.fireEvent(new EntityEquipmentChangeEvent(connection, pkg));
|
||||||
|
|
||||||
Entity entity = connection.getPlayer().getWorld().getEntity(pkg.getEntityId());
|
Entity entity = connection.getPlayer().getWorld().getEntity(pkg.getEntityId());
|
||||||
if(entity == null){
|
if (entity == null) {
|
||||||
// thanks mojang
|
// thanks mojang
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -397,7 +397,7 @@ public class PacketHandler {
|
|||||||
|
|
||||||
public void handle(PacketBlockChange pkg) {
|
public void handle(PacketBlockChange pkg) {
|
||||||
Chunk chunk = connection.getPlayer().getWorld().getChunk(pkg.getPosition().getChunkLocation());
|
Chunk chunk = connection.getPlayer().getWorld().getChunk(pkg.getPosition().getChunkLocation());
|
||||||
if(chunk == null){
|
if (chunk == null) {
|
||||||
// thanks mojang
|
// thanks mojang
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -462,8 +462,8 @@ public class PacketHandler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void handle(PacketEntityEffect pkg) {
|
public void handle(PacketEntityEffect pkg) {
|
||||||
Entity entity= connection.getPlayer().getWorld().getEntity(pkg.getEntityId());
|
Entity entity = connection.getPlayer().getWorld().getEntity(pkg.getEntityId());
|
||||||
if(entity == null){
|
if (entity == null) {
|
||||||
// thanks mojang
|
// thanks mojang
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -472,7 +472,7 @@ public class PacketHandler {
|
|||||||
|
|
||||||
public void handle(PacketRemoveEntityEffect pkg) {
|
public void handle(PacketRemoveEntityEffect pkg) {
|
||||||
Entity entity = connection.getPlayer().getWorld().getEntity(pkg.getEntityId());
|
Entity entity = connection.getPlayer().getWorld().getEntity(pkg.getEntityId());
|
||||||
if(entity == null){
|
if (entity == null) {
|
||||||
// thanks mojang
|
// thanks mojang
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -510,7 +510,7 @@ public class PacketHandler {
|
|||||||
|
|
||||||
public void handle(PacketAttachEntity pkg) {
|
public void handle(PacketAttachEntity pkg) {
|
||||||
Entity entity = connection.getPlayer().getWorld().getEntity(pkg.getEntityId());
|
Entity entity = connection.getPlayer().getWorld().getEntity(pkg.getEntityId());
|
||||||
if(entity == null){
|
if (entity == null) {
|
||||||
// thanks mojang
|
// thanks mojang
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user