@@ -0,0 +1,150 @@
|
||||
--- a/net/minecraft/server/EntityBoat.java
|
||||
+++ b/net/minecraft/server/EntityBoat.java
|
||||
@@ -4,6 +4,15 @@
|
||||
import java.util.List;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
+// CraftBukkit start
|
||||
+import org.bukkit.Location;
|
||||
+import org.bukkit.entity.Vehicle;
|
||||
+import org.bukkit.event.vehicle.VehicleDamageEvent;
|
||||
+import org.bukkit.event.vehicle.VehicleDestroyEvent;
|
||||
+import org.bukkit.event.vehicle.VehicleEntityCollisionEvent;
|
||||
+import org.bukkit.event.vehicle.VehicleMoveEvent;
|
||||
+// CraftBukkit end
|
||||
+
|
||||
public class EntityBoat extends Entity {
|
||||
|
||||
private static final DataWatcherObject<Integer> b = DataWatcher.a(EntityBoat.class, DataWatcherRegistry.b);
|
||||
@@ -38,6 +47,14 @@
|
||||
private float aD;
|
||||
private float aE;
|
||||
|
||||
+ // CraftBukkit start
|
||||
+ // PAIL: Some of these haven't worked since a few updates, and since 1.9 they are less and less applicable.
|
||||
+ public double maxSpeed = 0.4D;
|
||||
+ public double occupiedDeceleration = 0.2D;
|
||||
+ public double unoccupiedDeceleration = -1;
|
||||
+ public boolean landBoats = false;
|
||||
+ // CraftBukkit end
|
||||
+
|
||||
public EntityBoat(EntityTypes<? extends EntityBoat> entitytypes, World world) {
|
||||
super(entitytypes, world);
|
||||
this.ah = new float[2];
|
||||
@@ -108,6 +125,19 @@
|
||||
if (this.isInvulnerable(damagesource)) {
|
||||
return false;
|
||||
} else if (!this.world.isClientSide && !this.dead) {
|
||||
+ // CraftBukkit start
|
||||
+ Vehicle vehicle = (Vehicle) this.getBukkitEntity();
|
||||
+ org.bukkit.entity.Entity attacker = (damagesource.getEntity() == null) ? null : damagesource.getEntity().getBukkitEntity();
|
||||
+
|
||||
+ VehicleDamageEvent event = new VehicleDamageEvent(vehicle, attacker, (double) f);
|
||||
+ this.world.getServer().getPluginManager().callEvent(event);
|
||||
+
|
||||
+ if (event.isCancelled()) {
|
||||
+ return false;
|
||||
+ }
|
||||
+ // f = event.getDamage(); // TODO Why don't we do this?
|
||||
+ // CraftBukkit end
|
||||
+
|
||||
this.c(-this.o());
|
||||
this.b(10);
|
||||
this.setDamage(this.getDamage() + f * 10.0F);
|
||||
@@ -115,6 +145,15 @@
|
||||
boolean flag = damagesource.getEntity() instanceof EntityHuman && ((EntityHuman) damagesource.getEntity()).abilities.canInstantlyBuild;
|
||||
|
||||
if (flag || this.getDamage() > 40.0F) {
|
||||
+ // CraftBukkit start
|
||||
+ VehicleDestroyEvent destroyEvent = new VehicleDestroyEvent(vehicle, attacker);
|
||||
+ this.world.getServer().getPluginManager().callEvent(destroyEvent);
|
||||
+
|
||||
+ if (destroyEvent.isCancelled()) {
|
||||
+ this.setDamage(40F); // Maximize damage so this doesn't get triggered again right away
|
||||
+ return true;
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
if (!flag && this.world.getGameRules().getBoolean(GameRules.DO_ENTITY_DROPS)) {
|
||||
this.a((IMaterial) this.g());
|
||||
}
|
||||
@@ -149,9 +188,29 @@
|
||||
public void collide(Entity entity) {
|
||||
if (entity instanceof EntityBoat) {
|
||||
if (entity.getBoundingBox().minY < this.getBoundingBox().maxY) {
|
||||
+ // CraftBukkit start
|
||||
+ if (!this.isSameVehicle(entity)) {
|
||||
+ VehicleEntityCollisionEvent event = new VehicleEntityCollisionEvent((Vehicle) this.getBukkitEntity(), entity.getBukkitEntity());
|
||||
+ this.world.getServer().getPluginManager().callEvent(event);
|
||||
+
|
||||
+ if (event.isCancelled()) {
|
||||
+ return;
|
||||
+ }
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
super.collide(entity);
|
||||
}
|
||||
} else if (entity.getBoundingBox().minY <= this.getBoundingBox().minY) {
|
||||
+ // CraftBukkit start
|
||||
+ if (!this.isSameVehicle(entity)) {
|
||||
+ VehicleEntityCollisionEvent event = new VehicleEntityCollisionEvent((Vehicle) this.getBukkitEntity(), entity.getBukkitEntity());
|
||||
+ this.world.getServer().getPluginManager().callEvent(event);
|
||||
+
|
||||
+ if (event.isCancelled()) {
|
||||
+ return;
|
||||
+ }
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
super.collide(entity);
|
||||
}
|
||||
|
||||
@@ -185,6 +244,7 @@
|
||||
return this.getDirection().g();
|
||||
}
|
||||
|
||||
+ private Location lastLocation; // CraftBukkit
|
||||
@Override
|
||||
public void tick() {
|
||||
this.ay = this.ax;
|
||||
@@ -225,6 +285,22 @@
|
||||
this.setMot(Vec3D.ORIGIN);
|
||||
}
|
||||
|
||||
+ // CraftBukkit start
|
||||
+ org.bukkit.Server server = this.world.getServer();
|
||||
+ org.bukkit.World bworld = this.world.getWorld();
|
||||
+
|
||||
+ Location to = new Location(bworld, this.locX(), this.locY(), this.locZ(), this.yaw, this.pitch);
|
||||
+ Vehicle vehicle = (Vehicle) this.getBukkitEntity();
|
||||
+
|
||||
+ server.getPluginManager().callEvent(new org.bukkit.event.vehicle.VehicleUpdateEvent(vehicle));
|
||||
+
|
||||
+ if (lastLocation != null && !lastLocation.equals(to)) {
|
||||
+ VehicleMoveEvent event = new VehicleMoveEvent(vehicle, lastLocation, to);
|
||||
+ server.getPluginManager().callEvent(event);
|
||||
+ }
|
||||
+ lastLocation = vehicle.getLocation();
|
||||
+ // CraftBukkit end
|
||||
+
|
||||
this.q();
|
||||
|
||||
for (int i = 0; i <= 1; ++i) {
|
||||
@@ -709,6 +785,11 @@
|
||||
|
||||
this.b(this.fallDistance, 1.0F);
|
||||
if (!this.world.isClientSide && !this.dead) {
|
||||
+ // CraftBukkit start
|
||||
+ Vehicle vehicle = (Vehicle) this.getBukkitEntity();
|
||||
+ VehicleDestroyEvent destroyEvent = new VehicleDestroyEvent(vehicle, null);
|
||||
+ this.world.getServer().getPluginManager().callEvent(destroyEvent);
|
||||
+ if (!destroyEvent.isCancelled()) {
|
||||
this.die();
|
||||
if (this.world.getGameRules().getBoolean(GameRules.DO_ENTITY_DROPS)) {
|
||||
int i;
|
||||
@@ -722,6 +803,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
+ } // CraftBukkit end
|
||||
}
|
||||
|
||||
this.fallDistance = 0.0F;
|
||||
@@ -0,0 +1,245 @@
|
||||
--- a/net/minecraft/server/EntityMinecartAbstract.java
|
||||
+++ b/net/minecraft/server/EntityMinecartAbstract.java
|
||||
@@ -10,6 +10,15 @@
|
||||
import java.util.Map;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
+// CraftBukkit start
|
||||
+import org.bukkit.Location;
|
||||
+import org.bukkit.entity.Vehicle;
|
||||
+import org.bukkit.event.vehicle.VehicleDamageEvent;
|
||||
+import org.bukkit.event.vehicle.VehicleDestroyEvent;
|
||||
+import org.bukkit.event.vehicle.VehicleEntityCollisionEvent;
|
||||
+import org.bukkit.util.Vector;
|
||||
+// CraftBukkit end
|
||||
+
|
||||
public abstract class EntityMinecartAbstract extends Entity {
|
||||
|
||||
private static final DataWatcherObject<Integer> b = DataWatcher.a(EntityMinecartAbstract.class, DataWatcherRegistry.b);
|
||||
@@ -20,7 +29,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;
|
||||
- private static final Map<BlockPropertyTrackPosition, Pair<BaseBlockPosition, BaseBlockPosition>> ai = (Map) SystemUtils.a((Object) Maps.newEnumMap(BlockPropertyTrackPosition.class), (enummap) -> {
|
||||
+ private static final Map<BlockPropertyTrackPosition, Pair<BaseBlockPosition, BaseBlockPosition>> ai = (Map) SystemUtils.a(Maps.newEnumMap(BlockPropertyTrackPosition.class), (enummap) -> { // CraftBukkit - decompile error
|
||||
BaseBlockPosition baseblockposition = EnumDirection.WEST.p();
|
||||
BaseBlockPosition baseblockposition1 = EnumDirection.EAST.p();
|
||||
BaseBlockPosition baseblockposition2 = EnumDirection.NORTH.p();
|
||||
@@ -48,6 +57,17 @@
|
||||
private double an;
|
||||
private double ao;
|
||||
|
||||
+ // CraftBukkit start
|
||||
+ public boolean slowWhenEmpty = true;
|
||||
+ private double derailedX = 0.5;
|
||||
+ private double derailedY = 0.5;
|
||||
+ private double derailedZ = 0.5;
|
||||
+ private double flyingX = 0.95;
|
||||
+ private double flyingY = 0.95;
|
||||
+ private double flyingZ = 0.95;
|
||||
+ public double maxSpeed = 0.4D;
|
||||
+ // CraftBukkit end
|
||||
+
|
||||
protected EntityMinecartAbstract(EntityTypes<?> entitytypes, World world) {
|
||||
super(entitytypes, world);
|
||||
this.i = true;
|
||||
@@ -175,6 +195,19 @@
|
||||
if (this.isInvulnerable(damagesource)) {
|
||||
return false;
|
||||
} else {
|
||||
+ // CraftBukkit start - fire VehicleDamageEvent
|
||||
+ Vehicle vehicle = (Vehicle) this.getBukkitEntity();
|
||||
+ org.bukkit.entity.Entity passenger = (damagesource.getEntity() == null) ? null : damagesource.getEntity().getBukkitEntity();
|
||||
+
|
||||
+ VehicleDamageEvent event = new VehicleDamageEvent(vehicle, passenger, f);
|
||||
+ this.world.getServer().getPluginManager().callEvent(event);
|
||||
+
|
||||
+ if (event.isCancelled()) {
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
+ f = (float) event.getDamage();
|
||||
+ // CraftBukkit end
|
||||
this.d(-this.n());
|
||||
this.c(10);
|
||||
this.velocityChanged();
|
||||
@@ -182,6 +215,15 @@
|
||||
boolean flag = damagesource.getEntity() instanceof EntityHuman && ((EntityHuman) damagesource.getEntity()).abilities.canInstantlyBuild;
|
||||
|
||||
if (flag || this.getDamage() > 40.0F) {
|
||||
+ // CraftBukkit start
|
||||
+ VehicleDestroyEvent destroyEvent = new VehicleDestroyEvent(vehicle, passenger);
|
||||
+ this.world.getServer().getPluginManager().callEvent(destroyEvent);
|
||||
+
|
||||
+ if (destroyEvent.isCancelled()) {
|
||||
+ this.setDamage(40); // Maximize damage so this doesn't get triggered again right away
|
||||
+ return true;
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
this.ejectPassengers();
|
||||
if (flag && !this.hasCustomName()) {
|
||||
this.die();
|
||||
@@ -234,6 +276,14 @@
|
||||
|
||||
@Override
|
||||
public void tick() {
|
||||
+ // CraftBukkit start
|
||||
+ double prevX = this.locX();
|
||||
+ double prevY = this.locY();
|
||||
+ double prevZ = this.locZ();
|
||||
+ float prevYaw = this.yaw;
|
||||
+ float prevPitch = this.pitch;
|
||||
+ // CraftBukkit end
|
||||
+
|
||||
if (this.getType() > 0) {
|
||||
this.c(this.getType() - 1);
|
||||
}
|
||||
@@ -246,7 +296,7 @@
|
||||
this.an();
|
||||
}
|
||||
|
||||
- this.doPortalTick();
|
||||
+ // this.doPortalTick(); // CraftBukkit - handled in postTick
|
||||
if (this.world.isClientSide) {
|
||||
if (this.aj > 0) {
|
||||
double d0 = this.locX() + (this.ak - this.locX()) / (double) this.aj;
|
||||
@@ -309,6 +359,18 @@
|
||||
}
|
||||
|
||||
this.setYawPitch(this.yaw, this.pitch);
|
||||
+ // CraftBukkit start
|
||||
+ org.bukkit.World bworld = this.world.getWorld();
|
||||
+ Location from = new Location(bworld, prevX, prevY, prevZ, prevYaw, prevPitch);
|
||||
+ Location to = new Location(bworld, this.locX(), this.locY(), this.locZ(), this.yaw, this.pitch);
|
||||
+ Vehicle vehicle = (Vehicle) this.getBukkitEntity();
|
||||
+
|
||||
+ this.world.getServer().getPluginManager().callEvent(new org.bukkit.event.vehicle.VehicleUpdateEvent(vehicle));
|
||||
+
|
||||
+ if (!from.equals(to)) {
|
||||
+ this.world.getServer().getPluginManager().callEvent(new org.bukkit.event.vehicle.VehicleMoveEvent(vehicle, from, to));
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
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 @@
|
||||
Entity entity = (Entity) list.get(l);
|
||||
|
||||
if (!(entity instanceof EntityHuman) && !(entity instanceof EntityIronGolem) && !(entity instanceof EntityMinecartAbstract) && !this.isVehicle() && !entity.isPassenger()) {
|
||||
+ // CraftBukkit start
|
||||
+ VehicleEntityCollisionEvent collisionEvent = new VehicleEntityCollisionEvent(vehicle, entity.getBukkitEntity());
|
||||
+ this.world.getServer().getPluginManager().callEvent(collisionEvent);
|
||||
+
|
||||
+ if (collisionEvent.isCancelled()) {
|
||||
+ continue;
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
entity.startRiding(this);
|
||||
} else {
|
||||
+ // CraftBukkit start
|
||||
+ if (!this.isSameVehicle(entity)) {
|
||||
+ VehicleEntityCollisionEvent collisionEvent = new VehicleEntityCollisionEvent(vehicle, entity.getBukkitEntity());
|
||||
+ this.world.getServer().getPluginManager().callEvent(collisionEvent);
|
||||
+
|
||||
+ if (collisionEvent.isCancelled()) {
|
||||
+ continue;
|
||||
+ }
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
entity.collide(this);
|
||||
}
|
||||
}
|
||||
@@ -330,6 +410,14 @@
|
||||
Entity entity1 = (Entity) iterator.next();
|
||||
|
||||
if (!this.w(entity1) && entity1.isCollidable() && entity1 instanceof EntityMinecartAbstract) {
|
||||
+ // CraftBukkit start
|
||||
+ VehicleEntityCollisionEvent collisionEvent = new VehicleEntityCollisionEvent(vehicle, entity1.getBukkitEntity());
|
||||
+ this.world.getServer().getPluginManager().callEvent(collisionEvent);
|
||||
+
|
||||
+ if (collisionEvent.isCancelled()) {
|
||||
+ continue;
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
entity1.collide(this);
|
||||
}
|
||||
}
|
||||
@@ -346,7 +434,7 @@
|
||||
}
|
||||
|
||||
protected double getMaxSpeed() {
|
||||
- return 0.4D;
|
||||
+ return this.maxSpeed; // CraftBukkit
|
||||
}
|
||||
|
||||
public void a(int i, int j, int k, boolean flag) {}
|
||||
@@ -357,12 +445,16 @@
|
||||
|
||||
this.setMot(MathHelper.a(vec3d.x, -d0, d0), vec3d.y, MathHelper.a(vec3d.z, -d0, d0));
|
||||
if (this.onGround) {
|
||||
- this.setMot(this.getMot().a(0.5D));
|
||||
+ // CraftBukkit start - replace magic numbers with our variables
|
||||
+ this.setMot(new Vec3D(this.getMot().x * this.derailedX, this.getMot().y * this.derailedY, this.getMot().z * this.derailedZ));
|
||||
+ // CraftBukkit end
|
||||
}
|
||||
|
||||
this.move(EnumMoveType.SELF, this.getMot());
|
||||
if (!this.onGround) {
|
||||
- this.setMot(this.getMot().a(0.95D));
|
||||
+ // CraftBukkit start - replace magic numbers with our variables
|
||||
+ this.setMot(new Vec3D(this.getMot().x * this.flyingX, this.getMot().y * this.flyingY, this.getMot().z * this.flyingZ));
|
||||
+ // CraftBukkit end
|
||||
}
|
||||
|
||||
}
|
||||
@@ -549,7 +641,7 @@
|
||||
}
|
||||
|
||||
protected void decelerate() {
|
||||
- double d0 = this.isVehicle() ? 0.997D : 0.96D;
|
||||
+ double d0 = this.isVehicle() || !this.slowWhenEmpty ? 0.997D : 0.96D; // CraftBukkit - add !this.slowWhenEmpty
|
||||
|
||||
this.setMot(this.getMot().d(d0, 0.0D, d0));
|
||||
}
|
||||
@@ -632,6 +724,14 @@
|
||||
if (!this.world.isClientSide) {
|
||||
if (!entity.noclip && !this.noclip) {
|
||||
if (!this.w(entity)) {
|
||||
+ // CraftBukkit start
|
||||
+ VehicleEntityCollisionEvent collisionEvent = new VehicleEntityCollisionEvent((Vehicle) this.getBukkitEntity(), entity.getBukkitEntity());
|
||||
+ this.world.getServer().getPluginManager().callEvent(collisionEvent);
|
||||
+
|
||||
+ if (collisionEvent.isCancelled()) {
|
||||
+ return;
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
double d0 = entity.locX() - this.locX();
|
||||
double d1 = entity.locZ() - this.locZ();
|
||||
double d2 = d0 * d0 + d1 * d1;
|
||||
@@ -767,4 +867,26 @@
|
||||
|
||||
private EnumMinecartType() {}
|
||||
}
|
||||
+
|
||||
+ // CraftBukkit start - Methods for getting and setting flying and derailed velocity modifiers
|
||||
+ public Vector getFlyingVelocityMod() {
|
||||
+ return new Vector(flyingX, flyingY, flyingZ);
|
||||
+ }
|
||||
+
|
||||
+ public void setFlyingVelocityMod(Vector flying) {
|
||||
+ flyingX = flying.getX();
|
||||
+ flyingY = flying.getY();
|
||||
+ flyingZ = flying.getZ();
|
||||
+ }
|
||||
+
|
||||
+ public Vector getDerailedVelocityMod() {
|
||||
+ return new Vector(derailedX, derailedY, derailedZ);
|
||||
+ }
|
||||
+
|
||||
+ public void setDerailedVelocityMod(Vector derailed) {
|
||||
+ derailedX = derailed.getX();
|
||||
+ derailedY = derailed.getY();
|
||||
+ derailedZ = derailed.getZ();
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
--- a/net/minecraft/server/EntityMinecartCommandBlock.java
|
||||
+++ b/net/minecraft/server/EntityMinecartCommandBlock.java
|
||||
@@ -103,5 +103,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);
|
||||
}
|
||||
+
|
||||
+ // CraftBukkit start
|
||||
+ @Override
|
||||
+ public org.bukkit.command.CommandSender getBukkitSender(CommandListenerWrapper wrapper) {
|
||||
+ return (org.bukkit.craftbukkit.entity.CraftMinecartCommand) EntityMinecartCommandBlock.this.getBukkitEntity();
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
--- a/net/minecraft/server/EntityMinecartContainer.java
|
||||
+++ b/net/minecraft/server/EntityMinecartContainer.java
|
||||
@@ -3,6 +3,14 @@
|
||||
import java.util.Iterator;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
+// CraftBukkit start
|
||||
+import java.util.List;
|
||||
+import org.bukkit.Location;
|
||||
+import org.bukkit.craftbukkit.entity.CraftHumanEntity;
|
||||
+import org.bukkit.entity.HumanEntity;
|
||||
+import org.bukkit.inventory.InventoryHolder;
|
||||
+// CraftBukkit end
|
||||
+
|
||||
public abstract class EntityMinecartContainer extends EntityMinecartAbstract implements IInventory, ITileInventory {
|
||||
|
||||
private NonNullList<ItemStack> items;
|
||||
@@ -11,15 +19,56 @@
|
||||
public MinecraftKey lootTable;
|
||||
public long lootTableSeed;
|
||||
|
||||
+ // CraftBukkit start
|
||||
+ public List<HumanEntity> transaction = new java.util.ArrayList<HumanEntity>();
|
||||
+ private int maxStack = MAX_STACK;
|
||||
+
|
||||
+ public List<ItemStack> getContents() {
|
||||
+ return this.items;
|
||||
+ }
|
||||
+
|
||||
+ public void onOpen(CraftHumanEntity who) {
|
||||
+ transaction.add(who);
|
||||
+ }
|
||||
+
|
||||
+ public void onClose(CraftHumanEntity who) {
|
||||
+ transaction.remove(who);
|
||||
+ }
|
||||
+
|
||||
+ public List<HumanEntity> getViewers() {
|
||||
+ return transaction;
|
||||
+ }
|
||||
+
|
||||
+ public InventoryHolder getOwner() {
|
||||
+ org.bukkit.entity.Entity cart = getBukkitEntity();
|
||||
+ if(cart instanceof InventoryHolder) return (InventoryHolder) cart;
|
||||
+ return null;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public int getMaxStackSize() {
|
||||
+ return maxStack;
|
||||
+ }
|
||||
+
|
||||
+ public void setMaxStackSize(int size) {
|
||||
+ maxStack = size;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public Location getLocation() {
|
||||
+ return getBukkitEntity().getLocation();
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
+
|
||||
protected EntityMinecartContainer(EntityTypes<?> entitytypes, World world) {
|
||||
super(entitytypes, world);
|
||||
- this.items = NonNullList.a(36, ItemStack.b);
|
||||
+ this.items = NonNullList.a(this.getSize(), ItemStack.b); // CraftBukkit - SPIGOT-3513
|
||||
this.c = true;
|
||||
}
|
||||
|
||||
protected EntityMinecartContainer(EntityTypes<?> entitytypes, double d0, double d1, double d2, World world) {
|
||||
super(entitytypes, world, d0, d1, d2);
|
||||
- this.items = NonNullList.a(36, ItemStack.b);
|
||||
+ this.items = NonNullList.a(this.getSize(), ItemStack.b); // CraftBukkit - SPIGOT-3513
|
||||
this.c = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user