@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/entity/vehicle/EntityBoat.java
|
||||
+++ b/net/minecraft/world/entity/vehicle/EntityBoat.java
|
||||
@@ -54,6 +54,15 @@
|
||||
@@ -55,6 +55,16 @@
|
||||
import net.minecraft.world.phys.shapes.VoxelShape;
|
||||
import net.minecraft.world.phys.shapes.VoxelShapes;
|
||||
|
||||
@@ -8,17 +8,18 @@
|
||||
+import org.bukkit.Location;
|
||||
+import org.bukkit.craftbukkit.util.CraftLocation;
|
||||
+import org.bukkit.entity.Vehicle;
|
||||
+import org.bukkit.event.entity.EntityRemoveEvent;
|
||||
+import org.bukkit.event.vehicle.VehicleDestroyEvent;
|
||||
+import org.bukkit.event.vehicle.VehicleEntityCollisionEvent;
|
||||
+import org.bukkit.event.vehicle.VehicleMoveEvent;
|
||||
+// CraftBukkit end
|
||||
+
|
||||
public class EntityBoat extends VehicleEntity implements VariantHolder<EntityBoat.EnumBoatType> {
|
||||
public class EntityBoat extends VehicleEntity implements Leashable, VariantHolder<EntityBoat.EnumBoatType> {
|
||||
|
||||
private static final DataWatcherObject<Integer> DATA_ID_TYPE = DataWatcher.defineId(EntityBoat.class, DataWatcherRegistry.INT);
|
||||
@@ -91,6 +100,14 @@
|
||||
private float bubbleAngle;
|
||||
private float bubbleAngleO;
|
||||
@@ -94,6 +104,14 @@
|
||||
@Nullable
|
||||
private Leashable.a leashData;
|
||||
|
||||
+ // CraftBukkit start
|
||||
+ // PAIL: Some of these haven't worked since a few updates, and since 1.9 they are less and less applicable.
|
||||
@@ -31,7 +32,7 @@
|
||||
public EntityBoat(EntityTypes<? extends EntityBoat> entitytypes, World world) {
|
||||
super(entitytypes, world);
|
||||
this.paddlePositions = new float[2];
|
||||
@@ -186,9 +203,29 @@
|
||||
@@ -189,9 +207,29 @@
|
||||
public void push(Entity entity) {
|
||||
if (entity instanceof EntityBoat) {
|
||||
if (entity.getBoundingBox().minY < this.getBoundingBox().maxY) {
|
||||
@@ -61,7 +62,7 @@
|
||||
super.push(entity);
|
||||
}
|
||||
|
||||
@@ -282,6 +319,7 @@
|
||||
@@ -285,6 +323,7 @@
|
||||
return this.getDirection().getClockWise();
|
||||
}
|
||||
|
||||
@@ -69,7 +70,7 @@
|
||||
@Override
|
||||
public void tick() {
|
||||
this.oldStatus = this.status;
|
||||
@@ -322,6 +360,22 @@
|
||||
@@ -325,6 +364,22 @@
|
||||
this.setDeltaMovement(Vec3D.ZERO);
|
||||
}
|
||||
|
||||
@@ -92,7 +93,27 @@
|
||||
this.tickBubbleColumn();
|
||||
|
||||
for (int i = 0; i <= 1; ++i) {
|
||||
@@ -811,6 +865,11 @@
|
||||
@@ -837,11 +892,18 @@
|
||||
|
||||
@Override
|
||||
public void remove(Entity.RemovalReason entity_removalreason) {
|
||||
+ // CraftBukkit start - add Bukkit remove cause
|
||||
+ this.remove(entity_removalreason, null);
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void remove(Entity.RemovalReason entity_removalreason, EntityRemoveEvent.Cause cause) {
|
||||
+ // CraftBukkit end
|
||||
if (!this.level().isClientSide && entity_removalreason.shouldDestroy() && this.isLeashed()) {
|
||||
this.dropLeash(true, true);
|
||||
}
|
||||
|
||||
- super.remove(entity_removalreason);
|
||||
+ super.remove(entity_removalreason, cause); // CraftBukkit - add Bukkit remove cause
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -857,6 +919,11 @@
|
||||
|
||||
this.causeFallDamage(this.fallDistance, 1.0F, this.damageSources().fall());
|
||||
if (!this.level().isClientSide && !this.isRemoved()) {
|
||||
@@ -104,7 +125,7 @@
|
||||
this.kill();
|
||||
if (this.level().getGameRules().getBoolean(GameRules.RULE_DOENTITYDROPS)) {
|
||||
int i;
|
||||
@@ -824,6 +883,7 @@
|
||||
@@ -870,6 +937,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user