@@ -1,8 +1,8 @@
|
||||
--- a/net/minecraft/world/entity/vehicle/ChestBoat.java
|
||||
+++ b/net/minecraft/world/entity/vehicle/ChestBoat.java
|
||||
@@ -24,6 +24,15 @@
|
||||
import net.minecraft.world.level.World;
|
||||
@@ -26,6 +26,15 @@
|
||||
import net.minecraft.world.level.gameevent.GameEvent;
|
||||
import net.minecraft.world.level.storage.loot.LootTable;
|
||||
|
||||
+// CraftBukkit start
|
||||
+import java.util.List;
|
||||
@@ -16,7 +16,7 @@
|
||||
public class ChestBoat extends EntityBoat implements HasCustomInventoryScreen, ContainerEntity {
|
||||
|
||||
private static final int CONTAINER_SIZE = 27;
|
||||
@@ -76,11 +85,18 @@
|
||||
@@ -78,11 +87,18 @@
|
||||
|
||||
@Override
|
||||
public void remove(Entity.RemovalReason entity_removalreason) {
|
||||
@@ -36,9 +36,9 @@
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -238,4 +254,51 @@
|
||||
@@ -240,4 +256,51 @@
|
||||
public void stopOpen(EntityHuman entityhuman) {
|
||||
this.level().gameEvent(GameEvent.CONTAINER_CLOSE, this.position(), GameEvent.a.of((Entity) entityhuman));
|
||||
this.level().gameEvent((Holder) GameEvent.CONTAINER_CLOSE, this.position(), GameEvent.a.of((Entity) entityhuman));
|
||||
}
|
||||
+
|
||||
+ // CraftBukkit start
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
--- a/net/minecraft/world/entity/vehicle/EntityBoat.java
|
||||
+++ b/net/minecraft/world/entity/vehicle/EntityBoat.java
|
||||
@@ -55,6 +55,15 @@
|
||||
@@ -54,6 +54,15 @@
|
||||
import net.minecraft.world.phys.shapes.VoxelShape;
|
||||
import net.minecraft.world.phys.shapes.VoxelShapes;
|
||||
import org.joml.Vector3f;
|
||||
|
||||
+// CraftBukkit start
|
||||
+import org.bukkit.Location;
|
||||
@@ -16,7 +16,7 @@
|
||||
public class EntityBoat extends VehicleEntity implements VariantHolder<EntityBoat.EnumBoatType> {
|
||||
|
||||
private static final DataWatcherObject<Integer> DATA_ID_TYPE = DataWatcher.defineId(EntityBoat.class, DataWatcherRegistry.INT);
|
||||
@@ -92,6 +101,14 @@
|
||||
@@ -91,6 +100,14 @@
|
||||
private float bubbleAngle;
|
||||
private float bubbleAngleO;
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
public EntityBoat(EntityTypes<? extends EntityBoat> entitytypes, World world) {
|
||||
super(entitytypes, world);
|
||||
this.paddlePositions = new float[2];
|
||||
@@ -192,9 +209,29 @@
|
||||
@@ -186,9 +203,29 @@
|
||||
public void push(Entity entity) {
|
||||
if (entity instanceof EntityBoat) {
|
||||
if (entity.getBoundingBox().minY < this.getBoundingBox().maxY) {
|
||||
@@ -61,7 +61,7 @@
|
||||
super.push(entity);
|
||||
}
|
||||
|
||||
@@ -288,6 +325,7 @@
|
||||
@@ -282,6 +319,7 @@
|
||||
return this.getDirection().getClockWise();
|
||||
}
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
@Override
|
||||
public void tick() {
|
||||
this.oldStatus = this.status;
|
||||
@@ -328,6 +366,22 @@
|
||||
@@ -322,6 +360,22 @@
|
||||
this.setDeltaMovement(Vec3D.ZERO);
|
||||
}
|
||||
|
||||
@@ -92,7 +92,7 @@
|
||||
this.tickBubbleColumn();
|
||||
|
||||
for (int i = 0; i <= 1; ++i) {
|
||||
@@ -813,6 +867,11 @@
|
||||
@@ -811,6 +865,11 @@
|
||||
|
||||
this.causeFallDamage(this.fallDistance, 1.0F, this.damageSources().fall());
|
||||
if (!this.level().isClientSide && !this.isRemoved()) {
|
||||
@@ -104,7 +104,7 @@
|
||||
this.kill();
|
||||
if (this.level().getGameRules().getBoolean(GameRules.RULE_DOENTITYDROPS)) {
|
||||
int i;
|
||||
@@ -826,6 +885,7 @@
|
||||
@@ -824,6 +883,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
--- a/net/minecraft/world/entity/vehicle/EntityMinecartAbstract.java
|
||||
+++ b/net/minecraft/world/entity/vehicle/EntityMinecartAbstract.java
|
||||
@@ -48,6 +48,14 @@
|
||||
@@ -47,6 +47,14 @@
|
||||
import net.minecraft.world.phys.AxisAlignedBB;
|
||||
import net.minecraft.world.phys.Vec3D;
|
||||
import org.joml.Vector3f;
|
||||
|
||||
+// CraftBukkit start
|
||||
+import org.bukkit.Location;
|
||||
@@ -14,8 +14,8 @@
|
||||
+
|
||||
public abstract class EntityMinecartAbstract extends VehicleEntity {
|
||||
|
||||
private static final float LOWERED_PASSENGER_ATTACHMENT_Y = 0.0F;
|
||||
@@ -88,6 +96,17 @@
|
||||
private static final Vec3D LOWERED_PASSENGER_ATTACHMENT = new Vec3D(0.0D, 0.0D, 0.0D);
|
||||
@@ -86,6 +94,17 @@
|
||||
enummap.put(BlockPropertyTrackPosition.NORTH_EAST, Pair.of(baseblockposition2, baseblockposition1));
|
||||
});
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
protected EntityMinecartAbstract(EntityTypes<?> entitytypes, World world) {
|
||||
super(entitytypes, world);
|
||||
this.targetDeltaMovement = Vec3D.ZERO;
|
||||
@@ -128,7 +147,7 @@
|
||||
@@ -126,7 +145,7 @@
|
||||
object = new EntityMinecartRideable(worldserver, d0, d1, d2);
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
|
||||
EntityTypes.createDefaultStackConfig(worldserver, itemstack, entityhuman).accept(object1);
|
||||
return (EntityMinecartAbstract) object1;
|
||||
@@ -267,6 +286,14 @@
|
||||
@@ -270,6 +289,14 @@
|
||||
|
||||
@Override
|
||||
public void tick() {
|
||||
@@ -57,7 +57,7 @@
|
||||
if (this.getHurtTime() > 0) {
|
||||
this.setHurtTime(this.getHurtTime() - 1);
|
||||
}
|
||||
@@ -276,7 +303,7 @@
|
||||
@@ -279,7 +306,7 @@
|
||||
}
|
||||
|
||||
this.checkBelowWorld();
|
||||
@@ -66,7 +66,7 @@
|
||||
if (this.level().isClientSide) {
|
||||
if (this.lerpSteps > 0) {
|
||||
this.lerpPositionAndRotationStep(this.lerpSteps, this.lerpX, this.lerpY, this.lerpZ, this.lerpYRot, this.lerpXRot);
|
||||
@@ -334,6 +361,18 @@
|
||||
@@ -332,6 +359,18 @@
|
||||
}
|
||||
|
||||
this.setRot(this.getYRot(), this.getXRot());
|
||||
@@ -85,7 +85,7 @@
|
||||
if (this.getMinecartType() == EntityMinecartAbstract.EnumMinecartType.RIDEABLE && this.getDeltaMovement().horizontalDistanceSqr() > 0.01D) {
|
||||
List<Entity> list = this.level().getEntities((Entity) this, this.getBoundingBox().inflate(0.20000000298023224D, 0.0D, 0.20000000298023224D), IEntitySelector.pushableBy(this));
|
||||
|
||||
@@ -344,8 +383,26 @@
|
||||
@@ -342,8 +381,26 @@
|
||||
Entity entity = (Entity) iterator.next();
|
||||
|
||||
if (!(entity instanceof EntityHuman) && !(entity instanceof EntityIronGolem) && !(entity instanceof EntityMinecartAbstract) && !this.isVehicle() && !entity.isPassenger()) {
|
||||
@@ -112,7 +112,7 @@
|
||||
entity.push(this);
|
||||
}
|
||||
}
|
||||
@@ -357,6 +414,14 @@
|
||||
@@ -355,6 +412,14 @@
|
||||
Entity entity1 = (Entity) iterator1.next();
|
||||
|
||||
if (!this.hasPassenger(entity1) && entity1.isPushable() && entity1 instanceof EntityMinecartAbstract) {
|
||||
@@ -127,7 +127,7 @@
|
||||
entity1.push(this);
|
||||
}
|
||||
}
|
||||
@@ -373,7 +438,7 @@
|
||||
@@ -371,7 +436,7 @@
|
||||
}
|
||||
|
||||
protected double getMaxSpeed() {
|
||||
@@ -136,7 +136,7 @@
|
||||
}
|
||||
|
||||
public void activateMinecart(int i, int j, int k, boolean flag) {}
|
||||
@@ -384,12 +449,16 @@
|
||||
@@ -382,12 +447,16 @@
|
||||
|
||||
this.setDeltaMovement(MathHelper.clamp(vec3d.x, -d0, d0), vec3d.y, MathHelper.clamp(vec3d.z, -d0, d0));
|
||||
if (this.onGround()) {
|
||||
@@ -155,7 +155,7 @@
|
||||
}
|
||||
|
||||
}
|
||||
@@ -585,7 +654,7 @@
|
||||
@@ -583,7 +652,7 @@
|
||||
}
|
||||
|
||||
protected void applyNaturalSlowdown() {
|
||||
@@ -164,7 +164,7 @@
|
||||
Vec3D vec3d = this.getDeltaMovement();
|
||||
|
||||
vec3d = vec3d.multiply(d0, 0.0D, d0);
|
||||
@@ -724,6 +793,14 @@
|
||||
@@ -722,6 +791,14 @@
|
||||
if (!this.level().isClientSide) {
|
||||
if (!entity.noPhysics && !this.noPhysics) {
|
||||
if (!this.hasPassenger(entity)) {
|
||||
@@ -179,7 +179,7 @@
|
||||
double d0 = entity.getX() - this.getX();
|
||||
double d1 = entity.getZ() - this.getZ();
|
||||
double d2 = d0 * d0 + d1 * d1;
|
||||
@@ -898,4 +975,26 @@
|
||||
@@ -896,4 +973,26 @@
|
||||
|
||||
private EnumMinecartType() {}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
--- a/net/minecraft/world/entity/vehicle/EntityMinecartContainer.java
|
||||
+++ b/net/minecraft/world/entity/vehicle/EntityMinecartContainer.java
|
||||
@@ -18,6 +18,15 @@
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
@@ -19,6 +19,15 @@
|
||||
import net.minecraft.world.level.World;
|
||||
import net.minecraft.world.level.storage.loot.LootTable;
|
||||
|
||||
+// CraftBukkit start
|
||||
+import java.util.List;
|
||||
@@ -16,8 +16,8 @@
|
||||
public abstract class EntityMinecartContainer extends EntityMinecartAbstract implements ContainerEntity {
|
||||
|
||||
private NonNullList<ItemStack> itemStacks;
|
||||
@@ -25,14 +34,55 @@
|
||||
public MinecraftKey lootTable;
|
||||
@@ -26,14 +35,55 @@
|
||||
public ResourceKey<LootTable> lootTable;
|
||||
public long lootTableSeed;
|
||||
|
||||
+ // CraftBukkit start
|
||||
@@ -74,7 +74,7 @@
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -76,11 +126,18 @@
|
||||
@@ -77,11 +127,18 @@
|
||||
|
||||
@Override
|
||||
public void remove(Entity.RemovalReason entity_removalreason) {
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
public class EntityMinecartTNT extends EntityMinecartAbstract {
|
||||
|
||||
private static final byte EVENT_PRIME = 10;
|
||||
@@ -115,8 +120,16 @@
|
||||
@@ -113,8 +118,16 @@
|
||||
d1 = 5.0D;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/entity/vehicle/VehicleEntity.java
|
||||
+++ b/net/minecraft/world/entity/vehicle/VehicleEntity.java
|
||||
@@ -13,6 +13,13 @@
|
||||
@@ -14,6 +14,13 @@
|
||||
import net.minecraft.world.level.World;
|
||||
import net.minecraft.world.level.gameevent.GameEvent;
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
public abstract class VehicleEntity extends Entity {
|
||||
|
||||
protected static final DataWatcherObject<Integer> DATA_ID_HURT = DataWatcher.defineId(VehicleEntity.class, DataWatcherRegistry.INT);
|
||||
@@ -29,6 +36,18 @@
|
||||
@@ -30,6 +37,18 @@
|
||||
if (this.isInvulnerableTo(damagesource)) {
|
||||
return false;
|
||||
} else {
|
||||
@@ -33,7 +33,7 @@
|
||||
this.setHurtDir(-this.getHurtDir());
|
||||
this.setHurtTime(10);
|
||||
this.markHurt();
|
||||
@@ -38,9 +57,27 @@
|
||||
@@ -39,9 +58,27 @@
|
||||
|
||||
if ((flag || this.getDamage() <= 40.0F) && !this.shouldSourceDestroy(damagesource)) {
|
||||
if (flag) {
|
||||
|
||||
Reference in New Issue
Block a user