@@ -1,8 +1,8 @@
|
||||
--- a/net/minecraft/server/EntityBoat.java
|
||||
+++ b/net/minecraft/server/EntityBoat.java
|
||||
@@ -4,6 +4,15 @@
|
||||
import java.util.List;
|
||||
import javax.annotation.Nullable;
|
||||
--- a/net/minecraft/world/entity/vehicle/EntityBoat.java
|
||||
+++ b/net/minecraft/world/entity/vehicle/EntityBoat.java
|
||||
@@ -48,6 +48,15 @@
|
||||
import net.minecraft.world.phys.shapes.VoxelShape;
|
||||
import net.minecraft.world.phys.shapes.VoxelShapes;
|
||||
|
||||
+// CraftBukkit start
|
||||
+import org.bukkit.Location;
|
||||
@@ -16,7 +16,7 @@
|
||||
public class EntityBoat extends Entity {
|
||||
|
||||
private static final DataWatcherObject<Integer> b = DataWatcher.a(EntityBoat.class, DataWatcherRegistry.b);
|
||||
@@ -38,6 +47,14 @@
|
||||
@@ -82,6 +91,14 @@
|
||||
private float aD;
|
||||
private float aE;
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
public EntityBoat(EntityTypes<? extends EntityBoat> entitytypes, World world) {
|
||||
super(entitytypes, world);
|
||||
this.ah = new float[2];
|
||||
@@ -108,6 +125,19 @@
|
||||
@@ -152,6 +169,19 @@
|
||||
if (this.isInvulnerable(damagesource)) {
|
||||
return false;
|
||||
} else if (!this.world.isClientSide && !this.dead) {
|
||||
@@ -51,7 +51,7 @@
|
||||
this.c(-this.o());
|
||||
this.b(10);
|
||||
this.setDamage(this.getDamage() + f * 10.0F);
|
||||
@@ -115,6 +145,15 @@
|
||||
@@ -159,6 +189,15 @@
|
||||
boolean flag = damagesource.getEntity() instanceof EntityHuman && ((EntityHuman) damagesource.getEntity()).abilities.canInstantlyBuild;
|
||||
|
||||
if (flag || this.getDamage() > 40.0F) {
|
||||
@@ -67,7 +67,7 @@
|
||||
if (!flag && this.world.getGameRules().getBoolean(GameRules.DO_ENTITY_DROPS)) {
|
||||
this.a((IMaterial) this.g());
|
||||
}
|
||||
@@ -149,9 +188,29 @@
|
||||
@@ -193,9 +232,29 @@
|
||||
public void collide(Entity entity) {
|
||||
if (entity instanceof EntityBoat) {
|
||||
if (entity.getBoundingBox().minY < this.getBoundingBox().maxY) {
|
||||
@@ -97,7 +97,7 @@
|
||||
super.collide(entity);
|
||||
}
|
||||
|
||||
@@ -185,6 +244,7 @@
|
||||
@@ -229,6 +288,7 @@
|
||||
return this.getDirection().g();
|
||||
}
|
||||
|
||||
@@ -105,7 +105,7 @@
|
||||
@Override
|
||||
public void tick() {
|
||||
this.ay = this.ax;
|
||||
@@ -225,6 +285,22 @@
|
||||
@@ -269,6 +329,22 @@
|
||||
this.setMot(Vec3D.ORIGIN);
|
||||
}
|
||||
|
||||
@@ -128,7 +128,7 @@
|
||||
this.q();
|
||||
|
||||
for (int i = 0; i <= 1; ++i) {
|
||||
@@ -709,6 +785,11 @@
|
||||
@@ -753,6 +829,11 @@
|
||||
|
||||
this.b(this.fallDistance, 1.0F);
|
||||
if (!this.world.isClientSide && !this.dead) {
|
||||
@@ -140,7 +140,7 @@
|
||||
this.die();
|
||||
if (this.world.getGameRules().getBoolean(GameRules.DO_ENTITY_DROPS)) {
|
||||
int i;
|
||||
@@ -722,6 +803,7 @@
|
||||
@@ -766,6 +847,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
--- a/net/minecraft/server/EntityMinecartAbstract.java
|
||||
+++ b/net/minecraft/server/EntityMinecartAbstract.java
|
||||
@@ -10,6 +10,15 @@
|
||||
import java.util.Map;
|
||||
import javax.annotation.Nullable;
|
||||
--- a/net/minecraft/world/entity/vehicle/EntityMinecartAbstract.java
|
||||
+++ b/net/minecraft/world/entity/vehicle/EntityMinecartAbstract.java
|
||||
@@ -48,6 +48,15 @@
|
||||
import net.minecraft.world.phys.AxisAlignedBB;
|
||||
import net.minecraft.world.phys.Vec3D;
|
||||
|
||||
+// CraftBukkit start
|
||||
+import org.bukkit.Location;
|
||||
@@ -16,7 +16,7 @@
|
||||
public abstract class EntityMinecartAbstract extends Entity {
|
||||
|
||||
private static final DataWatcherObject<Integer> b = DataWatcher.a(EntityMinecartAbstract.class, DataWatcherRegistry.b);
|
||||
@@ -20,7 +29,7 @@
|
||||
@@ -58,7 +67,7 @@
|
||||
private static final DataWatcherObject<Boolean> g = DataWatcher.a(EntityMinecartAbstract.class, DataWatcherRegistry.i);
|
||||
private static final ImmutableMap<EntityPose, ImmutableList<Integer>> ag = ImmutableMap.of(EntityPose.STANDING, ImmutableList.of(0, 1, -1), EntityPose.CROUCHING, ImmutableList.of(0, 1, -1), EntityPose.SWIMMING, ImmutableList.of(0, 1));
|
||||
private boolean ah;
|
||||
@@ -25,7 +25,7 @@
|
||||
BaseBlockPosition baseblockposition = EnumDirection.WEST.p();
|
||||
BaseBlockPosition baseblockposition1 = EnumDirection.EAST.p();
|
||||
BaseBlockPosition baseblockposition2 = EnumDirection.NORTH.p();
|
||||
@@ -48,6 +57,17 @@
|
||||
@@ -86,6 +95,17 @@
|
||||
private double an;
|
||||
private double ao;
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
protected EntityMinecartAbstract(EntityTypes<?> entitytypes, World world) {
|
||||
super(entitytypes, world);
|
||||
this.i = true;
|
||||
@@ -175,6 +195,19 @@
|
||||
@@ -213,6 +233,19 @@
|
||||
if (this.isInvulnerable(damagesource)) {
|
||||
return false;
|
||||
} else {
|
||||
@@ -63,7 +63,7 @@
|
||||
this.d(-this.n());
|
||||
this.c(10);
|
||||
this.velocityChanged();
|
||||
@@ -182,6 +215,15 @@
|
||||
@@ -220,6 +253,15 @@
|
||||
boolean flag = damagesource.getEntity() instanceof EntityHuman && ((EntityHuman) damagesource.getEntity()).abilities.canInstantlyBuild;
|
||||
|
||||
if (flag || this.getDamage() > 40.0F) {
|
||||
@@ -79,7 +79,7 @@
|
||||
this.ejectPassengers();
|
||||
if (flag && !this.hasCustomName()) {
|
||||
this.die();
|
||||
@@ -234,6 +276,14 @@
|
||||
@@ -272,6 +314,14 @@
|
||||
|
||||
@Override
|
||||
public void tick() {
|
||||
@@ -94,7 +94,7 @@
|
||||
if (this.getType() > 0) {
|
||||
this.c(this.getType() - 1);
|
||||
}
|
||||
@@ -246,7 +296,7 @@
|
||||
@@ -284,7 +334,7 @@
|
||||
this.an();
|
||||
}
|
||||
|
||||
@@ -103,7 +103,7 @@
|
||||
if (this.world.isClientSide) {
|
||||
if (this.aj > 0) {
|
||||
double d0 = this.locX() + (this.ak - this.locX()) / (double) this.aj;
|
||||
@@ -309,6 +359,18 @@
|
||||
@@ -347,6 +397,18 @@
|
||||
}
|
||||
|
||||
this.setYawPitch(this.yaw, this.pitch);
|
||||
@@ -122,7 +122,7 @@
|
||||
if (this.getMinecartType() == EntityMinecartAbstract.EnumMinecartType.RIDEABLE && c(this.getMot()) > 0.01D) {
|
||||
List<Entity> list = this.world.getEntities(this, this.getBoundingBox().grow(0.20000000298023224D, 0.0D, 0.20000000298023224D), IEntitySelector.a(this));
|
||||
|
||||
@@ -317,8 +379,26 @@
|
||||
@@ -355,8 +417,26 @@
|
||||
Entity entity = (Entity) list.get(l);
|
||||
|
||||
if (!(entity instanceof EntityHuman) && !(entity instanceof EntityIronGolem) && !(entity instanceof EntityMinecartAbstract) && !this.isVehicle() && !entity.isPassenger()) {
|
||||
@@ -149,7 +149,7 @@
|
||||
entity.collide(this);
|
||||
}
|
||||
}
|
||||
@@ -330,6 +410,14 @@
|
||||
@@ -368,6 +448,14 @@
|
||||
Entity entity1 = (Entity) iterator.next();
|
||||
|
||||
if (!this.w(entity1) && entity1.isCollidable() && entity1 instanceof EntityMinecartAbstract) {
|
||||
@@ -164,7 +164,7 @@
|
||||
entity1.collide(this);
|
||||
}
|
||||
}
|
||||
@@ -346,7 +434,7 @@
|
||||
@@ -384,7 +472,7 @@
|
||||
}
|
||||
|
||||
protected double getMaxSpeed() {
|
||||
@@ -173,7 +173,7 @@
|
||||
}
|
||||
|
||||
public void a(int i, int j, int k, boolean flag) {}
|
||||
@@ -357,12 +445,16 @@
|
||||
@@ -395,12 +483,16 @@
|
||||
|
||||
this.setMot(MathHelper.a(vec3d.x, -d0, d0), vec3d.y, MathHelper.a(vec3d.z, -d0, d0));
|
||||
if (this.onGround) {
|
||||
@@ -192,7 +192,7 @@
|
||||
}
|
||||
|
||||
}
|
||||
@@ -549,7 +641,7 @@
|
||||
@@ -587,7 +679,7 @@
|
||||
}
|
||||
|
||||
protected void decelerate() {
|
||||
@@ -201,7 +201,7 @@
|
||||
|
||||
this.setMot(this.getMot().d(d0, 0.0D, d0));
|
||||
}
|
||||
@@ -632,6 +724,14 @@
|
||||
@@ -670,6 +762,14 @@
|
||||
if (!this.world.isClientSide) {
|
||||
if (!entity.noclip && !this.noclip) {
|
||||
if (!this.w(entity)) {
|
||||
@@ -216,7 +216,7 @@
|
||||
double d0 = entity.locX() - this.locX();
|
||||
double d1 = entity.locZ() - this.locZ();
|
||||
double d2 = d0 * d0 + d1 * d1;
|
||||
@@ -767,4 +867,26 @@
|
||||
@@ -805,4 +905,26 @@
|
||||
|
||||
private EnumMinecartType() {}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/server/EntityMinecartCommandBlock.java
|
||||
+++ b/net/minecraft/server/EntityMinecartCommandBlock.java
|
||||
@@ -103,5 +103,12 @@
|
||||
--- a/net/minecraft/world/entity/vehicle/EntityMinecartCommandBlock.java
|
||||
+++ b/net/minecraft/world/entity/vehicle/EntityMinecartCommandBlock.java
|
||||
@@ -120,5 +120,12 @@
|
||||
public CommandListenerWrapper getWrapper() {
|
||||
return new CommandListenerWrapper(this, EntityMinecartCommandBlock.this.getPositionVector(), EntityMinecartCommandBlock.this.bi(), this.d(), 2, this.getName().getString(), EntityMinecartCommandBlock.this.getScoreboardDisplayName(), this.d().getMinecraftServer(), EntityMinecartCommandBlock.this);
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
--- a/net/minecraft/server/EntityMinecartContainer.java
|
||||
+++ b/net/minecraft/server/EntityMinecartContainer.java
|
||||
@@ -3,6 +3,14 @@
|
||||
import java.util.Iterator;
|
||||
import javax.annotation.Nullable;
|
||||
--- a/net/minecraft/world/entity/vehicle/EntityMinecartContainer.java
|
||||
+++ b/net/minecraft/world/entity/vehicle/EntityMinecartContainer.java
|
||||
@@ -29,6 +29,14 @@
|
||||
import net.minecraft.world.level.storage.loot.parameters.LootContextParameterSets;
|
||||
import net.minecraft.world.level.storage.loot.parameters.LootContextParameters;
|
||||
|
||||
+// CraftBukkit start
|
||||
+import java.util.List;
|
||||
@@ -15,7 +15,7 @@
|
||||
public abstract class EntityMinecartContainer extends EntityMinecartAbstract implements IInventory, ITileInventory {
|
||||
|
||||
private NonNullList<ItemStack> items;
|
||||
@@ -11,15 +19,56 @@
|
||||
@@ -37,15 +45,56 @@
|
||||
public MinecraftKey lootTable;
|
||||
public long lootTableSeed;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user