@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/entity/item/EntityFallingBlock.java
|
||||
+++ b/net/minecraft/world/entity/item/EntityFallingBlock.java
|
||||
@@ -48,6 +48,8 @@
|
||||
@@ -49,6 +49,8 @@
|
||||
import net.minecraft.world.phys.Vec3D;
|
||||
import org.slf4j.Logger;
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
public class EntityFallingBlock extends Entity {
|
||||
|
||||
private static final Logger LOGGER = LogUtils.getLogger();
|
||||
@@ -82,10 +84,17 @@
|
||||
@@ -83,10 +85,17 @@
|
||||
}
|
||||
|
||||
public static EntityFallingBlock fall(World world, BlockPosition blockposition, IBlockData iblockdata) {
|
||||
@@ -28,7 +28,7 @@
|
||||
return entityfallingblock;
|
||||
}
|
||||
|
||||
@@ -168,6 +177,12 @@
|
||||
@@ -169,6 +178,12 @@
|
||||
this.blockState = (IBlockData) this.blockState.setValue(BlockProperties.WATERLOGGED, true);
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
if (this.level.setBlock(blockposition, this.blockState, 3)) {
|
||||
((WorldServer) this.level).getChunkSource().chunkMap.broadcast(this, new PacketPlayOutBlockChange(blockposition, this.level.getBlockState(blockposition)));
|
||||
this.discard();
|
||||
@@ -238,7 +253,7 @@
|
||||
@@ -239,7 +254,7 @@
|
||||
if (i < 0) {
|
||||
return false;
|
||||
} else {
|
||||
@@ -50,7 +50,7 @@
|
||||
DamageSource damagesource1;
|
||||
|
||||
if (this.blockState.getBlock() instanceof Fallable) {
|
||||
@@ -254,7 +269,9 @@
|
||||
@@ -255,7 +270,9 @@
|
||||
float f2 = (float) Math.min(MathHelper.floor((float) i * this.fallDamagePerDistance), this.fallDamageMax);
|
||||
|
||||
this.level.getEntities((Entity) this, this.getBoundingBox(), predicate).forEach((entity) -> {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/entity/item/EntityItem.java
|
||||
+++ b/net/minecraft/world/entity/item/EntityItem.java
|
||||
@@ -30,6 +30,12 @@
|
||||
@@ -31,6 +31,12 @@
|
||||
import net.minecraft.world.level.gameevent.GameEvent;
|
||||
import net.minecraft.world.phys.Vec3D;
|
||||
|
||||
@@ -10,18 +10,18 @@
|
||||
+import org.bukkit.event.player.PlayerPickupItemEvent;
|
||||
+// CraftBukkit end
|
||||
+
|
||||
public class EntityItem extends Entity {
|
||||
public class EntityItem extends Entity implements TraceableEntity {
|
||||
|
||||
private static final DataWatcherObject<ItemStack> DATA_ITEM = DataWatcher.defineId(EntityItem.class, DataWatcherRegistry.ITEM_STACK);
|
||||
@@ -44,6 +50,7 @@
|
||||
@@ -45,6 +51,7 @@
|
||||
@Nullable
|
||||
private UUID owner;
|
||||
public UUID target;
|
||||
public final float bobOffs;
|
||||
+ private int lastTick = MinecraftServer.currentTick - 1; // CraftBukkit
|
||||
|
||||
public EntityItem(EntityTypes<? extends EntityItem> entitytypes, World world) {
|
||||
super(entitytypes, world);
|
||||
@@ -101,9 +108,12 @@
|
||||
@@ -110,9 +117,12 @@
|
||||
this.discard();
|
||||
} else {
|
||||
super.tick();
|
||||
@@ -37,7 +37,7 @@
|
||||
|
||||
this.xo = this.getX();
|
||||
this.yo = this.getY();
|
||||
@@ -153,9 +163,11 @@
|
||||
@@ -162,9 +172,11 @@
|
||||
this.mergeWithNeighbours();
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
|
||||
this.hasImpulse |= this.updateInWaterStateAndDoFluidPushing();
|
||||
if (!this.level.isClientSide) {
|
||||
@@ -167,6 +179,12 @@
|
||||
@@ -176,6 +188,12 @@
|
||||
}
|
||||
|
||||
if (!this.level.isClientSide && this.age >= 6000) {
|
||||
@@ -62,7 +62,7 @@
|
||||
this.discard();
|
||||
}
|
||||
|
||||
@@ -242,10 +260,11 @@
|
||||
@@ -251,10 +269,11 @@
|
||||
private static void merge(EntityItem entityitem, ItemStack itemstack, ItemStack itemstack1) {
|
||||
ItemStack itemstack2 = merge(itemstack, itemstack1, 64);
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
merge(entityitem, itemstack, itemstack1);
|
||||
entityitem.pickupDelay = Math.max(entityitem.pickupDelay, entityitem1.pickupDelay);
|
||||
entityitem.age = Math.min(entityitem.age, entityitem1.age);
|
||||
@@ -271,6 +290,11 @@
|
||||
@@ -280,6 +299,11 @@
|
||||
} else if (this.level.isClientSide) {
|
||||
return true;
|
||||
} else {
|
||||
@@ -87,7 +87,7 @@
|
||||
this.markHurt();
|
||||
this.health = (int) ((float) this.health - f);
|
||||
this.gameEvent(GameEvent.ENTITY_DAMAGE, damagesource.getEntity());
|
||||
@@ -334,6 +358,46 @@
|
||||
@@ -343,6 +367,46 @@
|
||||
Item item = itemstack.getItem();
|
||||
int i = itemstack.getCount();
|
||||
|
||||
@@ -131,10 +131,10 @@
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
+
|
||||
if (this.pickupDelay == 0 && (this.owner == null || this.owner.equals(entityhuman.getUUID())) && entityhuman.getInventory().add(itemstack)) {
|
||||
if (this.pickupDelay == 0 && (this.target == null || this.target.equals(entityhuman.getUUID())) && entityhuman.getInventory().add(itemstack)) {
|
||||
entityhuman.take(this, i);
|
||||
if (itemstack.isEmpty()) {
|
||||
@@ -377,7 +441,9 @@
|
||||
@@ -386,7 +450,9 @@
|
||||
}
|
||||
|
||||
public void setItem(ItemStack itemstack) {
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
--- a/net/minecraft/world/entity/item/EntityTNTPrimed.java
|
||||
+++ b/net/minecraft/world/entity/item/EntityTNTPrimed.java
|
||||
@@ -14,12 +14,16 @@
|
||||
import net.minecraft.world.entity.EnumMoveType;
|
||||
@@ -15,12 +15,16 @@
|
||||
import net.minecraft.world.entity.TraceableEntity;
|
||||
import net.minecraft.world.level.World;
|
||||
|
||||
+import org.bukkit.event.entity.ExplosionPrimeEvent; // CraftBukkit
|
||||
+
|
||||
public class EntityTNTPrimed extends Entity {
|
||||
public class EntityTNTPrimed extends Entity implements TraceableEntity {
|
||||
|
||||
private static final DataWatcherObject<Integer> DATA_FUSE_ID = DataWatcher.defineId(EntityTNTPrimed.class, DataWatcherRegistry.INT);
|
||||
private static final int DEFAULT_FUSE_TIME = 80;
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
public EntityTNTPrimed(EntityTypes<? extends EntityTNTPrimed> entitytypes, World world) {
|
||||
super(entitytypes, world);
|
||||
@@ -70,10 +74,13 @@
|
||||
@@ -71,10 +75,13 @@
|
||||
|
||||
this.setFuse(i);
|
||||
if (i <= 0) {
|
||||
@@ -32,7 +32,7 @@
|
||||
} else {
|
||||
this.updateInWaterStateAndDoFluidPushing();
|
||||
if (this.level.isClientSide) {
|
||||
@@ -84,9 +91,16 @@
|
||||
@@ -85,9 +92,16 @@
|
||||
}
|
||||
|
||||
private void explode() {
|
||||
|
||||
Reference in New Issue
Block a user