Update to Minecraft 1.14-pre5

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2019-04-23 12:00:00 +10:00
parent 0e98365784
commit a0f2b74c8d
560 changed files with 10642 additions and 10867 deletions

View File

@@ -15,10 +15,10 @@
+
public class EntityBoat extends Entity {
private static final DataWatcherObject<Integer> a = DataWatcher.a(EntityBoat.class, DataWatcherRegistry.b);
private static final DataWatcherObject<Integer> b = DataWatcher.a(EntityBoat.class, DataWatcherRegistry.b);
@@ -37,6 +46,14 @@
private float aR;
private float aS;
private float aO;
private float aP;
+ // CraftBukkit start
+ // PAIL: Some of these haven't worked since a few updates, and since 1.9 they are less and less applicable.
@@ -28,10 +28,10 @@
+ public boolean landBoats = false;
+ // CraftBukkit end
+
public EntityBoat(World world) {
super(EntityTypes.BOAT, world);
this.h = new float[2];
@@ -94,6 +111,19 @@
public EntityBoat(EntityTypes<? extends EntityBoat> entitytypes, World world) {
super(entitytypes, world);
this.as = new float[2];
@@ -98,6 +115,19 @@
if (damagesource instanceof EntityDamageSourceIndirect && damagesource.getEntity() != null && this.w(damagesource.getEntity())) {
return false;
} else {
@@ -50,11 +50,11 @@
+
this.c(-this.o());
this.b(10);
this.setDamage(this.m() + f * 10.0F);
@@ -101,6 +131,15 @@
this.setDamage(this.getDamage() + f * 10.0F);
@@ -105,6 +135,15 @@
boolean flag = damagesource.getEntity() instanceof EntityHuman && ((EntityHuman) damagesource.getEntity()).abilities.canInstantlyBuild;
if (flag || this.m() > 40.0F) {
if (flag || this.getDamage() > 40.0F) {
+ // CraftBukkit start
+ VehicleDestroyEvent destroyEvent = new VehicleDestroyEvent(vehicle, attacker);
+ this.world.getServer().getPluginManager().callEvent(destroyEvent);
@@ -67,7 +67,7 @@
if (!flag && this.world.getGameRules().getBoolean("doEntityDrops")) {
this.a((IMaterial) this.f());
}
@@ -134,9 +173,25 @@
@@ -140,9 +179,25 @@
public void collide(Entity entity) {
if (entity instanceof EntityBoat) {
if (entity.getBoundingBox().minY < this.getBoundingBox().maxY) {
@@ -93,16 +93,16 @@
super.collide(entity);
}
@@ -168,6 +223,7 @@
@@ -176,6 +231,7 @@
return this.getDirection().e();
}
+ private Location lastLocation; // CraftBukkit
@Override
public void tick() {
this.aM = this.aL;
this.aL = this.s();
@@ -212,6 +268,22 @@
this.motZ = 0.0D;
this.aJ = this.aI;
@@ -219,6 +275,22 @@
this.setMot(Vec3D.a);
}
+ // CraftBukkit start
@@ -124,9 +124,9 @@
this.q();
for (int i = 0; i <= 1; ++i) {
@@ -730,6 +802,11 @@
@@ -740,6 +812,11 @@
this.c(this.fallDistance, 1.0F);
this.b(this.fallDistance, 1.0F);
if (!this.world.isClientSide && !this.dead) {
+ // CraftBukkit start
+ Vehicle vehicle = (Vehicle) this.getBukkitEntity();
@@ -136,7 +136,7 @@
this.die();
if (this.world.getGameRules().getBoolean("doEntityDrops")) {
int i;
@@ -743,6 +820,7 @@
@@ -753,6 +830,7 @@
}
}
}