mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-16 20:53:54 -07:00
Update for Minecraft 1.8
This commit is contained in:
@@ -49,26 +49,26 @@ public class EntityBoat extends Entity {
|
||||
this.damage = 0;
|
||||
this.b = 0;
|
||||
this.c = 1;
|
||||
this.aI = true;
|
||||
this.aY = true;
|
||||
this.b(1.5F, 0.6F);
|
||||
this.height = this.width / 2.0F;
|
||||
}
|
||||
|
||||
protected boolean n() {
|
||||
protected boolean e_() {
|
||||
return false;
|
||||
}
|
||||
|
||||
protected void b() {}
|
||||
|
||||
public AxisAlignedBB a_(Entity entity) {
|
||||
public AxisAlignedBB b(Entity entity) {
|
||||
return entity.boundingBox;
|
||||
}
|
||||
|
||||
public AxisAlignedBB e_() {
|
||||
public AxisAlignedBB f() {
|
||||
return this.boundingBox;
|
||||
}
|
||||
|
||||
public boolean d_() {
|
||||
public boolean g() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -85,15 +85,15 @@ public class EntityBoat extends Entity {
|
||||
this.world.getServer().getPluginManager().callEvent(new VehicleCreateEvent((Vehicle) this.getBukkitEntity())); // CraftBukkit
|
||||
}
|
||||
|
||||
public double m() {
|
||||
public double n() {
|
||||
return (double) this.width * 0.0D - 0.30000001192092896D;
|
||||
}
|
||||
|
||||
public boolean damageEntity(Entity entity, int i) {
|
||||
public boolean damageEntity(DamageSource damagesource, int i) {
|
||||
if (!this.world.isStatic && !this.dead) {
|
||||
// CraftBukkit start
|
||||
Vehicle vehicle = (Vehicle) this.getBukkitEntity();
|
||||
org.bukkit.entity.Entity attacker = (entity == null) ? null : entity.getBukkitEntity();
|
||||
org.bukkit.entity.Entity attacker = (damagesource.a() == null) ? null : damagesource.a().getBukkitEntity();
|
||||
|
||||
VehicleDamageEvent event = new VehicleDamageEvent(vehicle, attacker, i);
|
||||
this.world.getServer().getPluginManager().callEvent(event);
|
||||
@@ -107,7 +107,7 @@ public class EntityBoat extends Entity {
|
||||
this.c = -this.c;
|
||||
this.b = 10;
|
||||
this.damage += i * 10;
|
||||
this.af();
|
||||
this.aq();
|
||||
if (this.damage > 40) {
|
||||
|
||||
// CraftBukkit start
|
||||
@@ -143,11 +143,11 @@ public class EntityBoat extends Entity {
|
||||
}
|
||||
}
|
||||
|
||||
public boolean l_() {
|
||||
public boolean r_() {
|
||||
return !this.dead;
|
||||
}
|
||||
|
||||
public void m_() {
|
||||
public void s_() {
|
||||
// CraftBukkit start
|
||||
double prevX = this.locX;
|
||||
double prevY = this.locY;
|
||||
@@ -156,7 +156,7 @@ public class EntityBoat extends Entity {
|
||||
float prevPitch = this.pitch;
|
||||
// CraftBukkit end
|
||||
|
||||
super.m_();
|
||||
super.s_();
|
||||
if (this.b > 0) {
|
||||
--this.b;
|
||||
}
|
||||
@@ -358,7 +358,7 @@ public class EntityBoat extends Entity {
|
||||
for (l = 0; l < list.size(); ++l) {
|
||||
Entity entity = (Entity) list.get(l);
|
||||
|
||||
if (entity != this.passenger && entity.d_() && entity instanceof EntityBoat) {
|
||||
if (entity != this.passenger && entity.g() && entity instanceof EntityBoat) {
|
||||
entity.collide(this);
|
||||
}
|
||||
}
|
||||
@@ -381,12 +381,12 @@ public class EntityBoat extends Entity {
|
||||
}
|
||||
}
|
||||
|
||||
public void f() {
|
||||
public void g_() {
|
||||
if (this.passenger != null) {
|
||||
double d0 = Math.cos((double) this.yaw * 3.141592653589793D / 180.0D) * 0.4D;
|
||||
double d1 = Math.sin((double) this.yaw * 3.141592653589793D / 180.0D) * 0.4D;
|
||||
|
||||
this.passenger.setPosition(this.locX + d0, this.locY + this.m() + this.passenger.I(), this.locZ + d1);
|
||||
this.passenger.setPosition(this.locX + d0, this.locY + this.n() + this.passenger.M(), this.locZ + d1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -394,7 +394,7 @@ public class EntityBoat extends Entity {
|
||||
|
||||
protected void a(NBTTagCompound nbttagcompound) {}
|
||||
|
||||
public boolean a(EntityHuman entityhuman) {
|
||||
public boolean b(EntityHuman entityhuman) {
|
||||
if (this.passenger != null && this.passenger instanceof EntityHuman && this.passenger != entityhuman) {
|
||||
return true;
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user