mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-12 17:07:55 -04:00
proper angle calculation (yaw/pitch/(roll))
This commit is contained in:
parent
423e48a57a
commit
5b424574ac
@ -27,11 +27,11 @@ public abstract class Entity implements EntityInterface {
|
||||
final List<StatusEffect> effectList;
|
||||
Location location;
|
||||
Velocity velocity;
|
||||
int yaw;
|
||||
int pitch;
|
||||
int headYaw;
|
||||
short yaw;
|
||||
short pitch;
|
||||
short headYaw;
|
||||
|
||||
public Entity(int id, Location location, int yaw, int pitch, Velocity velocity) {
|
||||
public Entity(int id, Location location, short yaw, short pitch, Velocity velocity) {
|
||||
this.id = id;
|
||||
this.location = location;
|
||||
this.yaw = yaw;
|
||||
@ -41,6 +41,16 @@ public abstract class Entity implements EntityInterface {
|
||||
this.effectList = new ArrayList<>();
|
||||
}
|
||||
|
||||
public Entity(int id, Location location, int yaw, int pitch, Velocity velocity) {
|
||||
this.id = id;
|
||||
this.location = location;
|
||||
this.yaw = (short) yaw;
|
||||
this.pitch = (short) pitch;
|
||||
this.velocity = velocity;
|
||||
this.equipment = new HashMap<>();
|
||||
this.effectList = new ArrayList<>();
|
||||
}
|
||||
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
@ -68,20 +78,20 @@ public abstract class Entity implements EntityInterface {
|
||||
this.velocity = velocity;
|
||||
}
|
||||
|
||||
public int getYaw() {
|
||||
public short getYaw() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public void setYaw(int yaw) {
|
||||
public void setYaw(short yaw) {
|
||||
this.yaw = yaw;
|
||||
|
||||
}
|
||||
|
||||
public int getPitch() {
|
||||
public short getPitch() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public void setPitch(int pitch) {
|
||||
public void setPitch(short pitch) {
|
||||
this.pitch = pitch;
|
||||
|
||||
}
|
||||
@ -95,11 +105,11 @@ public abstract class Entity implements EntityInterface {
|
||||
}
|
||||
|
||||
|
||||
public int getHeadYaw() {
|
||||
public short getHeadYaw() {
|
||||
return headYaw;
|
||||
}
|
||||
|
||||
public void setHeadYaw(int headYaw) {
|
||||
public void setHeadYaw(short headYaw) {
|
||||
this.headYaw = headYaw;
|
||||
}
|
||||
|
||||
|
@ -15,7 +15,7 @@ package de.bixilon.minosoft.game.datatypes.entities;
|
||||
|
||||
public abstract class EntityObject extends Entity implements ObjectInterface {
|
||||
|
||||
public EntityObject(int id, Location location, int yaw, int pitch, Velocity velocity) {
|
||||
public EntityObject(int id, Location location, short yaw, short pitch, Velocity velocity) {
|
||||
super(id, location, yaw, pitch, velocity);
|
||||
}
|
||||
|
||||
|
@ -17,7 +17,7 @@ import de.bixilon.minosoft.game.datatypes.entities.meta.EntityMetaData;
|
||||
import de.bixilon.minosoft.game.datatypes.entities.meta.MobMetaData;
|
||||
|
||||
public abstract class Mob extends Entity implements MobInterface {
|
||||
public Mob(int id, Location location, int yaw, int pitch, Velocity velocity) {
|
||||
public Mob(int id, Location location, short yaw, short pitch, Velocity velocity) {
|
||||
super(id, location, yaw, pitch, velocity);
|
||||
}
|
||||
|
||||
|
@ -22,7 +22,7 @@ import de.bixilon.minosoft.protocol.protocol.ProtocolVersion;
|
||||
public class Bat extends Mob implements MobInterface {
|
||||
BatMetaData metaData;
|
||||
|
||||
public Bat(int id, Location location, int yaw, int pitch, Velocity velocity, InByteBuffer buffer, ProtocolVersion v) {
|
||||
public Bat(int id, Location location, short yaw, short pitch, Velocity velocity, InByteBuffer buffer, ProtocolVersion v) {
|
||||
super(id, location, yaw, pitch, velocity);
|
||||
this.metaData = new BatMetaData(buffer, v);
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ import de.bixilon.minosoft.protocol.protocol.ProtocolVersion;
|
||||
public class Blaze extends Mob implements MobInterface {
|
||||
BlazeMetaData metaData;
|
||||
|
||||
public Blaze(int id, Location location, int yaw, int pitch, Velocity velocity, InByteBuffer buffer, ProtocolVersion v) {
|
||||
public Blaze(int id, Location location, short yaw, short pitch, Velocity velocity, InByteBuffer buffer, ProtocolVersion v) {
|
||||
super(id, location, yaw, pitch, velocity);
|
||||
this.metaData = new BlazeMetaData(buffer, v);
|
||||
}
|
||||
|
@ -20,7 +20,7 @@ import de.bixilon.minosoft.protocol.protocol.InByteBuffer;
|
||||
import de.bixilon.minosoft.protocol.protocol.ProtocolVersion;
|
||||
|
||||
public class CaveSpider extends Spider {
|
||||
public CaveSpider(int id, Location location, int yaw, int pitch, Velocity velocity, InByteBuffer buffer, ProtocolVersion v) {
|
||||
public CaveSpider(int id, Location location, short yaw, short pitch, Velocity velocity, InByteBuffer buffer, ProtocolVersion v) {
|
||||
super(id, location, yaw, pitch, velocity, buffer, v);
|
||||
}
|
||||
|
||||
|
@ -22,7 +22,7 @@ import de.bixilon.minosoft.protocol.protocol.ProtocolVersion;
|
||||
public class Chicken extends Mob implements MobInterface {
|
||||
AgeableMetaData metaData;
|
||||
|
||||
public Chicken(int id, Location location, int yaw, int pitch, Velocity velocity, InByteBuffer buffer, ProtocolVersion v) {
|
||||
public Chicken(int id, Location location, short yaw, short pitch, Velocity velocity, InByteBuffer buffer, ProtocolVersion v) {
|
||||
super(id, location, yaw, pitch, velocity);
|
||||
this.metaData = new AgeableMetaData(buffer, v);
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ import de.bixilon.minosoft.protocol.protocol.ProtocolVersion;
|
||||
public class Cow extends Mob implements MobInterface {
|
||||
AgeableMetaData metaData;
|
||||
|
||||
public Cow(int id, Location location, int yaw, int pitch, Velocity velocity, InByteBuffer buffer, ProtocolVersion v) {
|
||||
public Cow(int id, Location location, short yaw, short pitch, Velocity velocity, InByteBuffer buffer, ProtocolVersion v) {
|
||||
super(id, location, yaw, pitch, velocity);
|
||||
this.metaData = new AgeableMetaData(buffer, v);
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ import de.bixilon.minosoft.protocol.protocol.ProtocolVersion;
|
||||
public class Creeper extends Mob implements MobInterface {
|
||||
CreeperMetaData metaData;
|
||||
|
||||
public Creeper(int id, Location location, int yaw, int pitch, Velocity velocity, InByteBuffer buffer, ProtocolVersion v) {
|
||||
public Creeper(int id, Location location, short yaw, short pitch, Velocity velocity, InByteBuffer buffer, ProtocolVersion v) {
|
||||
super(id, location, yaw, pitch, velocity);
|
||||
this.metaData = new CreeperMetaData(buffer, v);
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ import de.bixilon.minosoft.protocol.protocol.ProtocolVersion;
|
||||
public class EnderDragon extends Mob implements MobInterface {
|
||||
MobMetaData metaData;
|
||||
|
||||
public EnderDragon(int id, Location location, int yaw, int pitch, Velocity velocity, InByteBuffer buffer, ProtocolVersion v) {
|
||||
public EnderDragon(int id, Location location, short yaw, short pitch, Velocity velocity, InByteBuffer buffer, ProtocolVersion v) {
|
||||
super(id, location, yaw, pitch, velocity);
|
||||
this.metaData = new MobMetaData(buffer, v);
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ import de.bixilon.minosoft.protocol.protocol.ProtocolVersion;
|
||||
public class EnderMan extends Mob implements MobInterface {
|
||||
EndermanMetaData metaData;
|
||||
|
||||
public EnderMan(int id, Location location, int yaw, int pitch, Velocity velocity, InByteBuffer buffer, ProtocolVersion v) {
|
||||
public EnderMan(int id, Location location, short yaw, short pitch, Velocity velocity, InByteBuffer buffer, ProtocolVersion v) {
|
||||
super(id, location, yaw, pitch, velocity);
|
||||
this.metaData = new EndermanMetaData(buffer, v);
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ import de.bixilon.minosoft.protocol.protocol.ProtocolVersion;
|
||||
public class Ghast extends Mob implements MobInterface {
|
||||
GhastMetaData metaData;
|
||||
|
||||
public Ghast(int id, Location location, int yaw, int pitch, Velocity velocity, InByteBuffer buffer, ProtocolVersion v) {
|
||||
public Ghast(int id, Location location, short yaw, short pitch, Velocity velocity, InByteBuffer buffer, ProtocolVersion v) {
|
||||
super(id, location, yaw, pitch, velocity);
|
||||
this.metaData = new GhastMetaData(buffer, v);
|
||||
}
|
||||
|
@ -20,7 +20,7 @@ import de.bixilon.minosoft.protocol.protocol.InByteBuffer;
|
||||
import de.bixilon.minosoft.protocol.protocol.ProtocolVersion;
|
||||
|
||||
public class GiantZombie extends Zombie {
|
||||
public GiantZombie(int id, Location location, int yaw, int pitch, Velocity velocity, InByteBuffer buffer, ProtocolVersion v) {
|
||||
public GiantZombie(int id, Location location, short yaw, short pitch, Velocity velocity, InByteBuffer buffer, ProtocolVersion v) {
|
||||
super(id, location, yaw, pitch, velocity, buffer, v);
|
||||
}
|
||||
|
||||
|
@ -22,7 +22,7 @@ import de.bixilon.minosoft.protocol.protocol.ProtocolVersion;
|
||||
public class Horse extends Mob implements MobInterface {
|
||||
HorseMetaData metaData;
|
||||
|
||||
public Horse(int id, Location location, int yaw, int pitch, Velocity velocity, InByteBuffer buffer, ProtocolVersion v) {
|
||||
public Horse(int id, Location location, short yaw, short pitch, Velocity velocity, InByteBuffer buffer, ProtocolVersion v) {
|
||||
super(id, location, yaw, pitch, velocity);
|
||||
this.metaData = new HorseMetaData(buffer, v);
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ import de.bixilon.minosoft.protocol.protocol.ProtocolVersion;
|
||||
public class IronGolem extends Mob implements MobInterface {
|
||||
MobMetaData metaData;
|
||||
|
||||
public IronGolem(int id, Location location, int yaw, int pitch, Velocity velocity, InByteBuffer buffer, ProtocolVersion v) {
|
||||
public IronGolem(int id, Location location, short yaw, short pitch, Velocity velocity, InByteBuffer buffer, ProtocolVersion v) {
|
||||
super(id, location, yaw, pitch, velocity);
|
||||
this.metaData = new MobMetaData(buffer, v);
|
||||
}
|
||||
|
@ -21,7 +21,7 @@ import de.bixilon.minosoft.protocol.protocol.ProtocolVersion;
|
||||
|
||||
public class MagmaCube extends Slime {
|
||||
|
||||
public MagmaCube(int id, Location location, int yaw, int pitch, Velocity velocity, InByteBuffer buffer, ProtocolVersion v) {
|
||||
public MagmaCube(int id, Location location, short yaw, short pitch, Velocity velocity, InByteBuffer buffer, ProtocolVersion v) {
|
||||
super(id, location, yaw, pitch, velocity, buffer, v);
|
||||
}
|
||||
|
||||
|
@ -22,7 +22,7 @@ import de.bixilon.minosoft.protocol.protocol.ProtocolVersion;
|
||||
public class Mooshroom extends Mob implements MobInterface {
|
||||
AgeableMetaData metaData;
|
||||
|
||||
public Mooshroom(int id, Location location, int yaw, int pitch, Velocity velocity, InByteBuffer buffer, ProtocolVersion v) {
|
||||
public Mooshroom(int id, Location location, short yaw, short pitch, Velocity velocity, InByteBuffer buffer, ProtocolVersion v) {
|
||||
super(id, location, yaw, pitch, velocity);
|
||||
this.metaData = new AgeableMetaData(buffer, v);
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ import de.bixilon.minosoft.protocol.protocol.ProtocolVersion;
|
||||
public class Ocelot extends Mob implements MobInterface {
|
||||
OcelotMetaData metaData;
|
||||
|
||||
public Ocelot(int id, Location location, int yaw, int pitch, Velocity velocity, InByteBuffer buffer, ProtocolVersion v) {
|
||||
public Ocelot(int id, Location location, short yaw, short pitch, Velocity velocity, InByteBuffer buffer, ProtocolVersion v) {
|
||||
super(id, location, yaw, pitch, velocity);
|
||||
this.metaData = new OcelotMetaData(buffer, v);
|
||||
}
|
||||
|
@ -29,7 +29,7 @@ public class OtherPlayer extends Mob implements MobInterface {
|
||||
HumanMetaData metaData;
|
||||
Pose status = Pose.STANDING;
|
||||
|
||||
public OtherPlayer(int id, String name, UUID uuid, PlayerPropertyData[] properties, Location location, Velocity velocity, int yaw, int pitch, short currentItem, HumanMetaData metaData) {
|
||||
public OtherPlayer(int id, String name, UUID uuid, PlayerPropertyData[] properties, Location location, Velocity velocity, short yaw, short pitch, short currentItem, HumanMetaData metaData) {
|
||||
super(id, location, yaw, pitch, velocity);
|
||||
this.name = name;
|
||||
this.uuid = uuid;
|
||||
|
@ -23,7 +23,7 @@ import de.bixilon.minosoft.protocol.protocol.ProtocolVersion;
|
||||
public class Pig extends Mob implements MobInterface {
|
||||
PigMetaData metaData;
|
||||
|
||||
public Pig(int id, Location location, int yaw, int pitch, Velocity velocity, InByteBuffer buffer, ProtocolVersion v) {
|
||||
public Pig(int id, Location location, short yaw, short pitch, Velocity velocity, InByteBuffer buffer, ProtocolVersion v) {
|
||||
super(id, location, yaw, pitch, velocity);
|
||||
this.metaData = new PigMetaData(buffer, v);
|
||||
}
|
||||
|
@ -23,7 +23,7 @@ import de.bixilon.minosoft.protocol.protocol.ProtocolVersion;
|
||||
public class Sheep extends Mob implements MobInterface {
|
||||
SheepMetaData metaData;
|
||||
|
||||
public Sheep(int id, Location location, int yaw, int pitch, Velocity velocity, InByteBuffer buffer, ProtocolVersion v) {
|
||||
public Sheep(int id, Location location, short yaw, short pitch, Velocity velocity, InByteBuffer buffer, ProtocolVersion v) {
|
||||
super(id, location, yaw, pitch, velocity);
|
||||
this.metaData = new SheepMetaData(buffer, v);
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ import de.bixilon.minosoft.protocol.protocol.ProtocolVersion;
|
||||
public class Silverfish extends Mob implements MobInterface {
|
||||
MobMetaData metaData;
|
||||
|
||||
public Silverfish(int id, Location location, int yaw, int pitch, Velocity velocity, InByteBuffer buffer, ProtocolVersion v) {
|
||||
public Silverfish(int id, Location location, short yaw, short pitch, Velocity velocity, InByteBuffer buffer, ProtocolVersion v) {
|
||||
super(id, location, yaw, pitch, velocity);
|
||||
this.metaData = new MobMetaData(buffer, v);
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ import de.bixilon.minosoft.protocol.protocol.ProtocolVersion;
|
||||
public class Skeleton extends Mob implements MobInterface {
|
||||
SkeletonMetaData metaData;
|
||||
|
||||
public Skeleton(int id, Location location, int yaw, int pitch, Velocity velocity, InByteBuffer buffer, ProtocolVersion v) {
|
||||
public Skeleton(int id, Location location, short yaw, short pitch, Velocity velocity, InByteBuffer buffer, ProtocolVersion v) {
|
||||
super(id, location, yaw, pitch, velocity);
|
||||
this.metaData = new SkeletonMetaData(buffer, v);
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ import de.bixilon.minosoft.protocol.protocol.ProtocolVersion;
|
||||
public class Slime extends Mob implements MobInterface {
|
||||
SlimeMetaData metaData;
|
||||
|
||||
public Slime(int id, Location location, int yaw, int pitch, Velocity velocity, InByteBuffer buffer, ProtocolVersion v) {
|
||||
public Slime(int id, Location location, short yaw, short pitch, Velocity velocity, InByteBuffer buffer, ProtocolVersion v) {
|
||||
super(id, location, yaw, pitch, velocity);
|
||||
this.metaData = new SlimeMetaData(buffer, v);
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ import de.bixilon.minosoft.protocol.protocol.ProtocolVersion;
|
||||
public class SnowGolem extends Mob implements MobInterface {
|
||||
MobMetaData metaData;
|
||||
|
||||
public SnowGolem(int id, Location location, int yaw, int pitch, Velocity velocity, InByteBuffer buffer, ProtocolVersion v) {
|
||||
public SnowGolem(int id, Location location, short yaw, short pitch, Velocity velocity, InByteBuffer buffer, ProtocolVersion v) {
|
||||
super(id, location, yaw, pitch, velocity);
|
||||
this.metaData = new MobMetaData(buffer, v);
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ import de.bixilon.minosoft.protocol.protocol.ProtocolVersion;
|
||||
public class Spider extends Mob implements MobInterface {
|
||||
SpiderMetaData metaData;
|
||||
|
||||
public Spider(int id, Location location, int yaw, int pitch, Velocity velocity, InByteBuffer buffer, ProtocolVersion v) {
|
||||
public Spider(int id, Location location, short yaw, short pitch, Velocity velocity, InByteBuffer buffer, ProtocolVersion v) {
|
||||
super(id, location, yaw, pitch, velocity);
|
||||
this.metaData = new SpiderMetaData(buffer, v);
|
||||
}
|
||||
|
@ -23,7 +23,7 @@ import de.bixilon.minosoft.protocol.protocol.ProtocolVersion;
|
||||
public class Squid extends Mob implements MobInterface {
|
||||
AgeableMetaData metaData;
|
||||
|
||||
public Squid(int id, Location location, int yaw, int pitch, Velocity velocity, InByteBuffer buffer, ProtocolVersion v) {
|
||||
public Squid(int id, Location location, short yaw, short pitch, Velocity velocity, InByteBuffer buffer, ProtocolVersion v) {
|
||||
super(id, location, yaw, pitch, velocity);
|
||||
this.metaData = new AgeableMetaData(buffer, v);
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ import de.bixilon.minosoft.protocol.protocol.ProtocolVersion;
|
||||
public class Villager extends Mob implements MobInterface {
|
||||
VillagerMetaData metaData;
|
||||
|
||||
public Villager(int id, Location location, int yaw, int pitch, Velocity velocity, InByteBuffer buffer, ProtocolVersion v) {
|
||||
public Villager(int id, Location location, short yaw, short pitch, Velocity velocity, InByteBuffer buffer, ProtocolVersion v) {
|
||||
super(id, location, yaw, pitch, velocity);
|
||||
this.metaData = new VillagerMetaData(buffer, v);
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ import de.bixilon.minosoft.protocol.protocol.ProtocolVersion;
|
||||
public class Witch extends Mob implements MobInterface {
|
||||
WitchMetaData metaData;
|
||||
|
||||
public Witch(int id, Location location, int yaw, int pitch, Velocity velocity, InByteBuffer buffer, ProtocolVersion v) {
|
||||
public Witch(int id, Location location, short yaw, short pitch, Velocity velocity, InByteBuffer buffer, ProtocolVersion v) {
|
||||
super(id, location, yaw, pitch, velocity);
|
||||
this.metaData = new WitchMetaData(buffer, v);
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ import de.bixilon.minosoft.protocol.protocol.ProtocolVersion;
|
||||
public class Wither extends Mob implements MobInterface {
|
||||
WitherMetaData metaData;
|
||||
|
||||
public Wither(int id, Location location, int yaw, int pitch, Velocity velocity, InByteBuffer buffer, ProtocolVersion v) {
|
||||
public Wither(int id, Location location, short yaw, short pitch, Velocity velocity, InByteBuffer buffer, ProtocolVersion v) {
|
||||
super(id, location, yaw, pitch, velocity);
|
||||
this.metaData = new WitherMetaData(buffer, v);
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ import de.bixilon.minosoft.protocol.protocol.ProtocolVersion;
|
||||
public class Wolf extends Mob implements MobInterface {
|
||||
WolfMetaData metaData;
|
||||
|
||||
public Wolf(int id, Location location, int yaw, int pitch, Velocity velocity, InByteBuffer buffer, ProtocolVersion v) {
|
||||
public Wolf(int id, Location location, short yaw, short pitch, Velocity velocity, InByteBuffer buffer, ProtocolVersion v) {
|
||||
super(id, location, yaw, pitch, velocity);
|
||||
this.metaData = new WolfMetaData(buffer, v);
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ import de.bixilon.minosoft.protocol.protocol.ProtocolVersion;
|
||||
public class Zombie extends Mob implements MobInterface {
|
||||
ZombieMetaData metaData;
|
||||
|
||||
public Zombie(int id, Location location, int yaw, int pitch, Velocity velocity, InByteBuffer buffer, ProtocolVersion v) {
|
||||
public Zombie(int id, Location location, short yaw, short pitch, Velocity velocity, InByteBuffer buffer, ProtocolVersion v) {
|
||||
super(id, location, yaw, pitch, velocity);
|
||||
this.metaData = new ZombieMetaData(buffer, v);
|
||||
}
|
||||
|
@ -21,7 +21,7 @@ import de.bixilon.minosoft.protocol.protocol.ProtocolVersion;
|
||||
|
||||
public class ZombiePigman extends Zombie {
|
||||
|
||||
public ZombiePigman(int id, Location location, int yaw, int pitch, Velocity velocity, InByteBuffer buffer, ProtocolVersion v) {
|
||||
public ZombiePigman(int id, Location location, short yaw, short pitch, Velocity velocity, InByteBuffer buffer, ProtocolVersion v) {
|
||||
super(id, location, yaw, pitch, velocity, buffer, v);
|
||||
}
|
||||
|
||||
|
@ -25,10 +25,9 @@ public class Arrow extends EntityObject implements ObjectInterface {
|
||||
ArrowMetaData metaData;
|
||||
int shooter;
|
||||
|
||||
public Arrow(int id, Location location, int yaw, int pitch, int additionalInt, ProtocolVersion v) {
|
||||
public Arrow(int id, Location location, short yaw, short pitch, int additionalInt, ProtocolVersion v) {
|
||||
super(id, location, yaw, pitch, null);
|
||||
// objects do not spawn with metadata... reading additional info from the following int
|
||||
// tnt does not have any additional info
|
||||
this.shooter = additionalInt;
|
||||
}
|
||||
|
||||
|
@ -24,7 +24,7 @@ import de.bixilon.minosoft.protocol.protocol.ProtocolVersion;
|
||||
public class Boat extends EntityObject implements ObjectInterface {
|
||||
BoatMetaData metaData;
|
||||
|
||||
public Boat(int id, Location location, int yaw, int pitch, int additionalInt, ProtocolVersion v) {
|
||||
public Boat(int id, Location location, short yaw, short pitch, int additionalInt, ProtocolVersion v) {
|
||||
super(id, location, yaw, pitch, null);
|
||||
// objects do not spawn with metadata... reading additional info from the following int
|
||||
// boat does not have any additional info
|
||||
|
@ -24,10 +24,9 @@ public class Egg extends EntityObject implements ObjectInterface {
|
||||
EntityMetaData metaData;
|
||||
int thrower;
|
||||
|
||||
public Egg(int id, Location location, int yaw, int pitch, int additionalInt, ProtocolVersion v) {
|
||||
public Egg(int id, Location location, short yaw, short pitch, int additionalInt, ProtocolVersion v) {
|
||||
super(id, location, yaw, pitch, null);
|
||||
// objects do not spawn with metadata... reading additional info from the following int
|
||||
// tnt does not have any additional info
|
||||
this.thrower = additionalInt;
|
||||
}
|
||||
|
||||
|
@ -24,10 +24,9 @@ import de.bixilon.minosoft.protocol.protocol.ProtocolVersion;
|
||||
public class EnderCrystal extends EntityObject implements ObjectInterface {
|
||||
EnderCrystalMetaData metaData;
|
||||
|
||||
public EnderCrystal(int id, Location location, int yaw, int pitch, int additionalInt, ProtocolVersion v) {
|
||||
public EnderCrystal(int id, Location location, short yaw, short pitch, int additionalInt, ProtocolVersion v) {
|
||||
super(id, location, yaw, pitch, null);
|
||||
// objects do not spawn with metadata... reading additional info from the following int
|
||||
// tnt does not have any additional info
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -23,10 +23,9 @@ import de.bixilon.minosoft.protocol.protocol.ProtocolVersion;
|
||||
public class Enderpearl extends EntityObject implements ObjectInterface {
|
||||
EntityMetaData metaData;
|
||||
|
||||
public Enderpearl(int id, Location location, int yaw, int pitch, int additionalInt, ProtocolVersion v) {
|
||||
public Enderpearl(int id, Location location, short yaw, short pitch, int additionalInt, ProtocolVersion v) {
|
||||
super(id, location, yaw, pitch, null);
|
||||
// objects do not spawn with metadata... reading additional info from the following int
|
||||
// tnt does not have any additional info
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -23,10 +23,9 @@ import de.bixilon.minosoft.protocol.protocol.ProtocolVersion;
|
||||
public class EyeOfEnder extends EntityObject implements ObjectInterface {
|
||||
EntityMetaData metaData;
|
||||
|
||||
public EyeOfEnder(int id, Location location, int yaw, int pitch, int additionalInt, ProtocolVersion v) {
|
||||
public EyeOfEnder(int id, Location location, short yaw, short pitch, int additionalInt, ProtocolVersion v) {
|
||||
super(id, location, yaw, pitch, null);
|
||||
// objects do not spawn with metadata... reading additional info from the following int
|
||||
// tnt does not have any additional info
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -25,10 +25,9 @@ public class FallingBlock extends EntityObject implements ObjectInterface {
|
||||
EntityMetaData metaData;
|
||||
Blocks block;
|
||||
|
||||
public FallingBlock(int id, Location location, int yaw, int pitch, int additionalInt, ProtocolVersion v) {
|
||||
public FallingBlock(int id, Location location, short yaw, short pitch, int additionalInt, ProtocolVersion v) {
|
||||
super(id, location, yaw, pitch, null);
|
||||
// objects do not spawn with metadata... reading additional info from the following int
|
||||
// tnt does not have any additional info
|
||||
block = Blocks.byLegacy(additionalInt & 0xFFF, additionalInt >> 12);
|
||||
}
|
||||
|
||||
|
@ -23,10 +23,9 @@ import de.bixilon.minosoft.protocol.protocol.ProtocolVersion;
|
||||
public class FallingDragonEgg extends EntityObject implements ObjectInterface {
|
||||
EntityMetaData metaData;
|
||||
|
||||
public FallingDragonEgg(int id, Location location, int yaw, int pitch, int additionalInt, ProtocolVersion v) {
|
||||
public FallingDragonEgg(int id, Location location, short yaw, short pitch, int additionalInt, ProtocolVersion v) {
|
||||
super(id, location, yaw, pitch, null);
|
||||
// objects do not spawn with metadata... reading additional info from the following int
|
||||
// tnt does not have any additional info
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -24,10 +24,9 @@ public class FireBall extends EntityObject implements ObjectInterface {
|
||||
EntityMetaData metaData;
|
||||
int thrower;
|
||||
|
||||
public FireBall(int id, Location location, int yaw, int pitch, int additionalInt, ProtocolVersion v) {
|
||||
public FireBall(int id, Location location, short yaw, short pitch, int additionalInt, ProtocolVersion v) {
|
||||
super(id, location, yaw, pitch, null);
|
||||
// objects do not spawn with metadata... reading additional info from the following int
|
||||
// tnt does not have any additional info
|
||||
this.thrower = additionalInt;
|
||||
}
|
||||
|
||||
|
@ -24,10 +24,9 @@ public class FireCharge extends EntityObject implements ObjectInterface {
|
||||
EntityMetaData metaData;
|
||||
int thrower;
|
||||
|
||||
public FireCharge(int id, Location location, int yaw, int pitch, int additionalInt, ProtocolVersion v) {
|
||||
public FireCharge(int id, Location location, short yaw, short pitch, int additionalInt, ProtocolVersion v) {
|
||||
super(id, location, yaw, pitch, null);
|
||||
// objects do not spawn with metadata... reading additional info from the following int
|
||||
// tnt does not have any additional info
|
||||
this.thrower = additionalInt;
|
||||
}
|
||||
|
||||
|
@ -24,10 +24,9 @@ import de.bixilon.minosoft.protocol.protocol.ProtocolVersion;
|
||||
public class Firework extends EntityObject implements ObjectInterface {
|
||||
FireworkMetaData metaData;
|
||||
|
||||
public Firework(int id, Location location, int yaw, int pitch, int additionalInt, ProtocolVersion v) {
|
||||
public Firework(int id, Location location, short yaw, short pitch, int additionalInt, ProtocolVersion v) {
|
||||
super(id, location, yaw, pitch, null);
|
||||
// objects do not spawn with metadata... reading additional info from the following int
|
||||
// tnt does not have any additional info
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -24,10 +24,9 @@ public class FishingFloat extends EntityObject implements ObjectInterface {
|
||||
EntityMetaData metaData;
|
||||
int owner;
|
||||
|
||||
public FishingFloat(int id, Location location, int yaw, int pitch, int additionalInt, ProtocolVersion v) {
|
||||
public FishingFloat(int id, Location location, short yaw, short pitch, int additionalInt, ProtocolVersion v) {
|
||||
super(id, location, yaw, pitch, null);
|
||||
// objects do not spawn with metadata... reading additional info from the following int
|
||||
// tnt does not have any additional info
|
||||
this.owner = additionalInt;
|
||||
}
|
||||
|
||||
|
@ -25,10 +25,9 @@ public class ItemFrame extends EntityObject implements ObjectInterface {
|
||||
ItemFrameMetaData metaData;
|
||||
FrameDirection direction;
|
||||
|
||||
public ItemFrame(int id, Location location, int yaw, int pitch, int additionalInt, ProtocolVersion v) {
|
||||
public ItemFrame(int id, Location location, short yaw, short pitch, int additionalInt, ProtocolVersion v) {
|
||||
super(id, location, yaw, pitch, null);
|
||||
// objects do not spawn with metadata... reading additional info from the following int
|
||||
// tnt does not have any additional info
|
||||
direction = FrameDirection.byId(additionalInt);
|
||||
}
|
||||
|
||||
|
@ -24,10 +24,10 @@ import de.bixilon.minosoft.protocol.protocol.ProtocolVersion;
|
||||
public class ItemStack extends EntityObject implements ObjectInterface {
|
||||
ItemMetaData metaData;
|
||||
|
||||
public ItemStack(int id, Location location, int yaw, int pitch, int additionalInt, ProtocolVersion v) {
|
||||
public ItemStack(int id, Location location, short yaw, short pitch, int additionalInt, ProtocolVersion v) {
|
||||
super(id, location, yaw, pitch, null);
|
||||
// objects do not spawn with metadata... reading additional info from the following int
|
||||
// tnt does not have any additional info
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -23,10 +23,9 @@ import de.bixilon.minosoft.protocol.protocol.ProtocolVersion;
|
||||
public class LeashKnot extends EntityObject implements ObjectInterface {
|
||||
EntityMetaData metaData;
|
||||
|
||||
public LeashKnot(int id, Location location, int yaw, int pitch, int additionalInt, ProtocolVersion v) {
|
||||
public LeashKnot(int id, Location location, short yaw, short pitch, int additionalInt, ProtocolVersion v) {
|
||||
super(id, location, yaw, pitch, null);
|
||||
// objects do not spawn with metadata... reading additional info from the following int
|
||||
// tnt does not have any additional info
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -25,7 +25,7 @@ public class Minecart extends EntityObject implements ObjectInterface {
|
||||
MinecartType type;
|
||||
MinecartMetaData metaData;
|
||||
|
||||
public Minecart(int id, Location location, int yaw, int pitch, int additionalInt, ProtocolVersion v) {
|
||||
public Minecart(int id, Location location, short yaw, short pitch, int additionalInt, ProtocolVersion v) {
|
||||
super(id, location, yaw, pitch, null);
|
||||
type = MinecartType.byType(additionalInt);
|
||||
}
|
||||
|
@ -23,10 +23,9 @@ import de.bixilon.minosoft.protocol.protocol.ProtocolVersion;
|
||||
public class PrimedTNT extends EntityObject implements ObjectInterface {
|
||||
EntityMetaData metaData;
|
||||
|
||||
public PrimedTNT(int id, Location location, int yaw, int pitch, int additionalInt, ProtocolVersion v) {
|
||||
public PrimedTNT(int id, Location location, short yaw, short pitch, int additionalInt, ProtocolVersion v) {
|
||||
super(id, location, yaw, pitch, null);
|
||||
// objects do not spawn with metadata... reading additional info from the following int
|
||||
// tnt does not have any additional info
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -24,10 +24,9 @@ public class Snowball extends EntityObject implements ObjectInterface {
|
||||
EntityMetaData metaData;
|
||||
int thrower;
|
||||
|
||||
public Snowball(int id, Location location, int yaw, int pitch, int additionalInt, ProtocolVersion v) {
|
||||
public Snowball(int id, Location location, short yaw, short pitch, int additionalInt, ProtocolVersion v) {
|
||||
super(id, location, yaw, pitch, null);
|
||||
// objects do not spawn with metadata... reading additional info from the following int
|
||||
// tnt does not have any additional info
|
||||
this.thrower = additionalInt;
|
||||
}
|
||||
|
||||
|
@ -23,10 +23,9 @@ import de.bixilon.minosoft.protocol.protocol.ProtocolVersion;
|
||||
public class ThrownExpBottle extends EntityObject implements ObjectInterface {
|
||||
EntityMetaData metaData;
|
||||
|
||||
public ThrownExpBottle(int id, Location location, int yaw, int pitch, int additionalInt, ProtocolVersion v) {
|
||||
public ThrownExpBottle(int id, Location location, short yaw, short pitch, int additionalInt, ProtocolVersion v) {
|
||||
super(id, location, yaw, pitch, null);
|
||||
// objects do not spawn with metadata... reading additional info from the following int
|
||||
// tnt does not have any additional info
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -24,10 +24,9 @@ public class ThrownPotion extends EntityObject implements ObjectInterface {
|
||||
EntityMetaData metaData;
|
||||
int potion; //ToDo
|
||||
|
||||
public ThrownPotion(int id, Location location, int yaw, int pitch, int additionalInt, ProtocolVersion v) {
|
||||
public ThrownPotion(int id, Location location, short yaw, short pitch, int additionalInt, ProtocolVersion v) {
|
||||
super(id, location, yaw, pitch, null);
|
||||
// objects do not spawn with metadata... reading additsional info from the following int
|
||||
// tnt does not have any additional info
|
||||
this.potion = additionalInt;
|
||||
}
|
||||
|
||||
|
@ -24,10 +24,9 @@ public class WitherSkull extends EntityObject implements ObjectInterface {
|
||||
EntityMetaData metaData;
|
||||
int thrower;
|
||||
|
||||
public WitherSkull(int id, Location location, int yaw, int pitch, int additionalInt, ProtocolVersion v) {
|
||||
public WitherSkull(int id, Location location, short yaw, short pitch, int additionalInt, ProtocolVersion v) {
|
||||
super(id, location, yaw, pitch, null);
|
||||
// objects do not spawn with metadata... reading additional info from the following int
|
||||
// tnt does not have any additional info
|
||||
this.thrower = additionalInt;
|
||||
}
|
||||
|
||||
|
@ -22,14 +22,14 @@ import de.bixilon.minosoft.protocol.protocol.ProtocolVersion;
|
||||
|
||||
public class PacketEntityHeadRotation implements ClientboundPacket {
|
||||
int entityId;
|
||||
int headYaw;
|
||||
short headYaw;
|
||||
|
||||
@Override
|
||||
public void read(InPacketBuffer buffer, ProtocolVersion v) {
|
||||
switch (v) {
|
||||
case VERSION_1_7_10:
|
||||
this.entityId = buffer.readInteger();
|
||||
this.headYaw = buffer.readByte();
|
||||
this.headYaw = buffer.readAngle();
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -44,7 +44,7 @@ public class PacketEntityHeadRotation implements ClientboundPacket {
|
||||
}
|
||||
|
||||
|
||||
public int getHeadYaw() {
|
||||
public short getHeadYaw() {
|
||||
return headYaw;
|
||||
}
|
||||
|
||||
|
@ -24,8 +24,8 @@ import de.bixilon.minosoft.protocol.protocol.ProtocolVersion;
|
||||
public class PacketEntityPositionAndRotation implements ClientboundPacket {
|
||||
int entityId;
|
||||
RelativeLocation location;
|
||||
int yaw;
|
||||
int pitch;
|
||||
short yaw;
|
||||
short pitch;
|
||||
|
||||
@Override
|
||||
public void read(InPacketBuffer buffer, ProtocolVersion v) {
|
||||
@ -33,8 +33,8 @@ public class PacketEntityPositionAndRotation implements ClientboundPacket {
|
||||
case VERSION_1_7_10:
|
||||
this.entityId = buffer.readInteger();
|
||||
this.location = new RelativeLocation(buffer.readFixedPointNumberByte(), buffer.readFixedPointNumberByte(), buffer.readFixedPointNumberByte());
|
||||
this.yaw = buffer.readByte(); //ToDo dividing, ...
|
||||
this.pitch = buffer.readByte();
|
||||
this.yaw = buffer.readAngle();
|
||||
this.pitch = buffer.readAngle();
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -52,11 +52,11 @@ public class PacketEntityPositionAndRotation implements ClientboundPacket {
|
||||
return location;
|
||||
}
|
||||
|
||||
public int getYaw() {
|
||||
public short getYaw() {
|
||||
return yaw;
|
||||
}
|
||||
|
||||
public int getPitch() {
|
||||
public short getPitch() {
|
||||
return pitch;
|
||||
}
|
||||
|
||||
|
@ -22,16 +22,16 @@ import de.bixilon.minosoft.protocol.protocol.ProtocolVersion;
|
||||
|
||||
public class PacketEntityRotation implements ClientboundPacket {
|
||||
int entityId;
|
||||
int yaw;
|
||||
int pitch;
|
||||
short yaw;
|
||||
short pitch;
|
||||
|
||||
@Override
|
||||
public void read(InPacketBuffer buffer, ProtocolVersion v) {
|
||||
switch (v) {
|
||||
case VERSION_1_7_10:
|
||||
this.entityId = buffer.readInteger();
|
||||
this.yaw = buffer.readByte();
|
||||
this.pitch = buffer.readByte();
|
||||
this.yaw = buffer.readAngle();
|
||||
this.pitch = buffer.readAngle();
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -46,11 +46,11 @@ public class PacketEntityRotation implements ClientboundPacket {
|
||||
}
|
||||
|
||||
|
||||
public int getYaw() {
|
||||
public short getYaw() {
|
||||
return yaw;
|
||||
}
|
||||
|
||||
public int getPitch() {
|
||||
public short getPitch() {
|
||||
return pitch;
|
||||
}
|
||||
|
||||
|
@ -24,8 +24,8 @@ import de.bixilon.minosoft.protocol.protocol.ProtocolVersion;
|
||||
public class PacketEntityTeleport implements ClientboundPacket {
|
||||
int entityId;
|
||||
Location location;
|
||||
int yaw;
|
||||
int pitch;
|
||||
short yaw;
|
||||
short pitch;
|
||||
|
||||
@Override
|
||||
public void read(InPacketBuffer buffer, ProtocolVersion v) {
|
||||
@ -33,8 +33,8 @@ public class PacketEntityTeleport implements ClientboundPacket {
|
||||
case VERSION_1_7_10:
|
||||
this.entityId = buffer.readInteger();
|
||||
this.location = new Location(buffer.readFixedPointNumberInteger(), buffer.readFixedPointNumberInteger(), buffer.readFixedPointNumberInteger());
|
||||
this.yaw = buffer.readByte();
|
||||
this.pitch = buffer.readByte();
|
||||
this.yaw = buffer.readAngle();
|
||||
this.pitch = buffer.readAngle();
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -52,11 +52,11 @@ public class PacketEntityTeleport implements ClientboundPacket {
|
||||
return location;
|
||||
}
|
||||
|
||||
public int getYaw() {
|
||||
public short getYaw() {
|
||||
return yaw;
|
||||
}
|
||||
|
||||
public int getPitch() {
|
||||
public short getPitch() {
|
||||
return pitch;
|
||||
}
|
||||
|
||||
|
@ -36,14 +36,14 @@ public class PacketSpawnMob implements ClientboundPacket {
|
||||
int entityId = buffer.readVarInt();
|
||||
Mobs type = Mobs.byType(buffer.readByte());
|
||||
Location location = new Location(buffer.readFixedPointNumberInteger(), buffer.readFixedPointNumberInteger(), buffer.readFixedPointNumberInteger());
|
||||
int yaw = buffer.readByte();
|
||||
int pitch = buffer.readByte();
|
||||
int headPitch = buffer.readByte();
|
||||
short yaw = buffer.readAngle();
|
||||
short pitch = buffer.readAngle();
|
||||
int headpitch = buffer.readAngle();
|
||||
Velocity velocity = new Velocity(buffer.readShort(), buffer.readShort(), buffer.readShort());
|
||||
|
||||
assert type != null;
|
||||
try {
|
||||
mob = type.getClazz().getConstructor(int.class, Location.class, int.class, int.class, Velocity.class, InByteBuffer.class, ProtocolVersion.class).newInstance(entityId, location, yaw, pitch, velocity, buffer, v);
|
||||
mob = type.getClazz().getConstructor(int.class, Location.class, short.class, short.class, Velocity.class, InByteBuffer.class, ProtocolVersion.class).newInstance(entityId, location, yaw, pitch, velocity, buffer, v);
|
||||
} catch (InstantiationException | IllegalAccessException | InvocationTargetException | NoSuchMethodException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
@ -34,12 +34,12 @@ public class PacketSpawnObject implements ClientboundPacket {
|
||||
int entityId = buffer.readVarInt();
|
||||
Objects type = Objects.byType(buffer.readByte());
|
||||
Location location = new Location(buffer.readFixedPointNumberInteger(), buffer.readFixedPointNumberInteger(), buffer.readFixedPointNumberInteger());
|
||||
int pitch = buffer.readByte();
|
||||
int yaw = buffer.readByte();
|
||||
short pitch = buffer.readAngle();
|
||||
short yaw = buffer.readAngle();
|
||||
|
||||
assert type != null;
|
||||
try {
|
||||
object = type.getClazz().getConstructor(int.class, Location.class, int.class, int.class, int.class, ProtocolVersion.class).newInstance(entityId, location, yaw, pitch, buffer.readInteger(), v);
|
||||
object = type.getClazz().getConstructor(int.class, Location.class, short.class, short.class, int.class, ProtocolVersion.class).newInstance(entityId, location, yaw, pitch, buffer.readInteger(), v);
|
||||
} catch (InstantiationException | IllegalAccessException | InvocationTargetException | NoSuchMethodException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
@ -42,8 +42,8 @@ public class PacketSpawnPlayer implements ClientboundPacket {
|
||||
properties[i] = new PlayerPropertyData(buffer.readString(), buffer.readString(), buffer.readString());
|
||||
}
|
||||
Location location = new Location(buffer.readFixedPointNumberInteger(), buffer.readFixedPointNumberInteger(), buffer.readFixedPointNumberInteger());
|
||||
int yaw = buffer.readByte();
|
||||
int pitch = buffer.readByte();
|
||||
short yaw = buffer.readAngle();
|
||||
short pitch = buffer.readAngle();
|
||||
|
||||
short currentItem = buffer.readShort();
|
||||
HumanMetaData metaData = new HumanMetaData(buffer, v);
|
||||
|
@ -13,15 +13,15 @@
|
||||
|
||||
package de.bixilon.minosoft.protocol.protocol;
|
||||
|
||||
import de.bixilon.minosoft.game.datatypes.world.BlockPosition;
|
||||
import de.bixilon.minosoft.game.datatypes.TextComponent;
|
||||
import de.bixilon.minosoft.game.datatypes.Direction;
|
||||
import de.bixilon.minosoft.game.datatypes.Slot;
|
||||
import de.bixilon.minosoft.game.datatypes.TextComponent;
|
||||
import de.bixilon.minosoft.game.datatypes.entities.Pose;
|
||||
import de.bixilon.minosoft.game.datatypes.particle.BlockParticle;
|
||||
import de.bixilon.minosoft.game.datatypes.particle.OtherParticles;
|
||||
import de.bixilon.minosoft.game.datatypes.particle.Particle;
|
||||
import de.bixilon.minosoft.game.datatypes.particle.Particles;
|
||||
import de.bixilon.minosoft.game.datatypes.world.BlockPosition;
|
||||
import de.bixilon.minosoft.nbt.tag.CompoundTag;
|
||||
import de.bixilon.minosoft.nbt.tag.TagTypes;
|
||||
import de.bixilon.minosoft.util.Util;
|
||||
@ -195,6 +195,10 @@ public class InByteBuffer {
|
||||
return this.pos;
|
||||
}
|
||||
|
||||
public void setPosition(int pos) {
|
||||
this.pos = pos;
|
||||
}
|
||||
|
||||
public int getLength() {
|
||||
return bytes.length;
|
||||
}
|
||||
@ -203,7 +207,6 @@ public class InByteBuffer {
|
||||
return bytes.length - pos;
|
||||
}
|
||||
|
||||
|
||||
public Direction readDirection() {
|
||||
return Direction.byId(readVarInt());
|
||||
}
|
||||
@ -227,10 +230,6 @@ public class InByteBuffer {
|
||||
return null;
|
||||
}
|
||||
|
||||
public void setPosition(int pos) {
|
||||
this.pos = pos;
|
||||
}
|
||||
|
||||
public CompoundTag readNBT() {
|
||||
|
||||
if (readByte() != TagTypes.COMPOUND.getId()) { // will be a Compound Tag
|
||||
@ -281,4 +280,8 @@ public class InByteBuffer {
|
||||
public String getBase64() {
|
||||
return getBase64(getPosition(), getBytesLeft());
|
||||
}
|
||||
|
||||
public short readAngle() {
|
||||
return (short) (readByte() * ProtocolDefinition.ANGLE_CALCULATION_CONSTANT);
|
||||
}
|
||||
}
|
||||
|
@ -17,4 +17,5 @@ public final class ProtocolDefinition {
|
||||
public static final int STRING_MAX_LEN = 32767;
|
||||
public static final int DEFAULT_PORT = 25565;
|
||||
public static final int PROTOCOL_PACKET_MAX_SIZE = 2097152;
|
||||
public static final float ANGLE_CALCULATION_CONSTANT = 360.0F / 256.0F;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user