@@ -1,8 +1,8 @@
|
||||
--- a/net/minecraft/world/entity/Entity.java
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -116,8 +116,64 @@
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
@@ -119,8 +119,64 @@
|
||||
import net.minecraft.world.scores.ScoreboardTeamBase;
|
||||
import org.slf4j.Logger;
|
||||
|
||||
+// CraftBukkit start
|
||||
+import net.minecraft.world.level.dimension.WorldDimension;
|
||||
@@ -62,10 +62,10 @@
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
+
|
||||
protected static final Logger LOGGER = LogManager.getLogger();
|
||||
private static final Logger LOGGER = LogUtils.getLogger();
|
||||
public static final String ID_TAG = "id";
|
||||
public static final String PASSENGERS_TAG = "Passengers";
|
||||
@@ -228,6 +284,24 @@
|
||||
@@ -231,6 +287,24 @@
|
||||
public boolean hasVisualFire;
|
||||
@Nullable
|
||||
private IBlockData feetBlockState;
|
||||
@@ -90,7 +90,7 @@
|
||||
|
||||
public Entity(EntityTypes<?> entitytypes, World world) {
|
||||
this.id = Entity.ENTITY_COUNTER.incrementAndGet();
|
||||
@@ -365,6 +439,12 @@
|
||||
@@ -369,6 +443,12 @@
|
||||
public void onClientRemoval() {}
|
||||
|
||||
public void setPose(EntityPose entitypose) {
|
||||
@@ -103,7 +103,7 @@
|
||||
this.entityData.set(Entity.DATA_POSE, entitypose);
|
||||
}
|
||||
|
||||
@@ -381,6 +461,33 @@
|
||||
@@ -385,6 +465,33 @@
|
||||
}
|
||||
|
||||
protected void setRot(float f, float f1) {
|
||||
@@ -137,7 +137,7 @@
|
||||
this.setYRot(f % 360.0F);
|
||||
this.setXRot(f1 % 360.0F);
|
||||
}
|
||||
@@ -422,6 +529,15 @@
|
||||
@@ -426,6 +533,15 @@
|
||||
this.baseTick();
|
||||
}
|
||||
|
||||
@@ -153,7 +153,7 @@
|
||||
public void baseTick() {
|
||||
this.level.getProfiler().push("entityBaseTick");
|
||||
this.feetBlockState = null;
|
||||
@@ -436,7 +552,7 @@
|
||||
@@ -440,7 +556,7 @@
|
||||
this.walkDistO = this.walkDist;
|
||||
this.xRotO = this.getXRot();
|
||||
this.yRotO = this.getYRot();
|
||||
@@ -162,7 +162,7 @@
|
||||
if (this.canSpawnSprintParticle()) {
|
||||
this.spawnSprintParticle();
|
||||
}
|
||||
@@ -471,6 +587,10 @@
|
||||
@@ -475,6 +591,10 @@
|
||||
if (this.isInLava()) {
|
||||
this.lavaHurt();
|
||||
this.fallDistance *= 0.5F;
|
||||
@@ -173,7 +173,7 @@
|
||||
}
|
||||
|
||||
this.checkOutOfWorld();
|
||||
@@ -514,15 +634,48 @@
|
||||
@@ -518,15 +638,48 @@
|
||||
|
||||
public void lavaHurt() {
|
||||
if (!this.fireImmune()) {
|
||||
@@ -223,7 +223,7 @@
|
||||
int j = i * 20;
|
||||
|
||||
if (this instanceof EntityLiving) {
|
||||
@@ -627,6 +780,28 @@
|
||||
@@ -640,6 +793,28 @@
|
||||
block.updateEntityAfterFallOn(this.level, this);
|
||||
}
|
||||
|
||||
@@ -252,7 +252,7 @@
|
||||
if (this.onGround && !this.isSteppingCarefully()) {
|
||||
block.stepOn(this.level, blockposition, iblockdata, this);
|
||||
}
|
||||
@@ -1260,6 +1435,7 @@
|
||||
@@ -1265,6 +1440,7 @@
|
||||
this.yo = d1;
|
||||
this.zo = d4;
|
||||
this.setPos(d3, d1, d4);
|
||||
@@ -260,7 +260,7 @@
|
||||
}
|
||||
|
||||
public void moveTo(Vec3D vec3d) {
|
||||
@@ -1450,6 +1626,12 @@
|
||||
@@ -1455,6 +1631,12 @@
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -273,7 +273,7 @@
|
||||
public void awardKillScore(Entity entity, int i, DamageSource damagesource) {
|
||||
if (entity instanceof EntityPlayer) {
|
||||
CriterionTriggers.ENTITY_KILLED_PLAYER.trigger((EntityPlayer) entity, this, damagesource);
|
||||
@@ -1483,7 +1665,7 @@
|
||||
@@ -1488,7 +1670,7 @@
|
||||
} else {
|
||||
String s = this.getEncodeId();
|
||||
|
||||
@@ -282,7 +282,7 @@
|
||||
return false;
|
||||
} else {
|
||||
nbttagcompound.putString("id", s);
|
||||
@@ -1508,6 +1690,18 @@
|
||||
@@ -1513,6 +1695,18 @@
|
||||
Vec3D vec3d = this.getDeltaMovement();
|
||||
|
||||
nbttagcompound.put("Motion", this.newDoubleList(vec3d.x, vec3d.y, vec3d.z));
|
||||
@@ -301,7 +301,7 @@
|
||||
nbttagcompound.put("Rotation", this.newFloatList(this.getYRot(), this.getXRot()));
|
||||
nbttagcompound.putFloat("FallDistance", this.fallDistance);
|
||||
nbttagcompound.putShort("Fire", (short) this.remainingFireTicks);
|
||||
@@ -1516,6 +1710,22 @@
|
||||
@@ -1521,6 +1715,22 @@
|
||||
nbttagcompound.putBoolean("Invulnerable", this.invulnerable);
|
||||
nbttagcompound.putInt("PortalCooldown", this.portalCooldown);
|
||||
nbttagcompound.putUUID("UUID", this.getUUID());
|
||||
@@ -324,7 +324,7 @@
|
||||
IChatBaseComponent ichatbasecomponent = this.getCustomName();
|
||||
|
||||
if (ichatbasecomponent != null) {
|
||||
@@ -1583,6 +1793,11 @@
|
||||
@@ -1588,6 +1798,11 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -336,7 +336,7 @@
|
||||
return nbttagcompound;
|
||||
} catch (Throwable throwable) {
|
||||
CrashReport crashreport = CrashReport.forThrowable(throwable, "Saving entity NBT");
|
||||
@@ -1664,6 +1879,53 @@
|
||||
@@ -1669,6 +1884,53 @@
|
||||
} else {
|
||||
throw new IllegalStateException("Entity has invalid position");
|
||||
}
|
||||
@@ -390,7 +390,7 @@
|
||||
} catch (Throwable throwable) {
|
||||
CrashReport crashreport = CrashReport.forThrowable(throwable, "Loading entity NBT");
|
||||
CrashReportSystemDetails crashreportsystemdetails = crashreport.addCategory("Entity being loaded");
|
||||
@@ -1739,9 +2001,22 @@
|
||||
@@ -1744,9 +2006,22 @@
|
||||
} else if (this.level.isClientSide) {
|
||||
return null;
|
||||
} else {
|
||||
@@ -413,7 +413,7 @@
|
||||
this.level.addFreshEntity(entityitem);
|
||||
return entityitem;
|
||||
}
|
||||
@@ -1836,7 +2111,7 @@
|
||||
@@ -1840,7 +2115,7 @@
|
||||
|
||||
this.setPose(EntityPose.STANDING);
|
||||
this.vehicle = entity;
|
||||
@@ -422,7 +422,7 @@
|
||||
entity.getIndirectPassengersStream().filter((entity2) -> {
|
||||
return entity2 instanceof EntityPlayer;
|
||||
}).forEach((entity2) -> {
|
||||
@@ -1867,7 +2142,7 @@
|
||||
@@ -1871,7 +2146,7 @@
|
||||
Entity entity = this.vehicle;
|
||||
|
||||
this.vehicle = null;
|
||||
@@ -431,7 +431,7 @@
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1876,10 +2151,31 @@
|
||||
@@ -1880,10 +2155,31 @@
|
||||
this.removeVehicle();
|
||||
}
|
||||
|
||||
@@ -464,7 +464,7 @@
|
||||
if (this.passengers.isEmpty()) {
|
||||
this.passengers = ImmutableList.of(entity);
|
||||
} else {
|
||||
@@ -1895,12 +2191,32 @@
|
||||
@@ -1899,12 +2195,32 @@
|
||||
}
|
||||
|
||||
}
|
||||
@@ -498,7 +498,7 @@
|
||||
if (this.passengers.size() == 1 && this.passengers.get(0) == entity) {
|
||||
this.passengers = ImmutableList.of();
|
||||
} else {
|
||||
@@ -1911,6 +2227,7 @@
|
||||
@@ -1915,6 +2231,7 @@
|
||||
|
||||
entity.boardingCooldown = 60;
|
||||
}
|
||||
@@ -506,7 +506,7 @@
|
||||
}
|
||||
|
||||
protected boolean canAddPassenger(Entity entity) {
|
||||
@@ -1961,14 +2278,20 @@
|
||||
@@ -1977,14 +2294,20 @@
|
||||
|
||||
if (this.isInsidePortal) {
|
||||
MinecraftServer minecraftserver = worldserver.getServer();
|
||||
@@ -530,7 +530,7 @@
|
||||
this.level.getProfiler().pop();
|
||||
}
|
||||
|
||||
@@ -2086,6 +2409,13 @@
|
||||
@@ -2102,6 +2425,13 @@
|
||||
}
|
||||
|
||||
public void setSwimming(boolean flag) {
|
||||
@@ -544,7 +544,7 @@
|
||||
this.setSharedFlag(4, flag);
|
||||
}
|
||||
|
||||
@@ -2134,8 +2464,12 @@
|
||||
@@ -2150,8 +2480,12 @@
|
||||
return this.getTeam() != null ? this.getTeam().isAlliedTo(scoreboardteambase) : false;
|
||||
}
|
||||
|
||||
@@ -558,7 +558,7 @@
|
||||
}
|
||||
|
||||
public boolean getSharedFlag(int i) {
|
||||
@@ -2154,7 +2488,7 @@
|
||||
@@ -2170,7 +2504,7 @@
|
||||
}
|
||||
|
||||
public int getMaxAirSupply() {
|
||||
@@ -567,7 +567,7 @@
|
||||
}
|
||||
|
||||
public int getAirSupply() {
|
||||
@@ -2162,7 +2496,18 @@
|
||||
@@ -2178,7 +2512,18 @@
|
||||
}
|
||||
|
||||
public void setAirSupply(int i) {
|
||||
@@ -587,7 +587,7 @@
|
||||
}
|
||||
|
||||
public int getTicksFrozen() {
|
||||
@@ -2189,11 +2534,41 @@
|
||||
@@ -2205,11 +2550,41 @@
|
||||
|
||||
public void thunderHit(WorldServer worldserver, EntityLightning entitylightning) {
|
||||
this.setRemainingFireTicks(this.remainingFireTicks + 1);
|
||||
@@ -631,7 +631,7 @@
|
||||
}
|
||||
|
||||
public void onAboveBubbleCol(boolean flag) {
|
||||
@@ -2349,15 +2724,38 @@
|
||||
@@ -2365,15 +2740,38 @@
|
||||
|
||||
@Nullable
|
||||
public Entity changeDimension(WorldServer worldserver) {
|
||||
@@ -672,7 +672,7 @@
|
||||
this.level.getProfiler().popPush("reloading");
|
||||
Entity entity = this.getType().create(worldserver);
|
||||
|
||||
@@ -2366,9 +2764,17 @@
|
||||
@@ -2382,9 +2780,17 @@
|
||||
entity.moveTo(shapedetectorshape.pos.x, shapedetectorshape.pos.y, shapedetectorshape.pos.z, shapedetectorshape.yRot, entity.getXRot());
|
||||
entity.setDeltaMovement(shapedetectorshape.speed);
|
||||
worldserver.addDuringTeleport(entity);
|
||||
@@ -692,7 +692,7 @@
|
||||
}
|
||||
|
||||
this.removeAfterChangingDimensions();
|
||||
@@ -2389,20 +2795,34 @@
|
||||
@@ -2405,20 +2811,34 @@
|
||||
|
||||
@Nullable
|
||||
protected ShapeDetectorShape findDimensionEntryPoint(WorldServer worldserver) {
|
||||
@@ -732,7 +732,7 @@
|
||||
IBlockData iblockdata = this.level.getBlockState(this.portalEntrancePos);
|
||||
EnumDirection.EnumAxis enumdirection_enumaxis;
|
||||
Vec3D vec3d;
|
||||
@@ -2419,8 +2839,8 @@
|
||||
@@ -2435,8 +2855,8 @@
|
||||
vec3d = new Vec3D(0.5D, 0.0D, 0.0D);
|
||||
}
|
||||
|
||||
@@ -743,7 +743,7 @@
|
||||
}
|
||||
} else {
|
||||
BlockPosition blockposition1;
|
||||
@@ -2430,8 +2850,15 @@
|
||||
@@ -2446,8 +2866,15 @@
|
||||
} else {
|
||||
blockposition1 = worldserver.getHeightmapPos(HeightMap.Type.MOTION_BLOCKING_NO_LEAVES, worldserver.getSharedSpawnPos());
|
||||
}
|
||||
@@ -760,7 +760,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2439,8 +2866,23 @@
|
||||
@@ -2455,8 +2882,23 @@
|
||||
return BlockPortalShape.getRelativePosition(blockutil_rectangle, enumdirection_enumaxis, this.position(), this.getDimensions(this.getPose()));
|
||||
}
|
||||
|
||||
@@ -786,7 +786,7 @@
|
||||
}
|
||||
|
||||
public boolean canChangeDimensions() {
|
||||
@@ -2649,7 +3091,26 @@
|
||||
@@ -2665,7 +3107,26 @@
|
||||
}
|
||||
|
||||
public final void setBoundingBox(AxisAlignedBB axisalignedbb) {
|
||||
@@ -814,12 +814,12 @@
|
||||
}
|
||||
|
||||
protected float getEyeHeight(EntityPose entitypose, EntitySize entitysize) {
|
||||
@@ -2933,6 +3394,11 @@
|
||||
@@ -2949,6 +3410,11 @@
|
||||
vec3d = vec3d.add(vec3d1);
|
||||
++k1;
|
||||
}
|
||||
+ // CraftBukkit start - store last lava contact location
|
||||
+ if (tag == TagsFluid.LAVA) {
|
||||
+ if (tagkey == TagsFluid.LAVA) {
|
||||
+ this.lastLavaContact = blockposition_mutableblockposition.immutable();
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
--- a/net/minecraft/world/entity/EntityAreaEffectCloud.java
|
||||
+++ b/net/minecraft/world/entity/EntityAreaEffectCloud.java
|
||||
@@ -32,6 +32,12 @@
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import net.minecraft.world.level.material.EnumPistonReaction;
|
||||
import org.slf4j.Logger;
|
||||
|
||||
+// CraftBukkit start
|
||||
+import net.minecraft.resources.MinecraftKey;
|
||||
@@ -12,7 +12,7 @@
|
||||
+
|
||||
public class EntityAreaEffectCloud extends Entity {
|
||||
|
||||
private static final Logger LOGGER = LogManager.getLogger();
|
||||
private static final Logger LOGGER = LogUtils.getLogger();
|
||||
@@ -127,6 +133,22 @@
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/entity/EntityExperienceOrb.java
|
||||
+++ b/net/minecraft/world/entity/EntityExperienceOrb.java
|
||||
@@ -21,6 +21,12 @@
|
||||
@@ -20,6 +20,12 @@
|
||||
import net.minecraft.world.phys.AxisAlignedBB;
|
||||
import net.minecraft.world.phys.Vec3D;
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
public class EntityExperienceOrb extends Entity {
|
||||
|
||||
private static final int LIFETIME = 6000;
|
||||
@@ -59,6 +65,7 @@
|
||||
@@ -58,6 +64,7 @@
|
||||
@Override
|
||||
public void tick() {
|
||||
super.tick();
|
||||
@@ -21,7 +21,7 @@
|
||||
this.xo = this.getX();
|
||||
this.yo = this.getY();
|
||||
this.zo = this.getZ();
|
||||
@@ -84,7 +91,22 @@
|
||||
@@ -83,7 +90,22 @@
|
||||
this.followingPlayer = null;
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
Vec3D vec3d = new Vec3D(this.followingPlayer.getX() - this.getX(), this.followingPlayer.getY() + (double) this.followingPlayer.getEyeHeight() / 2.0D - this.getY(), this.followingPlayer.getZ() - this.getZ());
|
||||
double d0 = vec3d.lengthSqr();
|
||||
|
||||
@@ -225,7 +247,7 @@
|
||||
@@ -226,7 +248,7 @@
|
||||
int i = this.repairPlayerItems(entityhuman, this.value);
|
||||
|
||||
if (i > 0) {
|
||||
@@ -54,7 +54,7 @@
|
||||
}
|
||||
|
||||
--this.count;
|
||||
@@ -243,9 +265,17 @@
|
||||
@@ -244,9 +266,17 @@
|
||||
if (entry != null) {
|
||||
ItemStack itemstack = (ItemStack) entry.getValue();
|
||||
int j = Math.min(this.xpToDurability(this.value), itemstack.getDamageValue());
|
||||
@@ -72,7 +72,7 @@
|
||||
|
||||
return k > 0 ? this.repairPlayerItems(entityhuman, k) : 0;
|
||||
} else {
|
||||
@@ -270,6 +300,24 @@
|
||||
@@ -271,6 +301,24 @@
|
||||
}
|
||||
|
||||
public static int getExperienceValue(int i) {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
--- a/net/minecraft/world/entity/EntityLiving.java
|
||||
+++ b/net/minecraft/world/entity/EntityLiving.java
|
||||
@@ -116,6 +116,30 @@
|
||||
@@ -117,6 +117,30 @@
|
||||
import net.minecraft.world.scores.ScoreboardTeam;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.slf4j.Logger;
|
||||
|
||||
+// CraftBukkit start
|
||||
+import java.util.ArrayList;
|
||||
@@ -30,8 +30,8 @@
|
||||
+
|
||||
public abstract class EntityLiving extends Entity {
|
||||
|
||||
private static final UUID SPEED_MODIFIER_SPRINTING_UUID = UUID.fromString("662A6B8D-DA3E-4C1C-8813-96EA6097278D");
|
||||
@@ -224,6 +248,20 @@
|
||||
private static final Logger LOGGER = LogUtils.getLogger();
|
||||
@@ -226,6 +250,20 @@
|
||||
private float swimAmount;
|
||||
private float swimAmountO;
|
||||
protected BehaviorController<?> brain;
|
||||
@@ -52,7 +52,7 @@
|
||||
|
||||
protected EntityLiving(EntityTypes<? extends EntityLiving> entitytypes, World world) {
|
||||
super(entitytypes, world);
|
||||
@@ -236,7 +274,9 @@
|
||||
@@ -238,7 +276,9 @@
|
||||
this.useItem = ItemStack.EMPTY;
|
||||
this.lastClimbablePos = Optional.empty();
|
||||
this.attributes = new AttributeMapBase(AttributeDefaults.getSupplier(entitytypes));
|
||||
@@ -63,7 +63,7 @@
|
||||
this.blocksBuilding = true;
|
||||
this.rotA = (float) ((Math.random() + 1.0D) * 0.009999999776482582D);
|
||||
this.reapplyPosition();
|
||||
@@ -303,7 +343,13 @@
|
||||
@@ -305,7 +345,13 @@
|
||||
double d1 = Math.min((double) (0.2F + f / 15.0F), 2.5D);
|
||||
int i = (int) (150.0D * d1);
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -561,7 +607,7 @@
|
||||
@@ -563,7 +609,7 @@
|
||||
|
||||
protected void tickDeath() {
|
||||
++this.deathTime;
|
||||
@@ -87,7 +87,7 @@
|
||||
this.level.broadcastEntityEvent(this, (byte) 60);
|
||||
this.remove(Entity.RemovalReason.KILLED);
|
||||
}
|
||||
@@ -653,9 +699,15 @@
|
||||
@@ -655,9 +701,15 @@
|
||||
}
|
||||
|
||||
protected void equipEventAndSound(ItemStack itemstack) {
|
||||
@@ -104,7 +104,7 @@
|
||||
this.gameEvent(GameEvent.EQUIP);
|
||||
this.playSound(soundeffect, 1.0F, 1.0F);
|
||||
}
|
||||
@@ -717,6 +769,17 @@
|
||||
@@ -719,6 +771,17 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -122,7 +122,7 @@
|
||||
if (nbttagcompound.contains("Health", 99)) {
|
||||
this.setHealth(nbttagcompound.getFloat("Health"));
|
||||
}
|
||||
@@ -754,9 +817,32 @@
|
||||
@@ -756,9 +819,32 @@
|
||||
|
||||
}
|
||||
|
||||
@@ -155,7 +155,7 @@
|
||||
try {
|
||||
while (iterator.hasNext()) {
|
||||
MobEffectList mobeffectlist = (MobEffectList) iterator.next();
|
||||
@@ -766,6 +852,12 @@
|
||||
@@ -768,6 +854,12 @@
|
||||
this.onEffectUpdated(mobeffect, true, (Entity) null);
|
||||
})) {
|
||||
if (!this.level.isClientSide) {
|
||||
@@ -168,7 +168,7 @@
|
||||
iterator.remove();
|
||||
this.onEffectRemoved(mobeffect);
|
||||
}
|
||||
@@ -776,6 +868,17 @@
|
||||
@@ -778,6 +870,17 @@
|
||||
} catch (ConcurrentModificationException concurrentmodificationexception) {
|
||||
;
|
||||
}
|
||||
@@ -186,7 +186,7 @@
|
||||
|
||||
if (this.effectsDirty) {
|
||||
if (!this.level.isClientSide) {
|
||||
@@ -902,7 +1005,13 @@
|
||||
@@ -904,7 +1007,13 @@
|
||||
this.entityData.set(EntityLiving.DATA_EFFECT_COLOR_ID, 0);
|
||||
}
|
||||
|
||||
@@ -200,7 +200,7 @@
|
||||
if (this.level.isClientSide) {
|
||||
return false;
|
||||
} else {
|
||||
@@ -911,7 +1020,14 @@
|
||||
@@ -913,7 +1022,14 @@
|
||||
boolean flag;
|
||||
|
||||
for (flag = false; iterator.hasNext(); flag = true) {
|
||||
@@ -216,7 +216,7 @@
|
||||
iterator.remove();
|
||||
}
|
||||
|
||||
@@ -940,18 +1056,48 @@
|
||||
@@ -942,18 +1058,48 @@
|
||||
return this.addEffect(mobeffect, (Entity) null);
|
||||
}
|
||||
|
||||
@@ -266,7 +266,7 @@
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
@@ -988,13 +1134,39 @@
|
||||
@@ -990,13 +1136,39 @@
|
||||
return this.getMobType() == EnumMonsterType.UNDEAD;
|
||||
}
|
||||
|
||||
@@ -307,7 +307,7 @@
|
||||
|
||||
if (mobeffect != null) {
|
||||
this.onEffectRemoved(mobeffect);
|
||||
@@ -1031,20 +1203,55 @@
|
||||
@@ -1033,20 +1205,55 @@
|
||||
|
||||
}
|
||||
|
||||
@@ -364,7 +364,7 @@
|
||||
this.entityData.set(EntityLiving.DATA_HEALTH_ID, MathHelper.clamp(f, 0.0F, this.getMaxHealth()));
|
||||
}
|
||||
|
||||
@@ -1058,7 +1265,7 @@
|
||||
@@ -1060,7 +1267,7 @@
|
||||
return false;
|
||||
} else if (this.level.isClientSide) {
|
||||
return false;
|
||||
@@ -373,7 +373,7 @@
|
||||
return false;
|
||||
} else if (damagesource.isFire() && this.hasEffect(MobEffects.FIRE_RESISTANCE)) {
|
||||
return false;
|
||||
@@ -1069,10 +1276,11 @@
|
||||
@@ -1071,10 +1278,11 @@
|
||||
|
||||
this.noActionTime = 0;
|
||||
float f1 = f;
|
||||
@@ -387,7 +387,7 @@
|
||||
this.hurtCurrentlyUsedShield(f);
|
||||
f2 = f;
|
||||
f = 0.0F;
|
||||
@@ -1090,27 +1298,46 @@
|
||||
@@ -1092,27 +1300,46 @@
|
||||
this.animationSpeed = 1.5F;
|
||||
boolean flag1 = true;
|
||||
|
||||
@@ -439,7 +439,7 @@
|
||||
this.hurtDir = 0.0F;
|
||||
Entity entity1 = damagesource.getEntity();
|
||||
|
||||
@@ -1233,19 +1460,29 @@
|
||||
@@ -1235,19 +1462,29 @@
|
||||
EnumHand[] aenumhand = EnumHand.values();
|
||||
int i = aenumhand.length;
|
||||
|
||||
@@ -473,7 +473,7 @@
|
||||
EntityPlayer entityplayer = (EntityPlayer) this;
|
||||
|
||||
entityplayer.awardStat(StatisticList.ITEM_USED.get(Items.TOTEM_OF_UNDYING));
|
||||
@@ -1253,14 +1490,16 @@
|
||||
@@ -1255,14 +1492,16 @@
|
||||
}
|
||||
|
||||
this.setHealth(1.0F);
|
||||
@@ -495,7 +495,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1365,14 +1604,22 @@
|
||||
@@ -1367,14 +1606,22 @@
|
||||
IBlockData iblockdata = Blocks.WITHER_ROSE.defaultBlockState();
|
||||
|
||||
if (this.level.getBlockState(blockposition).isAir() && iblockdata.canSurvive(this.level, blockposition)) {
|
||||
@@ -520,7 +520,7 @@
|
||||
this.level.addFreshEntity(entityitem);
|
||||
}
|
||||
}
|
||||
@@ -1392,21 +1639,40 @@
|
||||
@@ -1394,21 +1641,40 @@
|
||||
|
||||
boolean flag = this.lastHurtByPlayerTime > 0;
|
||||
|
||||
@@ -564,7 +564,7 @@
|
||||
|
||||
}
|
||||
|
||||
@@ -1526,9 +1792,14 @@
|
||||
@@ -1528,9 +1794,14 @@
|
||||
int i = this.calculateFallDamage(f, f1);
|
||||
|
||||
if (i > 0) {
|
||||
@@ -580,7 +580,7 @@
|
||||
return true;
|
||||
} else {
|
||||
return flag;
|
||||
@@ -1577,7 +1848,7 @@
|
||||
@@ -1579,7 +1850,7 @@
|
||||
|
||||
protected float getDamageAfterArmorAbsorb(DamageSource damagesource, float f) {
|
||||
if (!damagesource.isBypassArmor()) {
|
||||
@@ -589,7 +589,7 @@
|
||||
f = CombatMath.getDamageAfterAbsorb(f, (float) this.getArmorValue(), (float) this.getAttributeValue(GenericAttributes.ARMOR_TOUGHNESS));
|
||||
}
|
||||
|
||||
@@ -1590,7 +1861,8 @@
|
||||
@@ -1592,7 +1863,8 @@
|
||||
} else {
|
||||
int i;
|
||||
|
||||
@@ -599,7 +599,7 @@
|
||||
i = (this.getEffect(MobEffects.DAMAGE_RESISTANCE).getAmplifier() + 1) * 5;
|
||||
int j = 25 - i;
|
||||
float f1 = f * (float) j;
|
||||
@@ -1621,29 +1893,172 @@
|
||||
@@ -1623,29 +1895,172 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -782,7 +782,7 @@
|
||||
}
|
||||
|
||||
public CombatTracker getCombatTracker() {
|
||||
@@ -1664,8 +2079,18 @@
|
||||
@@ -1666,8 +2081,18 @@
|
||||
}
|
||||
|
||||
public final void setArrowCount(int i) {
|
||||
@@ -802,7 +802,7 @@
|
||||
|
||||
public final int getStingerCount() {
|
||||
return (Integer) this.entityData.get(EntityLiving.DATA_STINGER_COUNT_ID);
|
||||
@@ -1961,6 +2386,12 @@
|
||||
@@ -1963,6 +2388,12 @@
|
||||
|
||||
public abstract ItemStack getItemBySlot(EnumItemSlot enumitemslot);
|
||||
|
||||
@@ -815,7 +815,7 @@
|
||||
@Override
|
||||
public abstract void setItemSlot(EnumItemSlot enumitemslot, ItemStack itemstack);
|
||||
|
||||
@@ -2204,6 +2635,7 @@
|
||||
@@ -2206,6 +2637,7 @@
|
||||
}
|
||||
|
||||
if (this.onGround && !this.level.isClientSide) {
|
||||
@@ -823,7 +823,7 @@
|
||||
this.setSharedFlag(7, false);
|
||||
}
|
||||
} else {
|
||||
@@ -2734,6 +3166,7 @@
|
||||
@@ -2736,6 +3168,7 @@
|
||||
}
|
||||
|
||||
if (!this.level.isClientSide) {
|
||||
@@ -831,7 +831,7 @@
|
||||
this.setSharedFlag(7, flag);
|
||||
}
|
||||
|
||||
@@ -2901,14 +3334,21 @@
|
||||
@@ -2895,14 +3328,21 @@
|
||||
|
||||
@Override
|
||||
public boolean isPickable() {
|
||||
@@ -853,9 +853,9 @@
|
||||
+ // CraftBukkit end
|
||||
+
|
||||
@Override
|
||||
protected void markHurt() {
|
||||
this.hurtMarked = this.random.nextDouble() >= this.getAttributeValue(GenericAttributes.KNOCKBACK_RESISTANCE);
|
||||
@@ -3107,7 +3547,25 @@
|
||||
public float getYHeadRot() {
|
||||
return this.yHeadRot;
|
||||
@@ -3096,7 +3536,25 @@
|
||||
} else {
|
||||
if (!this.useItem.isEmpty() && this.isUsingItem()) {
|
||||
this.triggerItemUseEffects(this.useItem, 16);
|
||||
@@ -882,7 +882,7 @@
|
||||
|
||||
if (itemstack != this.useItem) {
|
||||
this.setItemInHand(enumhand, itemstack);
|
||||
@@ -3180,6 +3638,12 @@
|
||||
@@ -3169,6 +3627,12 @@
|
||||
}
|
||||
|
||||
public boolean randomTeleport(double d0, double d1, double d2, boolean flag) {
|
||||
@@ -895,7 +895,7 @@
|
||||
double d3 = this.getX();
|
||||
double d4 = this.getY();
|
||||
double d5 = this.getZ();
|
||||
@@ -3204,16 +3668,41 @@
|
||||
@@ -3193,16 +3657,41 @@
|
||||
}
|
||||
|
||||
if (flag2) {
|
||||
@@ -940,7 +940,7 @@
|
||||
} else {
|
||||
if (flag) {
|
||||
world.broadcastEntityEvent(this, (byte) 46);
|
||||
@@ -3223,7 +3712,7 @@
|
||||
@@ -3212,7 +3701,7 @@
|
||||
((EntityCreature) this).getNavigation().stop();
|
||||
}
|
||||
|
||||
@@ -949,7 +949,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3306,7 +3795,7 @@
|
||||
@@ -3295,7 +3784,7 @@
|
||||
}
|
||||
|
||||
public void stopSleeping() {
|
||||
@@ -958,7 +958,7 @@
|
||||
World world = this.level;
|
||||
|
||||
java.util.Objects.requireNonNull(this.level);
|
||||
@@ -3338,7 +3827,7 @@
|
||||
@@ -3327,7 +3816,7 @@
|
||||
|
||||
@Nullable
|
||||
public EnumDirection getBedOrientation() {
|
||||
@@ -967,7 +967,7 @@
|
||||
|
||||
return blockposition != null ? BlockBed.getBedOrientation(this.level, blockposition) : null;
|
||||
}
|
||||
@@ -3387,7 +3876,7 @@
|
||||
@@ -3376,7 +3865,7 @@
|
||||
Pair<MobEffect, Float> pair = (Pair) iterator.next();
|
||||
|
||||
if (!world.isClientSide && pair.getFirst() != null && world.random.nextFloat() < (Float) pair.getSecond()) {
|
||||
@@ -976,7 +976,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3490,8 +3979,10 @@
|
||||
@@ -3479,8 +3968,10 @@
|
||||
this.setDeltaMovement((double) ((float) packetplayoutspawnentityliving.getXd() / 8000.0F), (double) ((float) packetplayoutspawnentityliving.getYd() / 8000.0F), (double) ((float) packetplayoutspawnentityliving.getZd() / 8000.0F));
|
||||
}
|
||||
|
||||
@@ -988,7 +988,7 @@
|
||||
private final SoundEffect small;
|
||||
private final SoundEffect big;
|
||||
|
||||
@@ -3507,5 +3998,7 @@
|
||||
@@ -3496,5 +3987,7 @@
|
||||
public SoundEffect big() {
|
||||
return this.big;
|
||||
}
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
--- a/net/minecraft/world/entity/EntityTypes.java
|
||||
+++ b/net/minecraft/world/entity/EntityTypes.java
|
||||
@@ -152,7 +152,7 @@
|
||||
private static final Logger LOGGER = LogManager.getLogger();
|
||||
@@ -154,7 +154,7 @@
|
||||
public static final String ENTITY_TAG = "EntityTag";
|
||||
private final Holder.c<EntityTypes<?>> builtInRegistryHolder;
|
||||
private static final float MAGIC_HORSE_WIDTH = 1.3964844F;
|
||||
- public static final EntityTypes<EntityAreaEffectCloud> AREA_EFFECT_CLOUD = register("area_effect_cloud", EntityTypes.Builder.of(EntityAreaEffectCloud::new, EnumCreatureType.MISC).fireImmune().sized(6.0F, 0.5F).clientTrackingRange(10).updateInterval(Integer.MAX_VALUE));
|
||||
+ public static final EntityTypes<EntityAreaEffectCloud> AREA_EFFECT_CLOUD = register("area_effect_cloud", EntityTypes.Builder.of(EntityAreaEffectCloud::new, EnumCreatureType.MISC).fireImmune().sized(6.0F, 0.5F).clientTrackingRange(10).updateInterval(10)); // CraftBukkit - SPIGOT-3729: track area effect clouds
|
||||
public static final EntityTypes<EntityArmorStand> ARMOR_STAND = register("armor_stand", EntityTypes.Builder.of(EntityArmorStand::new, EnumCreatureType.MISC).sized(0.5F, 1.975F).clientTrackingRange(10));
|
||||
public static final EntityTypes<EntityTippedArrow> ARROW = register("arrow", EntityTypes.Builder.of(EntityTippedArrow::new, EnumCreatureType.MISC).sized(0.5F, 0.5F).clientTrackingRange(4).updateInterval(20));
|
||||
public static final EntityTypes<Axolotl> AXOLOTL = register("axolotl", EntityTypes.Builder.of(Axolotl::new, EnumCreatureType.AXOLOTLS).sized(0.75F, 0.42F).clientTrackingRange(10));
|
||||
@@ -282,8 +282,8 @@
|
||||
@@ -284,8 +284,8 @@
|
||||
private MinecraftKey lootTable;
|
||||
private final EntitySize dimensions;
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
}
|
||||
|
||||
public static MinecraftKey getKey(EntityTypes<?> entitytypes) {
|
||||
@@ -314,10 +314,18 @@
|
||||
@@ -317,10 +317,18 @@
|
||||
|
||||
@Nullable
|
||||
public T spawn(WorldServer worldserver, @Nullable NBTTagCompound nbttagcompound, @Nullable IChatBaseComponent ichatbasecomponent, @Nullable EntityHuman entityhuman, BlockPosition blockposition, EnumMobSpawn enummobspawn, boolean flag, boolean flag1) {
|
||||
@@ -40,7 +40,7 @@
|
||||
}
|
||||
|
||||
return t0;
|
||||
@@ -353,7 +361,7 @@
|
||||
@@ -356,7 +364,7 @@
|
||||
t0.setCustomName(ichatbasecomponent);
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
return t0;
|
||||
}
|
||||
}
|
||||
@@ -510,7 +518,7 @@
|
||||
@@ -513,7 +521,7 @@
|
||||
}
|
||||
|
||||
return entity;
|
||||
@@ -58,7 +58,7 @@
|
||||
}
|
||||
|
||||
public static Stream<Entity> loadEntitiesRecursive(final List<? extends NBTBase> list, final World world) {
|
||||
@@ -567,7 +575,7 @@
|
||||
@@ -570,7 +578,7 @@
|
||||
|
||||
@Nullable
|
||||
public T tryCast(Entity entity) {
|
||||
@@ -67,7 +67,7 @@
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -594,7 +602,7 @@
|
||||
@@ -603,7 +611,7 @@
|
||||
this.canSpawnFarFromPlayer = enumcreaturetype == EnumCreatureType.CREATURE || enumcreaturetype == EnumCreatureType.MISC;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/entity/ai/behavior/BehaviorCareer.java
|
||||
+++ b/net/minecraft/world/entity/ai/behavior/BehaviorCareer.java
|
||||
@@ -13,6 +13,12 @@
|
||||
@@ -12,6 +12,12 @@
|
||||
import net.minecraft.world.entity.npc.EntityVillager;
|
||||
import net.minecraft.world.entity.npc.VillagerProfession;
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
public class BehaviorCareer extends Behavior<EntityVillager> {
|
||||
|
||||
public BehaviorCareer() {
|
||||
@@ -29,7 +35,7 @@
|
||||
@@ -28,7 +34,7 @@
|
||||
GlobalPos globalpos = (GlobalPos) entityvillager.getBrain().getMemory(MemoryModuleType.POTENTIAL_JOB_SITE).get();
|
||||
|
||||
entityvillager.getBrain().eraseMemory(MemoryModuleType.POTENTIAL_JOB_SITE);
|
||||
@@ -22,7 +22,7 @@
|
||||
worldserver.broadcastEntityEvent(entityvillager, (byte) 14);
|
||||
if (entityvillager.getVillagerData().getProfession() == VillagerProfession.NONE) {
|
||||
MinecraftServer minecraftserver = worldserver.getServer();
|
||||
@@ -41,7 +47,14 @@
|
||||
@@ -40,7 +46,14 @@
|
||||
return villagerprofession.getJobPoiType() == villageplacetype;
|
||||
}).findFirst();
|
||||
}).ifPresent((villagerprofession) -> {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/entity/ai/behavior/BehaviorFarm.java
|
||||
+++ b/net/minecraft/world/entity/ai/behavior/BehaviorFarm.java
|
||||
@@ -80,8 +80,8 @@
|
||||
@@ -79,8 +79,8 @@
|
||||
|
||||
protected void start(WorldServer worldserver, EntityVillager entityvillager, long i) {
|
||||
if (i > this.nextOkStartTime && this.aboveFarmlandPos != null) {
|
||||
@@ -11,7 +11,7 @@
|
||||
}
|
||||
|
||||
}
|
||||
@@ -101,7 +101,11 @@
|
||||
@@ -100,7 +100,11 @@
|
||||
Block block1 = worldserver.getBlockState(this.aboveFarmlandPos.below()).getBlock();
|
||||
|
||||
if (block instanceof BlockCrops && ((BlockCrops) block).isMaxAge(iblockdata)) {
|
||||
@@ -24,7 +24,7 @@
|
||||
}
|
||||
|
||||
if (iblockdata.isAir() && block1 instanceof BlockSoil && entityvillager.hasFarmSeeds()) {
|
||||
@@ -112,19 +116,28 @@
|
||||
@@ -111,19 +115,28 @@
|
||||
boolean flag = false;
|
||||
|
||||
if (!itemstack.isEmpty()) {
|
||||
@@ -57,7 +57,7 @@
|
||||
}
|
||||
|
||||
if (flag) {
|
||||
@@ -143,8 +156,8 @@
|
||||
@@ -142,8 +155,8 @@
|
||||
this.aboveFarmlandPos = this.getValidFarmland(worldserver);
|
||||
if (this.aboveFarmlandPos != null) {
|
||||
this.nextOkStartTime = i + 20L;
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
blockdoor.setOpen(entityliving, worldserver, iblockdata, blockposition, true);
|
||||
}
|
||||
|
||||
@@ -82,6 +89,13 @@
|
||||
@@ -84,6 +91,13 @@
|
||||
BlockDoor blockdoor1 = (BlockDoor) iblockdata1.getBlock();
|
||||
|
||||
if (!blockdoor1.isOpen(iblockdata1)) {
|
||||
@@ -28,7 +28,7 @@
|
||||
blockdoor1.setOpen(entityliving, worldserver, iblockdata1, blockposition1, true);
|
||||
this.rememberDoorToClose(worldserver, entityliving, blockposition1);
|
||||
}
|
||||
@@ -130,7 +144,7 @@
|
||||
@@ -134,7 +148,7 @@
|
||||
private static boolean areOtherMobsComingThroughDoor(WorldServer worldserver, EntityLiving entityliving, BlockPosition blockposition) {
|
||||
BehaviorController<?> behaviorcontroller = entityliving.getBrain();
|
||||
|
||||
@@ -36,8 +36,8 @@
|
||||
+ return !behaviorcontroller.hasMemoryValue(MemoryModuleType.NEAREST_LIVING_ENTITIES) ? false : (behaviorcontroller.getMemory(MemoryModuleType.NEAREST_LIVING_ENTITIES).get()).stream().filter((entityliving1) -> { // CraftBukkit - decompile error
|
||||
return entityliving1.getType() == entityliving.getType();
|
||||
}).filter((entityliving1) -> {
|
||||
return blockposition.closerThan((IPosition) entityliving1.position(), 2.0D);
|
||||
@@ -172,7 +186,7 @@
|
||||
return blockposition.closerToCenterThan(entityliving1.position(), 2.0D);
|
||||
@@ -176,7 +190,7 @@
|
||||
if (behaviorcontroller.getMemory(MemoryModuleType.DOORS_TO_CLOSE).isPresent()) {
|
||||
((Set) behaviorcontroller.getMemory(MemoryModuleType.DOORS_TO_CLOSE).get()).add(globalpos);
|
||||
} else {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/entity/ai/goal/PathfinderGoalBreakDoor.java
|
||||
+++ b/net/minecraft/world/entity/ai/goal/PathfinderGoalBreakDoor.java
|
||||
@@ -72,6 +72,12 @@
|
||||
@@ -71,6 +71,12 @@
|
||||
}
|
||||
|
||||
if (this.breakTime == this.getDoorBreakTime() && this.isValidDifficulty(this.mob.level.getDifficulty())) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/entity/ai/goal/PathfinderGoalPanic.java
|
||||
+++ b/net/minecraft/world/entity/ai/goal/PathfinderGoalPanic.java
|
||||
@@ -11,6 +11,10 @@
|
||||
@@ -10,6 +10,10 @@
|
||||
import net.minecraft.world.level.IBlockAccess;
|
||||
import net.minecraft.world.phys.Vec3D;
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
public class PathfinderGoalPanic extends PathfinderGoal {
|
||||
|
||||
public static final int WATER_CHECK_DISTANCE_VERTICAL = 1;
|
||||
@@ -77,6 +81,12 @@
|
||||
@@ -80,6 +84,12 @@
|
||||
|
||||
@Override
|
||||
public boolean canContinueToUse() {
|
||||
@@ -24,10 +24,10 @@
|
||||
return !this.mob.getNavigation().isDone();
|
||||
}
|
||||
|
||||
@@ -86,6 +96,6 @@
|
||||
@@ -89,6 +99,6 @@
|
||||
|
||||
return !iblockaccess.getBlockState(blockposition).getCollisionShape(iblockaccess, blockposition).isEmpty() ? null : (BlockPosition) BlockPosition.findClosestMatch(entity.blockPosition(), i, 1, (blockposition1) -> {
|
||||
return iblockaccess.getFluidState(blockposition1).is((Tag) TagsFluid.WATER);
|
||||
return iblockaccess.getFluidState(blockposition1).is(TagsFluid.WATER);
|
||||
- }).orElse((Object) null);
|
||||
+ }).orElse(null); // CraftBukkit - decompile error
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/entity/ambient/EntityBat.java
|
||||
+++ b/net/minecraft/world/entity/ambient/EntityBat.java
|
||||
@@ -29,6 +29,8 @@
|
||||
@@ -28,6 +28,8 @@
|
||||
import net.minecraft.world.level.block.state.IBlockData;
|
||||
import net.minecraft.world.phys.Vec3D;
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
public class EntityBat extends EntityAmbient {
|
||||
|
||||
public static final float FLAP_DEGREES_PER_TICK = 74.48451F;
|
||||
@@ -138,16 +140,24 @@
|
||||
@@ -137,16 +139,24 @@
|
||||
}
|
||||
|
||||
if (this.level.getNearestPlayer(EntityBat.BAT_RESTING_TARGETING, this) != null) {
|
||||
@@ -39,7 +39,7 @@
|
||||
}
|
||||
} else {
|
||||
if (this.targetPosition != null && (!this.level.isEmptyBlock(this.targetPosition) || this.targetPosition.getY() <= this.level.getMinBuildHeight())) {
|
||||
@@ -171,7 +181,11 @@
|
||||
@@ -170,7 +180,11 @@
|
||||
this.zza = 0.5F;
|
||||
this.setYRot(this.getYRot() + f1);
|
||||
if (this.random.nextInt(100) == 0 && this.level.getBlockState(blockposition1).isRedstoneConductor(this.level, blockposition1)) {
|
||||
@@ -52,7 +52,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -201,7 +215,11 @@
|
||||
@@ -200,7 +214,11 @@
|
||||
return false;
|
||||
} else {
|
||||
if (!this.level.isClientSide && this.isResting()) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/entity/animal/EntityAnimal.java
|
||||
+++ b/net/minecraft/world/entity/animal/EntityAnimal.java
|
||||
@@ -31,12 +31,19 @@
|
||||
@@ -30,12 +30,19 @@
|
||||
import net.minecraft.world.level.gameevent.GameEvent;
|
||||
import net.minecraft.world.level.pathfinder.PathType;
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
protected EntityAnimal(EntityTypes<? extends EntityAnimal> entitytypes, World world) {
|
||||
super(entitytypes, world);
|
||||
@@ -73,6 +80,9 @@
|
||||
@@ -72,6 +79,9 @@
|
||||
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
@Override
|
||||
public boolean hurt(DamageSource damagesource, float f) {
|
||||
if (this.isInvulnerableTo(damagesource)) {
|
||||
@@ -82,6 +92,7 @@
|
||||
@@ -81,6 +91,7 @@
|
||||
return super.hurt(damagesource, f);
|
||||
}
|
||||
}
|
||||
@@ -38,7 +38,7 @@
|
||||
|
||||
@Override
|
||||
public float getWalkTargetValue(BlockPosition blockposition, IWorldReader iworldreader) {
|
||||
@@ -178,10 +189,17 @@
|
||||
@@ -177,10 +188,17 @@
|
||||
}
|
||||
|
||||
public void setInLove(@Nullable EntityHuman entityhuman) {
|
||||
@@ -57,7 +57,7 @@
|
||||
|
||||
this.level.broadcastEntityEvent(this, (byte) 18);
|
||||
}
|
||||
@@ -221,11 +239,26 @@
|
||||
@@ -220,11 +238,26 @@
|
||||
EntityAgeable entityageable = this.getBreedOffspring(worldserver, entityanimal);
|
||||
|
||||
if (entityageable != null) {
|
||||
@@ -84,7 +84,7 @@
|
||||
|
||||
if (entityplayer != null) {
|
||||
entityplayer.awardStat(StatisticList.ANIMALS_BRED);
|
||||
@@ -236,12 +269,14 @@
|
||||
@@ -235,12 +268,14 @@
|
||||
entityanimal.setAge(6000);
|
||||
this.resetLove();
|
||||
entityanimal.resetLove();
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/entity/animal/EntityBee.java
|
||||
+++ b/net/minecraft/world/entity/animal/EntityBee.java
|
||||
@@ -244,7 +244,7 @@
|
||||
@@ -242,7 +242,7 @@
|
||||
}
|
||||
|
||||
if (b0 > 0) {
|
||||
@@ -9,7 +9,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -644,11 +644,15 @@
|
||||
@@ -642,11 +642,15 @@
|
||||
if (this.isInvulnerableTo(damagesource)) {
|
||||
return false;
|
||||
} else {
|
||||
@@ -27,7 +27,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1224,7 +1228,7 @@
|
||||
@@ -1222,7 +1226,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
EntityBee.this.level.levelEvent(2005, blockposition, 0);
|
||||
EntityBee.this.level.setBlockAndUpdate(blockposition, (IBlockData) iblockdata.setValue(blockstateinteger, (Integer) iblockdata.getValue(blockstateinteger) + 1));
|
||||
EntityBee.this.incrementNumCropsGrownSincePollination();
|
||||
@@ -1297,7 +1301,7 @@
|
||||
@@ -1295,7 +1299,7 @@
|
||||
@Override
|
||||
protected void alertOther(EntityInsentient entityinsentient, EntityLiving entityliving) {
|
||||
if (entityinsentient instanceof EntityBee && this.mob.hasLineOfSight(entityliving)) {
|
||||
@@ -45,7 +45,7 @@
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1306,7 +1310,7 @@
|
||||
@@ -1304,7 +1308,7 @@
|
||||
private static class c extends PathfinderGoalNearestAttackableTarget<EntityHuman> {
|
||||
|
||||
c(EntityBee entitybee) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/entity/animal/EntityCat.java
|
||||
+++ b/net/minecraft/world/entity/animal/EntityCat.java
|
||||
@@ -434,7 +434,7 @@
|
||||
@@ -443,7 +443,7 @@
|
||||
}
|
||||
} else if (this.isFood(itemstack)) {
|
||||
this.usePlayerItem(entityhuman, enumhand, itemstack);
|
||||
@@ -9,7 +9,7 @@
|
||||
this.tame(entityhuman);
|
||||
this.setOrderedToSit(true);
|
||||
this.level.broadcastEntityEvent(this, (byte) 7);
|
||||
@@ -491,7 +491,7 @@
|
||||
@@ -500,7 +500,7 @@
|
||||
private static class PathfinderGoalTemptChance extends PathfinderGoalTempt {
|
||||
|
||||
@Nullable
|
||||
@@ -18,7 +18,7 @@
|
||||
private final EntityCat cat;
|
||||
|
||||
public PathfinderGoalTemptChance(EntityCat entitycat, double d0, RecipeItemStack recipeitemstack, boolean flag) {
|
||||
@@ -632,7 +632,15 @@
|
||||
@@ -641,7 +641,15 @@
|
||||
while (iterator.hasNext()) {
|
||||
ItemStack itemstack = (ItemStack) iterator.next();
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
}
|
||||
|
||||
}
|
||||
@@ -664,10 +672,10 @@
|
||||
@@ -673,10 +681,10 @@
|
||||
private final EntityCat cat;
|
||||
|
||||
public a(EntityCat entitycat, Class<T> oclass, float f, double d0, double d1) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/entity/animal/EntityDolphin.java
|
||||
+++ b/net/minecraft/world/entity/animal/EntityDolphin.java
|
||||
@@ -65,6 +65,12 @@
|
||||
@@ -63,6 +63,12 @@
|
||||
|
||||
public class EntityDolphin extends EntityWaterAnimal {
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
private static final DataWatcherObject<BlockPosition> TREASURE_POS = DataWatcher.defineId(EntityDolphin.class, DataWatcherRegistry.BLOCK_POS);
|
||||
private static final DataWatcherObject<Boolean> GOT_FISH = DataWatcher.defineId(EntityDolphin.class, DataWatcherRegistry.BOOLEAN);
|
||||
private static final DataWatcherObject<Integer> MOISTNESS_LEVEL = DataWatcher.defineId(EntityDolphin.class, DataWatcherRegistry.INT);
|
||||
@@ -192,7 +198,7 @@
|
||||
@@ -190,7 +196,7 @@
|
||||
|
||||
@Override
|
||||
public int getMaxAirSupply() {
|
||||
@@ -22,7 +22,7 @@
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -233,6 +239,12 @@
|
||||
@@ -231,6 +237,12 @@
|
||||
ItemStack itemstack = entityitem.getItem();
|
||||
|
||||
if (this.canHoldItem(itemstack)) {
|
||||
@@ -35,7 +35,7 @@
|
||||
this.onItemPickup(entityitem);
|
||||
this.setItemSlot(EnumItemSlot.MAINHAND, itemstack);
|
||||
this.handDropChances[EnumItemSlot.MAINHAND.getIndex()] = 2.0F;
|
||||
@@ -391,7 +403,7 @@
|
||||
@@ -389,7 +401,7 @@
|
||||
|
||||
@Override
|
||||
public boolean canUse() {
|
||||
@@ -44,7 +44,7 @@
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -501,7 +513,7 @@
|
||||
@@ -489,7 +501,7 @@
|
||||
|
||||
@Override
|
||||
public void start() {
|
||||
@@ -53,7 +53,7 @@
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -520,7 +532,7 @@
|
||||
@@ -508,7 +520,7 @@
|
||||
}
|
||||
|
||||
if (this.player.isSwimming() && this.player.level.random.nextInt(6) == 0) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/entity/animal/EntityFox.java
|
||||
+++ b/net/minecraft/world/entity/animal/EntityFox.java
|
||||
@@ -507,7 +507,8 @@
|
||||
@@ -509,7 +509,8 @@
|
||||
protected void pickUpItem(EntityItem entityitem) {
|
||||
ItemStack itemstack = entityitem.getItem();
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
int i = itemstack.getCount();
|
||||
|
||||
if (i > 1) {
|
||||
@@ -862,6 +863,16 @@
|
||||
@@ -864,6 +865,16 @@
|
||||
if (entityplayer1 != null && entityplayer != entityplayer1) {
|
||||
entityfox.addTrustedUUID(entityplayer1.getUUID());
|
||||
}
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
if (entityplayer2 != null) {
|
||||
entityplayer2.awardStat(StatisticList.ANIMALS_BRED);
|
||||
@@ -872,12 +883,14 @@
|
||||
@@ -874,12 +885,14 @@
|
||||
this.partner.setAge(6000);
|
||||
this.animal.resetLove();
|
||||
this.partner.resetLove();
|
||||
@@ -46,7 +46,7 @@
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1268,13 +1281,18 @@
|
||||
@@ -1270,13 +1283,18 @@
|
||||
}
|
||||
|
||||
private void pickGlowBerry(IBlockData iblockdata) {
|
||||
@@ -66,7 +66,7 @@
|
||||
int j = 1 + EntityFox.this.level.random.nextInt(2) + (i == 3 ? 1 : 0);
|
||||
ItemStack itemstack = EntityFox.this.getItemBySlot(EnumItemSlot.MAINHAND);
|
||||
|
||||
@@ -1431,7 +1449,7 @@
|
||||
@@ -1433,7 +1451,7 @@
|
||||
private EntityLiving trustedLastHurt;
|
||||
private int timestamp;
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/entity/animal/EntityMushroomCow.java
|
||||
+++ b/net/minecraft/world/entity/animal/EntityMushroomCow.java
|
||||
@@ -44,6 +44,13 @@
|
||||
@@ -43,6 +43,13 @@
|
||||
import net.minecraft.world.level.gameevent.GameEvent;
|
||||
import org.apache.commons.lang3.tuple.Pair;
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
public class EntityMushroomCow extends EntityCow implements IShearable {
|
||||
|
||||
private static final DataWatcherObject<String> DATA_TYPE = DataWatcher.defineId(EntityMushroomCow.class, DataWatcherRegistry.STRING);
|
||||
@@ -117,6 +124,11 @@
|
||||
@@ -116,6 +123,11 @@
|
||||
this.playSound(soundeffect, 1.0F, 1.0F);
|
||||
return EnumInteractionResult.sidedSuccess(this.level.isClientSide);
|
||||
} else if (itemstack.is(Items.SHEARS) && this.readyForShearing()) {
|
||||
@@ -26,7 +26,7 @@
|
||||
this.shear(SoundCategory.PLAYERS);
|
||||
this.gameEvent(GameEvent.SHEAR, (Entity) entityhuman);
|
||||
if (!this.level.isClientSide) {
|
||||
@@ -164,7 +176,7 @@
|
||||
@@ -163,7 +175,7 @@
|
||||
this.level.playSound((EntityHuman) null, (Entity) this, SoundEffects.MOOSHROOM_SHEAR, soundcategory, 1.0F, 1.0F);
|
||||
if (!this.level.isClientSide()) {
|
||||
((WorldServer) this.level).sendParticles(Particles.EXPLOSION, this.getX(), this.getY(0.5D), this.getZ(), 1, 0.0D, 0.0D, 0.0D, 0.0D);
|
||||
@@ -35,7 +35,7 @@
|
||||
EntityCow entitycow = (EntityCow) EntityTypes.COW.create(this.level);
|
||||
|
||||
entitycow.moveTo(this.getX(), this.getY(), this.getZ(), this.getYRot(), this.getXRot());
|
||||
@@ -180,10 +192,25 @@
|
||||
@@ -179,10 +191,25 @@
|
||||
}
|
||||
|
||||
entitycow.setInvulnerable(this.isInvulnerable());
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/entity/animal/EntityOcelot.java
|
||||
+++ b/net/minecraft/world/entity/animal/EntityOcelot.java
|
||||
@@ -134,7 +134,7 @@
|
||||
@@ -133,7 +133,7 @@
|
||||
|
||||
@Override
|
||||
public boolean removeWhenFarAway(double d0) {
|
||||
@@ -9,7 +9,7 @@
|
||||
}
|
||||
|
||||
public static AttributeProvider.Builder createAttributes() {
|
||||
@@ -183,7 +183,8 @@
|
||||
@@ -182,7 +182,8 @@
|
||||
if ((this.temptGoal == null || this.temptGoal.isRunning()) && !this.isTrusting() && this.isFood(itemstack) && entityhuman.distanceToSqr((Entity) this) < 9.0D) {
|
||||
this.usePlayerItem(entityhuman, enumhand, itemstack);
|
||||
if (!this.level.isClientSide) {
|
||||
@@ -19,7 +19,7 @@
|
||||
this.setTrusting(true);
|
||||
this.spawnTrustingParticles(true);
|
||||
this.level.broadcastEntityEvent(this, (byte) 41);
|
||||
@@ -313,10 +314,10 @@
|
||||
@@ -312,10 +313,10 @@
|
||||
private final EntityOcelot ocelot;
|
||||
|
||||
public a(EntityOcelot entityocelot, Class<T> oclass, float f, double d0, double d1) {
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
this.onItemPickup(entityitem);
|
||||
ItemStack itemstack = entityitem.getItem();
|
||||
|
||||
@@ -882,10 +884,10 @@
|
||||
@@ -872,10 +874,10 @@
|
||||
private final EntityPanda panda;
|
||||
|
||||
public c(EntityPanda entitypanda, Class<T> oclass, float f, double d0, double d1) {
|
||||
@@ -32,7 +32,7 @@
|
||||
this.panda = entitypanda;
|
||||
}
|
||||
|
||||
@@ -1132,7 +1134,7 @@
|
||||
@@ -1114,7 +1116,7 @@
|
||||
@Override
|
||||
protected void alertOther(EntityInsentient entityinsentient, EntityLiving entityliving) {
|
||||
if (entityinsentient instanceof EntityPanda && ((EntityPanda) entityinsentient).isAggressive()) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/entity/animal/EntityParrot.java
|
||||
+++ b/net/minecraft/world/entity/animal/EntityParrot.java
|
||||
@@ -258,7 +258,7 @@
|
||||
@@ -256,7 +256,7 @@
|
||||
}
|
||||
|
||||
if (!this.level.isClientSide) {
|
||||
@@ -9,7 +9,7 @@
|
||||
this.tame(entityhuman);
|
||||
this.level.broadcastEntityEvent(this, (byte) 7);
|
||||
} else {
|
||||
@@ -272,7 +272,7 @@
|
||||
@@ -270,7 +270,7 @@
|
||||
itemstack.shrink(1);
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
if (entityhuman.isCreative() || !this.isInvulnerable()) {
|
||||
this.hurt(DamageSource.playerAttack(entityhuman), Float.MAX_VALUE);
|
||||
}
|
||||
@@ -384,7 +384,7 @@
|
||||
@@ -382,7 +382,7 @@
|
||||
|
||||
@Override
|
||||
public boolean isPushable() {
|
||||
@@ -27,12 +27,12 @@
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -399,7 +399,7 @@
|
||||
if (this.isInvulnerableTo(damagesource)) {
|
||||
@@ -398,7 +398,7 @@
|
||||
return false;
|
||||
} else {
|
||||
- this.setOrderedToSit(false);
|
||||
+ // this.setOrderedToSit(false); // CraftBukkit - moved into EntityLiving.damageEntity(DamageSource, float)
|
||||
if (!this.level.isClientSide) {
|
||||
- this.setOrderedToSit(false);
|
||||
+ // this.setOrderedToSit(false); // CraftBukkit - moved into EntityLiving.damageEntity(DamageSource, float)
|
||||
}
|
||||
|
||||
return super.hurt(damagesource, f);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/entity/animal/EntityRabbit.java
|
||||
+++ b/net/minecraft/world/entity/animal/EntityRabbit.java
|
||||
@@ -88,8 +88,14 @@
|
||||
@@ -89,8 +89,14 @@
|
||||
super(entitytypes, world);
|
||||
this.jumpControl = new EntityRabbit.ControllerJumpRabbit(this);
|
||||
this.moveControl = new EntityRabbit.ControllerMoveRabbit(this);
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
@Override
|
||||
public void registerGoals() {
|
||||
@@ -556,9 +562,23 @@
|
||||
@@ -558,9 +564,23 @@
|
||||
int i = (Integer) iblockdata.getValue(BlockCarrots.AGE);
|
||||
|
||||
if (i == 0) {
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
private static final DataWatcherObject<Byte> DATA_PUMPKIN_ID = DataWatcher.defineId(EntitySnowman.class, DataWatcherRegistry.BYTE);
|
||||
@@ -103,7 +107,7 @@
|
||||
BiomeBase biomebase = this.level.getBiome(blockposition);
|
||||
BiomeBase biomebase = (BiomeBase) this.level.getBiome(blockposition).value();
|
||||
|
||||
if (biomebase.shouldSnowGolemBurn(blockposition)) {
|
||||
- this.hurt(DamageSource.ON_FIRE, 1.0F);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/entity/animal/EntityTurtle.java
|
||||
+++ b/net/minecraft/world/entity/animal/EntityTurtle.java
|
||||
@@ -311,7 +311,9 @@
|
||||
@@ -309,7 +309,9 @@
|
||||
protected void ageBoundaryReached() {
|
||||
super.ageBoundaryReached();
|
||||
if (!this.isBaby() && this.level.getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT)) {
|
||||
@@ -10,7 +10,7 @@
|
||||
}
|
||||
|
||||
}
|
||||
@@ -338,7 +340,9 @@
|
||||
@@ -336,7 +338,9 @@
|
||||
|
||||
@Override
|
||||
public void thunderHit(WorldServer worldserver, EntityLightning entitylightning) {
|
||||
@@ -20,7 +20,7 @@
|
||||
}
|
||||
|
||||
private static class e extends ControllerMove {
|
||||
@@ -484,8 +488,12 @@
|
||||
@@ -482,8 +486,12 @@
|
||||
} else if (this.turtle.layEggCounter > this.adjustedTickDelay(200)) {
|
||||
World world = this.turtle.level;
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
--- a/net/minecraft/world/entity/animal/EntityWolf.java
|
||||
+++ b/net/minecraft/world/entity/animal/EntityWolf.java
|
||||
@@ -68,6 +68,11 @@
|
||||
import net.minecraft.world.level.gameevent.GameEvent;
|
||||
@@ -69,6 +69,11 @@
|
||||
import net.minecraft.world.level.pathfinder.PathType;
|
||||
import net.minecraft.world.phys.Vec3D;
|
||||
|
||||
+// CraftBukkit start
|
||||
@@ -12,7 +12,7 @@
|
||||
public class EntityWolf extends EntityTameableAnimal implements IEntityAngerable {
|
||||
|
||||
private static final DataWatcherObject<Boolean> DATA_INTERESTED_ID = DataWatcher.defineId(EntityWolf.class, DataWatcherRegistry.BOOLEAN);
|
||||
@@ -122,6 +127,24 @@
|
||||
@@ -126,6 +131,24 @@
|
||||
return EntityInsentient.createMobAttributes().add(GenericAttributes.MOVEMENT_SPEED, 0.30000001192092896D).add(GenericAttributes.MAX_HEALTH, 8.0D).add(GenericAttributes.ATTACK_DAMAGE, 2.0D);
|
||||
}
|
||||
|
||||
@@ -37,16 +37,16 @@
|
||||
@Override
|
||||
protected void defineSynchedData() {
|
||||
super.defineSynchedData();
|
||||
@@ -293,7 +316,7 @@
|
||||
} else {
|
||||
@@ -298,7 +321,7 @@
|
||||
Entity entity = damagesource.getEntity();
|
||||
|
||||
- this.setOrderedToSit(false);
|
||||
+ // this.setWillSit(false); // CraftBukkit - moved into EntityLiving.damageEntity(DamageSource, float)
|
||||
if (entity != null && !(entity instanceof EntityHuman) && !(entity instanceof EntityArrow)) {
|
||||
f = (f + 1.0F) / 2.0F;
|
||||
if (!this.level.isClientSide) {
|
||||
- this.setOrderedToSit(false);
|
||||
+ // this.setOrderedToSit(false); // CraftBukkit - moved into EntityLiving.damageEntity(DamageSource, float)
|
||||
}
|
||||
@@ -318,7 +341,7 @@
|
||||
|
||||
if (entity != null && !(entity instanceof EntityHuman) && !(entity instanceof EntityArrow)) {
|
||||
@@ -325,7 +348,7 @@
|
||||
super.setTame(flag);
|
||||
if (flag) {
|
||||
this.getAttribute(GenericAttributes.MAX_HEALTH).setBaseValue(20.0D);
|
||||
@@ -55,7 +55,7 @@
|
||||
} else {
|
||||
this.getAttribute(GenericAttributes.MAX_HEALTH).setBaseValue(8.0D);
|
||||
}
|
||||
@@ -342,7 +365,7 @@
|
||||
@@ -349,7 +372,7 @@
|
||||
itemstack.shrink(1);
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
this.gameEvent(GameEvent.MOB_INTERACT, this.eyeBlockPosition());
|
||||
return EnumInteractionResult.SUCCESS;
|
||||
}
|
||||
@@ -354,7 +377,7 @@
|
||||
@@ -361,7 +384,7 @@
|
||||
this.setOrderedToSit(!this.isOrderedToSit());
|
||||
this.jumping = false;
|
||||
this.navigation.stop();
|
||||
@@ -73,7 +73,7 @@
|
||||
return EnumInteractionResult.SUCCESS;
|
||||
}
|
||||
|
||||
@@ -376,7 +399,8 @@
|
||||
@@ -383,7 +406,8 @@
|
||||
itemstack.shrink(1);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/entity/animal/axolotl/Axolotl.java
|
||||
+++ b/net/minecraft/world/entity/animal/axolotl/Axolotl.java
|
||||
@@ -67,9 +67,16 @@
|
||||
@@ -68,10 +68,17 @@
|
||||
|
||||
public class Axolotl extends EntityAnimal implements LerpingModel, Bucketable {
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
+ return AXOLOTL_TOTAL_AIR_SUPPLY;
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
private static final Logger LOGGER = LogUtils.getLogger();
|
||||
public static final int TOTAL_PLAYDEAD_TIME = 200;
|
||||
protected static final ImmutableList<? extends SensorType<? extends Sensor<? super Axolotl>>> SENSOR_TYPES = ImmutableList.of(SensorType.NEAREST_LIVING_ENTITIES, SensorType.NEAREST_ADULT, SensorType.HURT_BY, SensorType.AXOLOTL_ATTACKABLES, SensorType.AXOLOTL_TEMPTATIONS);
|
||||
- protected static final ImmutableList<? extends MemoryModuleType<?>> MEMORY_TYPES = ImmutableList.of(MemoryModuleType.BREED_TARGET, MemoryModuleType.NEAREST_LIVING_ENTITIES, MemoryModuleType.NEAREST_VISIBLE_LIVING_ENTITIES, MemoryModuleType.NEAREST_VISIBLE_PLAYER, MemoryModuleType.NEAREST_VISIBLE_ATTACKABLE_PLAYER, MemoryModuleType.LOOK_TARGET, MemoryModuleType.WALK_TARGET, MemoryModuleType.CANT_REACH_WALK_TARGET_SINCE, MemoryModuleType.PATH, MemoryModuleType.ATTACK_TARGET, MemoryModuleType.ATTACK_COOLING_DOWN, MemoryModuleType.NEAREST_VISIBLE_ADULT, new MemoryModuleType[]{MemoryModuleType.HURT_BY_ENTITY, MemoryModuleType.PLAY_DEAD_TICKS, MemoryModuleType.NEAREST_ATTACKABLE, MemoryModuleType.TEMPTING_PLAYER, MemoryModuleType.TEMPTATION_COOLDOWN_TICKS, MemoryModuleType.IS_TEMPTED, MemoryModuleType.HAS_HUNTING_COOLDOWN});
|
||||
@@ -18,7 +19,7 @@
|
||||
private static final DataWatcherObject<Integer> DATA_VARIANT = DataWatcher.defineId(Axolotl.class, DataWatcherRegistry.INT);
|
||||
private static final DataWatcherObject<Boolean> DATA_PLAYING_DEAD = DataWatcher.defineId(Axolotl.class, DataWatcherRegistry.BOOLEAN);
|
||||
private static final DataWatcherObject<Boolean> FROM_BUCKET = DataWatcher.defineId(Axolotl.class, DataWatcherRegistry.BOOLEAN);
|
||||
@@ -185,7 +192,7 @@
|
||||
@@ -187,7 +194,7 @@
|
||||
|
||||
@Override
|
||||
public int getMaxAirSupply() {
|
||||
@@ -27,7 +28,7 @@
|
||||
}
|
||||
|
||||
public Axolotl.Variant getVariant() {
|
||||
@@ -236,6 +243,7 @@
|
||||
@@ -238,6 +245,7 @@
|
||||
@Override
|
||||
public void setFromBucket(boolean flag) {
|
||||
this.entityData.set(Axolotl.FROM_BUCKET, flag);
|
||||
@@ -35,7 +36,7 @@
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@@ -419,7 +427,7 @@
|
||||
@@ -428,7 +436,7 @@
|
||||
|
||||
if (i < 2400) {
|
||||
i = Math.min(2400, 100 + i);
|
||||
@@ -44,7 +45,7 @@
|
||||
}
|
||||
|
||||
entityhuman.removeEffect(MobEffects.DIG_SLOWDOWN);
|
||||
@@ -469,7 +477,7 @@
|
||||
@@ -478,7 +486,7 @@
|
||||
|
||||
@Override
|
||||
public BehaviorController<Axolotl> getBrain() {
|
||||
@@ -53,7 +54,7 @@
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -502,7 +510,7 @@
|
||||
@@ -511,7 +519,7 @@
|
||||
|
||||
@Override
|
||||
public boolean removeWhenFarAway(double d0) {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
--- a/net/minecraft/world/entity/animal/goat/Goat.java
|
||||
+++ b/net/minecraft/world/entity/animal/goat/Goat.java
|
||||
@@ -52,6 +52,11 @@
|
||||
import net.minecraft.world.level.pathfinder.Pathfinder;
|
||||
import net.minecraft.world.level.pathfinder.PathfinderNormal;
|
||||
@@ -45,6 +45,11 @@
|
||||
import net.minecraft.world.level.block.state.IBlockData;
|
||||
import net.minecraft.world.level.pathfinder.PathType;
|
||||
|
||||
+// CraftBukkit start
|
||||
+import org.bukkit.craftbukkit.event.CraftEventFactory;
|
||||
@@ -12,7 +12,7 @@
|
||||
public class Goat extends EntityAnimal {
|
||||
|
||||
public static final EntitySize LONG_JUMPING_DIMENSIONS = EntitySize.scalable(0.9F, 1.3F).scale(0.7F);
|
||||
@@ -139,7 +144,7 @@
|
||||
@@ -134,7 +139,7 @@
|
||||
|
||||
@Override
|
||||
public BehaviorController<Goat> getBrain() {
|
||||
@@ -21,7 +21,7 @@
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -177,8 +182,15 @@
|
||||
@@ -172,8 +177,15 @@
|
||||
ItemStack itemstack = entityhuman.getItemInHand(enumhand);
|
||||
|
||||
if (itemstack.is(Items.BUCKET) && !this.isBaby()) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/entity/animal/horse/EntityLlama.java
|
||||
+++ b/net/minecraft/world/entity/animal/horse/EntityLlama.java
|
||||
@@ -78,6 +78,12 @@
|
||||
@@ -77,6 +77,12 @@
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
--- a/net/minecraft/world/entity/boss/enderdragon/EntityEnderDragon.java
|
||||
+++ b/net/minecraft/world/entity/boss/enderdragon/EntityEnderDragon.java
|
||||
@@ -53,6 +53,18 @@
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
@@ -51,6 +51,18 @@
|
||||
import net.minecraft.world.phys.Vec3D;
|
||||
import org.slf4j.Logger;
|
||||
|
||||
+// CraftBukkit start
|
||||
+import net.minecraft.world.item.ItemStack;
|
||||
@@ -18,8 +18,8 @@
|
||||
+
|
||||
public class EntityEnderDragon extends EntityInsentient implements IMonster {
|
||||
|
||||
private static final Logger LOGGER = LogManager.getLogger();
|
||||
@@ -89,6 +101,7 @@
|
||||
private static final Logger LOGGER = LogUtils.getLogger();
|
||||
@@ -87,6 +99,7 @@
|
||||
private final PathPoint[] nodes = new PathPoint[24];
|
||||
private final int[] nodeAdjacency = new int[24];
|
||||
private final Path openSet = new Path();
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
public EntityEnderDragon(EntityTypes<? extends EntityEnderDragon> entitytypes, World world) {
|
||||
super(EntityTypes.ENDER_DRAGON, world);
|
||||
@@ -236,7 +249,7 @@
|
||||
@@ -234,7 +247,7 @@
|
||||
|
||||
Vec3D vec3d1 = idragoncontroller.getFlyTargetLocation();
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
d0 = vec3d1.x - this.getX();
|
||||
d1 = vec3d1.y - this.getY();
|
||||
d2 = vec3d1.z - this.getZ();
|
||||
@@ -378,7 +391,14 @@
|
||||
@@ -375,7 +388,14 @@
|
||||
if (this.nearestCrystal.isRemoved()) {
|
||||
this.nearestCrystal = null;
|
||||
} else if (this.tickCount % 10 == 0 && this.getHealth() < this.getMaxHealth()) {
|
||||
@@ -52,7 +52,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -453,6 +473,9 @@
|
||||
@@ -450,6 +470,9 @@
|
||||
int j1 = MathHelper.floor(axisalignedbb.maxZ);
|
||||
boolean flag = false;
|
||||
boolean flag1 = false;
|
||||
@@ -62,10 +62,10 @@
|
||||
|
||||
for (int k1 = i; k1 <= l; ++k1) {
|
||||
for (int l1 = j; l1 <= i1; ++l1) {
|
||||
@@ -462,7 +485,11 @@
|
||||
@@ -459,7 +482,11 @@
|
||||
|
||||
if (!iblockdata.isAir() && iblockdata.getMaterial() != Material.FIRE) {
|
||||
if (this.level.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING) && !iblockdata.is((Tag) TagsBlock.DRAGON_IMMUNE)) {
|
||||
if (this.level.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING) && !iblockdata.is(TagsBlock.DRAGON_IMMUNE)) {
|
||||
- flag1 = this.level.removeBlock(blockposition, false) || flag1;
|
||||
+ // CraftBukkit start - Add blocks to list rather than destroying them
|
||||
+ // flag1 = this.level.removeBlock(blockposition, false) || flag1;
|
||||
@@ -75,7 +75,7 @@
|
||||
} else {
|
||||
flag = true;
|
||||
}
|
||||
@@ -471,6 +498,51 @@
|
||||
@@ -468,6 +495,51 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
--- a/net/minecraft/world/entity/boss/enderdragon/phases/DragonControllerManager.java
|
||||
+++ b/net/minecraft/world/entity/boss/enderdragon/phases/DragonControllerManager.java
|
||||
@@ -5,6 +5,11 @@
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import net.minecraft.world.entity.boss.enderdragon.EntityEnderDragon;
|
||||
import org.slf4j.Logger;
|
||||
|
||||
+// CraftBukkit start
|
||||
+import org.bukkit.craftbukkit.entity.CraftEnderDragon;
|
||||
@@ -11,7 +11,7 @@
|
||||
+
|
||||
public class DragonControllerManager {
|
||||
|
||||
private static final Logger LOGGER = LogManager.getLogger();
|
||||
private static final Logger LOGGER = LogUtils.getLogger();
|
||||
@@ -24,6 +29,19 @@
|
||||
this.currentPhase.end();
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/entity/boss/wither/EntityWither.java
|
||||
+++ b/net/minecraft/world/entity/boss/wither/EntityWither.java
|
||||
@@ -56,6 +56,17 @@
|
||||
@@ -55,6 +55,17 @@
|
||||
import net.minecraft.world.level.block.state.IBlockData;
|
||||
import net.minecraft.world.phys.Vec3D;
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
public class EntityWither extends EntityMonster implements PowerableMob, IRangedEntity {
|
||||
|
||||
private static final DataWatcherObject<Integer> DATA_TARGET_A = DataWatcher.defineId(EntityWither.class, DataWatcherRegistry.INT);
|
||||
@@ -250,16 +261,40 @@
|
||||
@@ -249,16 +260,40 @@
|
||||
this.bossEvent.setProgress(1.0F - (float) i / 220.0F);
|
||||
if (i <= 0) {
|
||||
Explosion.Effect explosion_effect = this.level.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING) ? Explosion.Effect.DESTROY : Explosion.Effect.NONE;
|
||||
@@ -62,7 +62,7 @@
|
||||
}
|
||||
|
||||
} else {
|
||||
@@ -304,6 +339,7 @@
|
||||
@@ -303,6 +338,7 @@
|
||||
if (!list.isEmpty()) {
|
||||
EntityLiving entityliving1 = (EntityLiving) list.get(this.random.nextInt(list.size()));
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
this.setAlternativeTarget(i, entityliving1.getId());
|
||||
}
|
||||
}
|
||||
@@ -334,6 +370,11 @@
|
||||
@@ -333,6 +369,11 @@
|
||||
IBlockData iblockdata = this.level.getBlockState(blockposition);
|
||||
|
||||
if (canDestroy(iblockdata)) {
|
||||
@@ -82,7 +82,7 @@
|
||||
flag = this.level.destroyBlock(blockposition, true, this) || flag;
|
||||
}
|
||||
}
|
||||
@@ -347,7 +388,7 @@
|
||||
@@ -346,7 +387,7 @@
|
||||
}
|
||||
|
||||
if (this.tickCount % 20 == 0) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/entity/decoration/EntityLeash.java
|
||||
+++ b/net/minecraft/world/entity/decoration/EntityLeash.java
|
||||
@@ -25,6 +25,12 @@
|
||||
@@ -24,6 +24,12 @@
|
||||
import net.minecraft.world.phys.AxisAlignedBB;
|
||||
import net.minecraft.world.phys.Vec3D;
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
public class EntityLeash extends EntityHanging {
|
||||
|
||||
public static final double OFFSET_Y = 0.375D;
|
||||
@@ -96,22 +102,42 @@
|
||||
@@ -95,22 +101,42 @@
|
||||
while (iterator.hasNext()) {
|
||||
entityinsentient = (EntityInsentient) iterator.next();
|
||||
if (entityinsentient.getLeashHolder() == entityhuman) {
|
||||
|
||||
@@ -1,24 +1,15 @@
|
||||
--- a/net/minecraft/world/entity/item/EntityFallingBlock.java
|
||||
+++ b/net/minecraft/world/entity/item/EntityFallingBlock.java
|
||||
@@ -45,6 +45,8 @@
|
||||
import net.minecraft.world.phys.MovingObjectPositionBlock;
|
||||
@@ -46,6 +46,8 @@
|
||||
import net.minecraft.world.phys.Vec3D;
|
||||
import org.slf4j.Logger;
|
||||
|
||||
+import org.bukkit.craftbukkit.event.CraftEventFactory; // CraftBukkit
|
||||
+
|
||||
public class EntityFallingBlock extends Entity {
|
||||
|
||||
private static final int REMOVAL_DELAY_MILLIS = 50;
|
||||
@@ -122,7 +124,7 @@
|
||||
|
||||
if (this.time++ == 0) {
|
||||
blockposition = this.blockPosition();
|
||||
- if (this.level.getBlockState(blockposition).is(block)) {
|
||||
+ if (this.level.getBlockState(blockposition).is(block) && !CraftEventFactory.callEntityChangeBlockEvent(this, blockposition, Blocks.AIR.defaultBlockState()).isCancelled()) {
|
||||
this.level.removeBlock(blockposition, false);
|
||||
} else if (!this.level.isClientSide) {
|
||||
this.discard();
|
||||
@@ -173,6 +175,12 @@
|
||||
private static final Logger LOGGER = LogUtils.getLogger();
|
||||
@@ -166,6 +168,12 @@
|
||||
this.blockState = (IBlockData) this.blockState.setValue(BlockProperties.WATERLOGGED, true);
|
||||
}
|
||||
|
||||
@@ -31,7 +22,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();
|
||||
@@ -252,7 +260,7 @@
|
||||
@@ -236,7 +244,7 @@
|
||||
if (i < 0) {
|
||||
return false;
|
||||
} else {
|
||||
@@ -40,7 +31,7 @@
|
||||
DamageSource damagesource1;
|
||||
|
||||
if (this.blockState.getBlock() instanceof Fallable) {
|
||||
@@ -268,7 +276,9 @@
|
||||
@@ -252,7 +260,9 @@
|
||||
float f2 = (float) Math.min(MathHelper.floor((float) i * this.fallDamagePerDistance), this.fallDamageMax);
|
||||
|
||||
this.level.getEntities((Entity) this, this.getBoundingBox(), predicate).forEach((entity) -> {
|
||||
@@ -48,5 +39,5 @@
|
||||
entity.hurt(damagesource1, f2);
|
||||
+ CraftEventFactory.entityDamage = null; // CraftBukkit
|
||||
});
|
||||
boolean flag = this.blockState.is((Tag) TagsBlock.ANVIL);
|
||||
boolean flag = this.blockState.is(TagsBlock.ANVIL);
|
||||
|
||||
|
||||
@@ -75,9 +75,9 @@
|
||||
merge(entityitem, itemstack, itemstack1);
|
||||
entityitem.pickupDelay = Math.max(entityitem.pickupDelay, entityitem1.pickupDelay);
|
||||
entityitem.age = Math.min(entityitem.age, entityitem1.age);
|
||||
@@ -263,6 +282,11 @@
|
||||
} else if (!this.getItem().getItem().canBeHurtBy(damagesource)) {
|
||||
return false;
|
||||
@@ -265,6 +284,11 @@
|
||||
} else if (this.level.isClientSide) {
|
||||
return true;
|
||||
} else {
|
||||
+ // CraftBukkit start
|
||||
+ if (org.bukkit.craftbukkit.event.CraftEventFactory.handleNonLivingEntityDamageEvent(this, damagesource, f)) {
|
||||
@@ -87,7 +87,7 @@
|
||||
this.markHurt();
|
||||
this.health = (int) ((float) this.health - f);
|
||||
this.gameEvent(GameEvent.ENTITY_DAMAGED, damagesource.getEntity());
|
||||
@@ -326,6 +350,46 @@
|
||||
@@ -328,6 +352,46 @@
|
||||
Item item = itemstack.getItem();
|
||||
int i = itemstack.getCount();
|
||||
|
||||
@@ -134,7 +134,7 @@
|
||||
if (this.pickupDelay == 0 && (this.owner == null || this.owner.equals(entityhuman.getUUID())) && entityhuman.getInventory().add(itemstack)) {
|
||||
entityhuman.take(this, i);
|
||||
if (itemstack.isEmpty()) {
|
||||
@@ -369,7 +433,9 @@
|
||||
@@ -371,7 +435,9 @@
|
||||
}
|
||||
|
||||
public void setItem(ItemStack itemstack) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/entity/monster/EntityEnderman.java
|
||||
+++ b/net/minecraft/world/entity/monster/EntityEnderman.java
|
||||
@@ -110,7 +110,17 @@
|
||||
@@ -109,7 +109,17 @@
|
||||
|
||||
@Override
|
||||
public void setTarget(@Nullable EntityLiving entityliving) {
|
||||
@@ -19,7 +19,7 @@
|
||||
AttributeModifiable attributemodifiable = this.getAttribute(GenericAttributes.MOVEMENT_SPEED);
|
||||
|
||||
if (entityliving == null) {
|
||||
@@ -125,6 +135,7 @@
|
||||
@@ -124,6 +134,7 @@
|
||||
attributemodifiable.addTransientModifier(EntityEnderman.SPEED_MODIFIER_ATTACKING);
|
||||
}
|
||||
}
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
}
|
||||
|
||||
@@ -471,9 +482,13 @@
|
||||
@@ -470,9 +481,13 @@
|
||||
if (iblockdata2 != null) {
|
||||
iblockdata2 = Block.updateFromNeighbourShapes(iblockdata2, this.enderman.level, blockposition);
|
||||
if (this.canPlaceBlock(world, blockposition, iblockdata2, iblockdata, iblockdata1, blockposition1)) {
|
||||
@@ -41,10 +41,10 @@
|
||||
}
|
||||
|
||||
}
|
||||
@@ -512,9 +527,13 @@
|
||||
@@ -511,9 +526,13 @@
|
||||
boolean flag = movingobjectpositionblock.getBlockPos().equals(blockposition);
|
||||
|
||||
if (iblockdata.is((Tag) TagsBlock.ENDERMAN_HOLDABLE) && flag) {
|
||||
if (iblockdata.is(TagsBlock.ENDERMAN_HOLDABLE) && flag) {
|
||||
- world.removeBlock(blockposition, false);
|
||||
- world.gameEvent(this.enderman, GameEvent.BLOCK_DESTROY, blockposition);
|
||||
- this.enderman.setCarriedBlock(iblockdata.getBlock().defaultBlockState());
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/entity/monster/EntitySilverfish.java
|
||||
+++ b/net/minecraft/world/entity/monster/EntitySilverfish.java
|
||||
@@ -173,6 +173,11 @@
|
||||
@@ -175,6 +175,11 @@
|
||||
Block block = iblockdata.getBlock();
|
||||
|
||||
if (block instanceof BlockMonsterEggs) {
|
||||
@@ -12,7 +12,7 @@
|
||||
if (world.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING)) {
|
||||
world.destroyBlock(blockposition1, true, this.silverfish);
|
||||
} else {
|
||||
@@ -242,6 +247,11 @@
|
||||
@@ -244,6 +249,11 @@
|
||||
IBlockData iblockdata = world.getBlockState(blockposition);
|
||||
|
||||
if (BlockMonsterEggs.isCompatibleHostBlock(iblockdata)) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/entity/monster/EntitySlime.java
|
||||
+++ b/net/minecraft/world/entity/monster/EntitySlime.java
|
||||
@@ -45,6 +45,14 @@
|
||||
@@ -43,6 +43,14 @@
|
||||
import net.minecraft.world.level.storage.loot.LootTables;
|
||||
import net.minecraft.world.phys.Vec3D;
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
public class EntitySlime extends EntityInsentient implements IMonster {
|
||||
|
||||
private static final DataWatcherObject<Integer> ID_SIZE = DataWatcher.defineId(EntitySlime.class, DataWatcherRegistry.INT);
|
||||
@@ -186,7 +194,7 @@
|
||||
@@ -184,7 +192,7 @@
|
||||
|
||||
@Override
|
||||
public EntityTypes<? extends EntitySlime> getType() {
|
||||
@@ -24,7 +24,7 @@
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -200,6 +208,19 @@
|
||||
@@ -198,6 +206,19 @@
|
||||
int j = i / 2;
|
||||
int k = 2 + this.random.nextInt(3);
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
for (int l = 0; l < k; ++l) {
|
||||
float f1 = ((float) (l % 2) - 0.5F) * f;
|
||||
float f2 = ((float) (l / 2) - 0.5F) * f;
|
||||
@@ -214,8 +235,18 @@
|
||||
@@ -212,8 +233,18 @@
|
||||
entityslime.setInvulnerable(this.isInvulnerable());
|
||||
entityslime.setSize(j, true);
|
||||
entityslime.moveTo(this.getX() + (double) f1, this.getY() + 0.5D, this.getZ() + (double) f2, this.random.nextFloat() * 360.0F, 0.0F);
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
--- a/net/minecraft/world/entity/monster/EntityStrider.java
|
||||
+++ b/net/minecraft/world/entity/monster/EntityStrider.java
|
||||
@@ -321,7 +321,13 @@
|
||||
@@ -320,7 +320,13 @@
|
||||
IBlockData iblockdata1 = this.getBlockStateOn();
|
||||
boolean flag = iblockdata.is((Tag) TagsBlock.STRIDER_WARM_BLOCKS) || iblockdata1.is((Tag) TagsBlock.STRIDER_WARM_BLOCKS) || this.getFluidHeight(TagsFluid.LAVA) > 0.0D;
|
||||
boolean flag = iblockdata.is(TagsBlock.STRIDER_WARM_BLOCKS) || iblockdata1.is(TagsBlock.STRIDER_WARM_BLOCKS) || this.getFluidHeight(TagsFluid.LAVA) > 0.0D;
|
||||
|
||||
- this.setSuffocating(!flag);
|
||||
+ // CraftBukkit start
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
--- a/net/minecraft/world/entity/monster/EntityZombieVillager.java
|
||||
+++ b/net/minecraft/world/entity/monster/EntityZombieVillager.java
|
||||
@@ -47,6 +47,13 @@
|
||||
@@ -48,6 +48,13 @@
|
||||
import net.minecraft.world.level.gameevent.GameEvent;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.slf4j.Logger;
|
||||
|
||||
+// CraftBukkit start
|
||||
+import net.minecraft.server.MinecraftServer;
|
||||
@@ -13,8 +13,8 @@
|
||||
+
|
||||
public class EntityZombieVillager extends EntityZombie implements VillagerDataHolder {
|
||||
|
||||
public static final DataWatcherObject<Boolean> DATA_CONVERTING_ID = DataWatcher.defineId(EntityZombieVillager.class, DataWatcherRegistry.BOOLEAN);
|
||||
@@ -63,6 +70,7 @@
|
||||
private static final Logger LOGGER = LogUtils.getLogger();
|
||||
@@ -65,6 +72,7 @@
|
||||
@Nullable
|
||||
private NBTTagCompound tradeOffers;
|
||||
private int villagerXp;
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
public EntityZombieVillager(EntityTypes<? extends EntityZombieVillager> entitytypes, World world) {
|
||||
super(entitytypes, world);
|
||||
@@ -79,7 +87,7 @@
|
||||
@@ -83,7 +91,7 @@
|
||||
@Override
|
||||
public void addAdditionalSaveData(NBTTagCompound nbttagcompound) {
|
||||
super.addAdditionalSaveData(nbttagcompound);
|
||||
@@ -31,7 +31,7 @@
|
||||
Logger logger = EntityZombieVillager.LOGGER;
|
||||
|
||||
Objects.requireNonNull(logger);
|
||||
@@ -135,6 +143,10 @@
|
||||
@@ -139,6 +147,10 @@
|
||||
public void tick() {
|
||||
if (!this.level.isClientSide && this.isAlive() && this.isConverting()) {
|
||||
int i = this.getConversionProgress();
|
||||
@@ -42,7 +42,7 @@
|
||||
|
||||
this.villagerConversionTime -= i;
|
||||
if (this.villagerConversionTime <= 0) {
|
||||
@@ -143,6 +155,7 @@
|
||||
@@ -147,6 +159,7 @@
|
||||
}
|
||||
|
||||
super.tick();
|
||||
@@ -50,7 +50,7 @@
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -187,8 +200,11 @@
|
||||
@@ -191,8 +204,11 @@
|
||||
this.conversionStarter = uuid;
|
||||
this.villagerConversionTime = i;
|
||||
this.getEntityData().set(EntityZombieVillager.DATA_CONVERTING_ID, true);
|
||||
@@ -64,7 +64,7 @@
|
||||
this.level.broadcastEntityEvent(this, (byte) 16);
|
||||
}
|
||||
|
||||
@@ -205,7 +221,13 @@
|
||||
@@ -209,7 +225,13 @@
|
||||
}
|
||||
|
||||
private void finishConversion(WorldServer worldserver) {
|
||||
@@ -79,7 +79,7 @@
|
||||
EnumItemSlot[] aenumitemslot = EnumItemSlot.values();
|
||||
int i = aenumitemslot.length;
|
||||
|
||||
@@ -220,7 +242,9 @@
|
||||
@@ -224,7 +246,9 @@
|
||||
double d0 = (double) this.getEquipmentDropChance(enumitemslot);
|
||||
|
||||
if (d0 > 1.0D) {
|
||||
@@ -89,7 +89,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -246,7 +270,7 @@
|
||||
@@ -250,7 +274,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/entity/monster/piglin/PiglinAI.java
|
||||
+++ b/net/minecraft/world/entity/monster/piglin/PiglinAI.java
|
||||
@@ -72,6 +72,13 @@
|
||||
@@ -71,6 +71,13 @@
|
||||
import net.minecraft.world.level.storage.loot.parameters.LootContextParameters;
|
||||
import net.minecraft.world.phys.Vec3D;
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
public class PiglinAI {
|
||||
|
||||
public static final int REPELLENT_DETECTION_RANGE_HORIZONTAL = 8;
|
||||
@@ -187,13 +194,13 @@
|
||||
@@ -186,13 +193,13 @@
|
||||
|
||||
protected static void updateActivity(EntityPiglin entitypiglin) {
|
||||
BehaviorController<EntityPiglin> behaviorcontroller = entitypiglin.getBrain();
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
Objects.requireNonNull(entitypiglin);
|
||||
optional.ifPresent(entitypiglin::playSound);
|
||||
@@ -225,23 +232,27 @@
|
||||
@@ -224,23 +231,27 @@
|
||||
stopWalking(entitypiglin);
|
||||
ItemStack itemstack;
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
|
||||
if (!flag) {
|
||||
putInInventory(entitypiglin, itemstack);
|
||||
@@ -277,9 +288,14 @@
|
||||
@@ -276,9 +287,14 @@
|
||||
boolean flag1;
|
||||
|
||||
if (entitypiglin.isAdult()) {
|
||||
@@ -80,7 +80,7 @@
|
||||
} else if (!flag1) {
|
||||
boolean flag2 = entitypiglin.equipItemIfPossible(itemstack);
|
||||
|
||||
@@ -292,7 +308,7 @@
|
||||
@@ -291,7 +307,7 @@
|
||||
if (!flag1) {
|
||||
ItemStack itemstack1 = entitypiglin.getMainHandItem();
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
putInInventory(entitypiglin, itemstack1);
|
||||
} else {
|
||||
throwItems(entitypiglin, Collections.singletonList(itemstack1));
|
||||
@@ -369,7 +385,7 @@
|
||||
@@ -368,7 +384,7 @@
|
||||
return false;
|
||||
} else if (isAdmiringDisabled(entitypiglin) && entitypiglin.getBrain().hasMemoryValue(MemoryModuleType.ATTACK_TARGET)) {
|
||||
return false;
|
||||
@@ -98,7 +98,7 @@
|
||||
return isNotHoldingLovedItemInOffHand(entitypiglin);
|
||||
} else {
|
||||
boolean flag = entitypiglin.canAddToInventory(itemstack);
|
||||
@@ -378,6 +394,12 @@
|
||||
@@ -377,6 +393,12 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -109,9 +109,9 @@
|
||||
+ // CraftBukkit end
|
||||
+
|
||||
protected static boolean isLovedItem(ItemStack itemstack) {
|
||||
return itemstack.is((Tag) TagsItem.PIGLIN_LOVED);
|
||||
return itemstack.is(TagsItem.PIGLIN_LOVED);
|
||||
}
|
||||
@@ -473,7 +495,7 @@
|
||||
@@ -472,7 +494,7 @@
|
||||
}
|
||||
|
||||
protected static boolean canAdmire(EntityPiglin entitypiglin, ItemStack itemstack) {
|
||||
@@ -120,7 +120,7 @@
|
||||
}
|
||||
|
||||
protected static void wasHurtBy(EntityPiglin entitypiglin, EntityLiving entityliving) {
|
||||
@@ -740,6 +762,12 @@
|
||||
@@ -739,6 +761,12 @@
|
||||
return entitypiglin.getBrain().hasMemoryValue(MemoryModuleType.ADMIRING_ITEM);
|
||||
}
|
||||
|
||||
@@ -133,7 +133,7 @@
|
||||
private static boolean isBarterCurrency(ItemStack itemstack) {
|
||||
return itemstack.is(PiglinAI.BARTERING_ITEM);
|
||||
}
|
||||
@@ -777,7 +805,7 @@
|
||||
@@ -776,7 +804,7 @@
|
||||
}
|
||||
|
||||
private static boolean isNotHoldingLovedItemInOffHand(EntityPiglin entitypiglin) {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
--- a/net/minecraft/world/entity/npc/EntityVillager.java
|
||||
+++ b/net/minecraft/world/entity/npc/EntityVillager.java
|
||||
@@ -89,6 +89,14 @@
|
||||
@@ -90,6 +90,14 @@
|
||||
import net.minecraft.world.phys.AxisAlignedBB;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.slf4j.Logger;
|
||||
|
||||
+// CraftBukkit start
|
||||
+import org.bukkit.Bukkit;
|
||||
@@ -14,8 +14,8 @@
|
||||
+
|
||||
public class EntityVillager extends EntityVillagerAbstract implements ReputationHandler, VillagerDataHolder {
|
||||
|
||||
private static final DataWatcherObject<VillagerData> DATA_VILLAGER_DATA = DataWatcher.defineId(EntityVillager.class, DataWatcherRegistry.VILLAGER_DATA);
|
||||
@@ -146,7 +154,7 @@
|
||||
private static final Logger LOGGER = LogUtils.getLogger();
|
||||
@@ -148,7 +156,7 @@
|
||||
|
||||
@Override
|
||||
public BehaviorController<EntityVillager> getBrain() {
|
||||
@@ -24,7 +24,7 @@
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -229,7 +237,7 @@
|
||||
@@ -231,7 +239,7 @@
|
||||
this.increaseProfessionLevelOnUpdate = false;
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -357,7 +365,13 @@
|
||||
@@ -359,7 +367,13 @@
|
||||
while (iterator.hasNext()) {
|
||||
MerchantRecipe merchantrecipe = (MerchantRecipe) iterator.next();
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
}
|
||||
|
||||
this.lastRestockGameTime = this.level.getGameTime();
|
||||
@@ -415,7 +429,13 @@
|
||||
@@ -417,7 +431,13 @@
|
||||
while (iterator.hasNext()) {
|
||||
MerchantRecipe merchantrecipe = (MerchantRecipe) iterator.next();
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -474,7 +494,7 @@
|
||||
@@ -476,7 +496,7 @@
|
||||
@Override
|
||||
public void addAdditionalSaveData(NBTTagCompound nbttagcompound) {
|
||||
super.addAdditionalSaveData(nbttagcompound);
|
||||
@@ -72,7 +72,7 @@
|
||||
Logger logger = EntityVillager.LOGGER;
|
||||
|
||||
Objects.requireNonNull(logger);
|
||||
@@ -816,7 +836,12 @@
|
||||
@@ -818,7 +838,12 @@
|
||||
}
|
||||
|
||||
entitywitch.setPersistenceRequired();
|
||||
@@ -86,7 +86,7 @@
|
||||
this.releaseAllPois();
|
||||
this.discard();
|
||||
} else {
|
||||
@@ -837,6 +862,13 @@
|
||||
@@ -839,6 +864,13 @@
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -100,7 +100,7 @@
|
||||
this.onItemPickup(entityitem);
|
||||
this.take(entityitem, itemstack.getCount());
|
||||
ItemStack itemstack1 = inventorysubcontainer.addItem(itemstack);
|
||||
@@ -949,7 +981,7 @@
|
||||
@@ -951,7 +983,7 @@
|
||||
|
||||
if (entityirongolem != null) {
|
||||
if (entityirongolem.checkSpawnRules(worldserver, EnumMobSpawn.MOB_SUMMONED) && entityirongolem.checkSpawnObstruction(worldserver)) {
|
||||
@@ -109,7 +109,7 @@
|
||||
return entityirongolem;
|
||||
}
|
||||
|
||||
@@ -1027,7 +1059,7 @@
|
||||
@@ -1029,7 +1061,7 @@
|
||||
@Override
|
||||
public void startSleeping(BlockPosition blockposition) {
|
||||
super.startSleeping(blockposition);
|
||||
@@ -118,7 +118,7 @@
|
||||
this.brain.eraseMemory(MemoryModuleType.WALK_TARGET);
|
||||
this.brain.eraseMemory(MemoryModuleType.CANT_REACH_WALK_TARGET_SINCE);
|
||||
}
|
||||
@@ -1035,7 +1067,7 @@
|
||||
@@ -1037,7 +1069,7 @@
|
||||
@Override
|
||||
public void stopSleeping() {
|
||||
super.stopSleeping();
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/entity/npc/EntityVillagerTrader.java
|
||||
+++ b/net/minecraft/world/entity/npc/EntityVillagerTrader.java
|
||||
@@ -45,6 +45,13 @@
|
||||
@@ -44,6 +44,13 @@
|
||||
import net.minecraft.world.level.World;
|
||||
import net.minecraft.world.phys.Vec3D;
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
public class EntityVillagerTrader extends EntityVillagerAbstract {
|
||||
|
||||
private static final int NUMBER_OF_TRADE_OFFERS = 5;
|
||||
@@ -54,6 +61,7 @@
|
||||
@@ -53,6 +60,7 @@
|
||||
|
||||
public EntityVillagerTrader(EntityTypes<? extends EntityVillagerTrader> entitytypes, World world) {
|
||||
super(entitytypes, world);
|
||||
@@ -22,7 +22,7 @@
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -131,7 +139,16 @@
|
||||
@@ -130,7 +138,16 @@
|
||||
MerchantRecipe merchantrecipe = villagertrades_imerchantrecipeoption.getOffer(this, this.random);
|
||||
|
||||
if (merchantrecipe != null) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/entity/player/EntityHuman.java
|
||||
+++ b/net/minecraft/world/entity/player/EntityHuman.java
|
||||
@@ -111,6 +111,19 @@
|
||||
@@ -112,6 +112,19 @@
|
||||
import net.minecraft.world.scores.ScoreboardTeam;
|
||||
import net.minecraft.world.scores.ScoreboardTeamBase;
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
public abstract class EntityHuman extends EntityLiving {
|
||||
|
||||
public static final String UUID_PREFIX_OFFLINE_PLAYER = "OfflinePlayer:";
|
||||
@@ -124,7 +137,8 @@
|
||||
@@ -125,7 +138,8 @@
|
||||
public static final float SWIMMING_BB_HEIGHT = 0.6F;
|
||||
public static final float DEFAULT_EYE_HEIGHT = 1.62F;
|
||||
public static final EntitySize STANDING_DIMENSIONS = EntitySize.scalable(0.6F, 1.8F);
|
||||
@@ -30,7 +30,7 @@
|
||||
private static final int FLY_ACHIEVEMENT_SPEED = 25;
|
||||
private static final DataWatcherObject<Float> DATA_PLAYER_ABSORPTION_ID = DataWatcher.defineId(EntityHuman.class, DataWatcherRegistry.FLOAT);
|
||||
private static final DataWatcherObject<Integer> DATA_SCORE_ID = DataWatcher.defineId(EntityHuman.class, DataWatcherRegistry.INT);
|
||||
@@ -134,10 +148,10 @@
|
||||
@@ -135,10 +149,10 @@
|
||||
protected static final DataWatcherObject<NBTTagCompound> DATA_SHOULDER_RIGHT = DataWatcher.defineId(EntityHuman.class, DataWatcherRegistry.COMPOUND_TAG);
|
||||
private long timeEntitySatOnShoulder;
|
||||
private final PlayerInventory inventory = new PlayerInventory(this);
|
||||
@@ -43,7 +43,7 @@
|
||||
protected int jumpTriggerTime;
|
||||
public float oBob;
|
||||
public float bob;
|
||||
@@ -164,6 +178,16 @@
|
||||
@@ -165,6 +179,16 @@
|
||||
@Nullable
|
||||
public EntityFishingHook fishing;
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
public EntityHuman(World world, BlockPosition blockposition, float f, GameProfile gameprofile) {
|
||||
super(EntityTypes.PLAYER, world);
|
||||
this.lastItemInMainHand = ItemStack.EMPTY;
|
||||
@@ -302,7 +326,7 @@
|
||||
@@ -303,7 +327,7 @@
|
||||
ItemStack itemstack = this.getItemBySlot(EnumItemSlot.HEAD);
|
||||
|
||||
if (itemstack.is(Items.TURTLE_HELMET) && !this.isEyeInFluid(TagsFluid.WATER)) {
|
||||
@@ -69,7 +69,7 @@
|
||||
}
|
||||
|
||||
}
|
||||
@@ -494,7 +518,8 @@
|
||||
@@ -495,7 +519,8 @@
|
||||
|
||||
if (this.level.getDifficulty() == EnumDifficulty.PEACEFUL && this.level.getGameRules().getBoolean(GameRules.RULE_NATURAL_REGENERATION)) {
|
||||
if (this.getHealth() < this.getMaxHealth() && this.tickCount % 20 == 0) {
|
||||
@@ -79,7 +79,7 @@
|
||||
}
|
||||
|
||||
if (this.foodData.needsFood() && this.tickCount % 10 == 0) {
|
||||
@@ -682,6 +707,30 @@
|
||||
@@ -692,6 +717,30 @@
|
||||
entityitem.setDeltaMovement((double) (-f3 * f2 * 0.3F) + Math.cos((double) f5) * (double) f6, (double) (-f1 * 0.3F + 0.1F + (this.random.nextFloat() - this.random.nextFloat()) * 0.1F), (double) (f4 * f2 * 0.3F) + Math.sin((double) f5) * (double) f6);
|
||||
}
|
||||
|
||||
@@ -110,12 +110,14 @@
|
||||
return entityitem;
|
||||
}
|
||||
}
|
||||
@@ -814,10 +863,10 @@
|
||||
if (this.isDeadOrDying()) {
|
||||
@@ -825,12 +874,12 @@
|
||||
return false;
|
||||
} else {
|
||||
- this.removeEntitiesOnShoulder();
|
||||
+ // this.releaseShoulderEntities(); // CraftBukkit - moved down
|
||||
if (!this.level.isClientSide) {
|
||||
- this.removeEntitiesOnShoulder();
|
||||
+ // this.removeEntitiesOnShoulder(); // CraftBukkit - moved down
|
||||
}
|
||||
|
||||
if (damagesource.scalesWithDifficulty()) {
|
||||
if (this.level.getDifficulty() == EnumDifficulty.PEACEFUL) {
|
||||
- f = 0.0F;
|
||||
@@ -123,7 +125,7 @@
|
||||
}
|
||||
|
||||
if (this.level.getDifficulty() == EnumDifficulty.EASY) {
|
||||
@@ -829,7 +878,13 @@
|
||||
@@ -842,7 +891,13 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -138,7 +140,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -849,10 +904,29 @@
|
||||
@@ -862,10 +917,29 @@
|
||||
}
|
||||
|
||||
public boolean canHarmPlayer(EntityHuman entityhuman) {
|
||||
@@ -171,7 +173,7 @@
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -894,8 +968,13 @@
|
||||
@@ -907,8 +981,13 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -186,7 +188,7 @@
|
||||
if (!this.isInvulnerableTo(damagesource)) {
|
||||
f = this.getDamageAfterArmorAbsorb(damagesource, f);
|
||||
f = this.getDamageAfterMagicAbsorb(damagesource, f);
|
||||
@@ -910,7 +989,7 @@
|
||||
@@ -923,7 +1002,7 @@
|
||||
}
|
||||
|
||||
if (f != 0.0F) {
|
||||
@@ -195,7 +197,7 @@
|
||||
float f3 = this.getHealth();
|
||||
|
||||
this.setHealth(this.getHealth() - f);
|
||||
@@ -921,6 +1000,7 @@
|
||||
@@ -934,6 +1013,7 @@
|
||||
|
||||
}
|
||||
}
|
||||
@@ -203,7 +205,7 @@
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1080,7 +1160,7 @@
|
||||
@@ -1093,7 +1173,7 @@
|
||||
|
||||
f *= 0.2F + f2 * f2 * 0.8F;
|
||||
f1 *= f2;
|
||||
@@ -212,7 +214,7 @@
|
||||
if (f > 0.0F || f1 > 0.0F) {
|
||||
boolean flag = f2 > 0.9F;
|
||||
boolean flag1 = false;
|
||||
@@ -1119,8 +1199,15 @@
|
||||
@@ -1132,8 +1212,15 @@
|
||||
if (entity instanceof EntityLiving) {
|
||||
f3 = ((EntityLiving) entity).getHealth();
|
||||
if (j > 0 && !entity.isOnFire()) {
|
||||
@@ -230,7 +232,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1148,8 +1235,11 @@
|
||||
@@ -1161,8 +1248,11 @@
|
||||
EntityLiving entityliving = (EntityLiving) iterator.next();
|
||||
|
||||
if (entityliving != this && entityliving != entity && !this.isAlliedTo((Entity) entityliving) && (!(entityliving instanceof EntityArmorStand) || !((EntityArmorStand) entityliving).isMarker()) && this.distanceToSqr((Entity) entityliving) < 9.0D) {
|
||||
@@ -243,7 +245,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1158,9 +1248,26 @@
|
||||
@@ -1171,9 +1261,26 @@
|
||||
}
|
||||
|
||||
if (entity instanceof EntityPlayer && entity.hurtMarked) {
|
||||
@@ -270,7 +272,7 @@
|
||||
}
|
||||
|
||||
if (flag2) {
|
||||
@@ -1205,7 +1312,14 @@
|
||||
@@ -1218,7 +1325,14 @@
|
||||
|
||||
this.awardStat(StatisticList.DAMAGE_DEALT, Math.round(f5 * 10.0F));
|
||||
if (j > 0) {
|
||||
@@ -286,7 +288,7 @@
|
||||
}
|
||||
|
||||
if (this.level instanceof WorldServer && f5 > 2.0F) {
|
||||
@@ -1215,12 +1329,17 @@
|
||||
@@ -1228,12 +1342,17 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -305,7 +307,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1293,6 +1412,12 @@
|
||||
@@ -1306,6 +1425,12 @@
|
||||
public void updateTutorialInventoryAction(ItemStack itemstack, ItemStack itemstack1, ClickAction clickaction) {}
|
||||
|
||||
public Either<EntityHuman.EnumBedResult, Unit> startSleepInBed(BlockPosition blockposition) {
|
||||
@@ -318,7 +320,7 @@
|
||||
this.startSleeping(blockposition);
|
||||
this.sleepCounter = 0;
|
||||
return Either.right(Unit.INSTANCE);
|
||||
@@ -1377,9 +1502,9 @@
|
||||
@@ -1390,9 +1515,9 @@
|
||||
super.jumpFromGround();
|
||||
this.awardStat(StatisticList.JUMP);
|
||||
if (this.isSprinting()) {
|
||||
@@ -330,7 +332,7 @@
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1413,7 +1538,11 @@
|
||||
@@ -1426,7 +1551,11 @@
|
||||
this.setDeltaMovement(vec3d2.x, d3 * 0.6D, vec3d2.z);
|
||||
this.flyingSpeed = f;
|
||||
this.resetFallDistance();
|
||||
@@ -343,7 +345,7 @@
|
||||
} else {
|
||||
super.travel(vec3d);
|
||||
}
|
||||
@@ -1448,19 +1577,19 @@
|
||||
@@ -1461,19 +1590,19 @@
|
||||
i = Math.round((float) Math.sqrt(d0 * d0 + d1 * d1 + d2 * d2) * 100.0F);
|
||||
if (i > 0) {
|
||||
this.awardStat(StatisticList.SWIM_ONE_CM, i);
|
||||
@@ -366,7 +368,7 @@
|
||||
}
|
||||
} else if (this.onClimbable()) {
|
||||
if (d1 > 0.0D) {
|
||||
@@ -1471,13 +1600,13 @@
|
||||
@@ -1484,13 +1613,13 @@
|
||||
if (i > 0) {
|
||||
if (this.isSprinting()) {
|
||||
this.awardStat(StatisticList.SPRINT_ONE_CM, i);
|
||||
@@ -383,7 +385,7 @@
|
||||
}
|
||||
}
|
||||
} else if (this.isFallFlying()) {
|
||||
@@ -1543,12 +1672,24 @@
|
||||
@@ -1556,12 +1685,24 @@
|
||||
}
|
||||
|
||||
public void startFallFlying() {
|
||||
@@ -409,7 +411,7 @@
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1638,10 +1779,21 @@
|
||||
@@ -1651,10 +1792,21 @@
|
||||
return this.experienceLevel >= 30 ? 112 + (this.experienceLevel - 30) * 9 : (this.experienceLevel >= 15 ? 37 + (this.experienceLevel - 15) * 5 : 7 + this.experienceLevel * 2);
|
||||
}
|
||||
|
||||
@@ -432,7 +434,7 @@
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1718,15 +1870,22 @@
|
||||
@@ -1731,15 +1883,22 @@
|
||||
|
||||
@Override
|
||||
public void setItemSlot(EnumItemSlot enumitemslot, ItemStack itemstack) {
|
||||
@@ -458,7 +460,7 @@
|
||||
this.inventory.armor.set(enumitemslot.getIndex(), itemstack);
|
||||
}
|
||||
|
||||
@@ -1767,26 +1926,31 @@
|
||||
@@ -1780,26 +1939,31 @@
|
||||
|
||||
protected void removeEntitiesOnShoulder() {
|
||||
if (this.timeEntitySatOnShoulder + 20L < this.level.getGameTime()) {
|
||||
|
||||
@@ -44,15 +44,15 @@
|
||||
}
|
||||
|
||||
this.checkInsideBlocks();
|
||||
@@ -159,6 +175,11 @@
|
||||
Entity entity = damagesource.getEntity();
|
||||
@@ -160,6 +176,11 @@
|
||||
|
||||
if (entity != null) {
|
||||
+ // CraftBukkit start
|
||||
+ if (CraftEventFactory.handleNonLivingEntityDamageEvent(this, damagesource, f, false)) {
|
||||
+ return false;
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
Vec3D vec3d = entity.getLookAngle();
|
||||
if (!this.level.isClientSide) {
|
||||
+ // CraftBukkit start
|
||||
+ if (CraftEventFactory.handleNonLivingEntityDamageEvent(this, damagesource, f, false)) {
|
||||
+ return false;
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
Vec3D vec3d = entity.getLookAngle();
|
||||
|
||||
this.setDeltaMovement(vec3d);
|
||||
this.setDeltaMovement(vec3d);
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
public class EntityFireworks extends IProjectile implements ItemSupplier {
|
||||
|
||||
public static final DataWatcherObject<ItemStack> DATA_ID_FIREWORKS_ITEM = DataWatcher.defineId(EntityFireworks.class, DataWatcherRegistry.ITEM_STACK);
|
||||
@@ -141,7 +143,7 @@
|
||||
@@ -144,7 +146,7 @@
|
||||
MovingObjectPosition movingobjectposition = ProjectileHelper.getHitResult(this, this::canHitEntity);
|
||||
|
||||
if (!this.noPhysics) {
|
||||
@@ -18,7 +18,7 @@
|
||||
this.hasImpulse = true;
|
||||
}
|
||||
|
||||
@@ -156,7 +158,11 @@
|
||||
@@ -159,7 +161,11 @@
|
||||
}
|
||||
|
||||
if (!this.level.isClientSide && this.life > this.lifetime) {
|
||||
@@ -31,7 +31,7 @@
|
||||
}
|
||||
|
||||
}
|
||||
@@ -172,7 +178,11 @@
|
||||
@@ -175,7 +181,11 @@
|
||||
protected void onHitEntity(MovingObjectPositionEntity movingobjectpositionentity) {
|
||||
super.onHitEntity(movingobjectpositionentity);
|
||||
if (!this.level.isClientSide) {
|
||||
@@ -44,7 +44,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -182,7 +192,11 @@
|
||||
@@ -185,7 +195,11 @@
|
||||
|
||||
this.level.getBlockState(blockposition).entityInside(this.level, blockposition, this);
|
||||
if (!this.level.isClientSide() && this.hasExplosion()) {
|
||||
@@ -57,7 +57,7 @@
|
||||
}
|
||||
|
||||
super.onHitBlock(movingobjectpositionblock);
|
||||
@@ -208,7 +222,9 @@
|
||||
@@ -211,7 +225,9 @@
|
||||
|
||||
if (f > 0.0F) {
|
||||
if (this.attachedToEntity != null) {
|
||||
@@ -67,7 +67,7 @@
|
||||
}
|
||||
|
||||
double d0 = 5.0D;
|
||||
@@ -235,7 +251,9 @@
|
||||
@@ -238,7 +254,9 @@
|
||||
if (flag) {
|
||||
float f1 = f * (float) Math.sqrt((5.0D - (double) this.distanceTo(entityliving)) / 5.0D);
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
--- a/net/minecraft/world/entity/projectile/EntityFishingHook.java
|
||||
+++ b/net/minecraft/world/entity/projectile/EntityFishingHook.java
|
||||
@@ -44,6 +44,12 @@
|
||||
import net.minecraft.world.phys.MovingObjectPositionEntity;
|
||||
@@ -45,6 +45,12 @@
|
||||
import net.minecraft.world.phys.Vec3D;
|
||||
import org.slf4j.Logger;
|
||||
|
||||
+// CraftBukkit start
|
||||
+import org.bukkit.entity.Player;
|
||||
@@ -12,8 +12,8 @@
|
||||
+
|
||||
public class EntityFishingHook extends IProjectile {
|
||||
|
||||
private final Random syncronizedRandom;
|
||||
@@ -64,6 +70,12 @@
|
||||
private static final Logger LOGGER = LogUtils.getLogger();
|
||||
@@ -66,6 +72,12 @@
|
||||
private final int luck;
|
||||
private final int lureSpeed;
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
private EntityFishingHook(EntityTypes<? extends EntityFishingHook> entitytypes, World world, int i, int j) {
|
||||
super(entitytypes, world);
|
||||
this.syncronizedRandom = new Random();
|
||||
@@ -258,7 +270,7 @@
|
||||
@@ -260,7 +272,7 @@
|
||||
private void checkCollision() {
|
||||
MovingObjectPosition movingobjectposition = ProjectileHelper.getHitResult(this, this::canHitEntity);
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -305,6 +317,10 @@
|
||||
@@ -307,6 +319,10 @@
|
||||
this.timeUntilLured = 0;
|
||||
this.timeUntilHooked = 0;
|
||||
this.getEntityData().set(EntityFishingHook.DATA_BITING, false);
|
||||
@@ -46,7 +46,7 @@
|
||||
}
|
||||
} else {
|
||||
float f;
|
||||
@@ -338,6 +354,13 @@
|
||||
@@ -340,6 +356,13 @@
|
||||
worldserver.sendParticles(Particles.FISHING, d0, d1, d2, 0, (double) (-f4), 0.01D, (double) f3, 1.0D);
|
||||
}
|
||||
} else {
|
||||
@@ -60,7 +60,7 @@
|
||||
this.playSound(SoundEffects.FISHING_BOBBER_SPLASH, 0.25F, 1.0F + (this.random.nextFloat() - this.random.nextFloat()) * 0.4F);
|
||||
double d3 = this.getY() + 0.5D;
|
||||
|
||||
@@ -374,8 +397,10 @@
|
||||
@@ -376,8 +399,10 @@
|
||||
this.timeUntilHooked = MathHelper.nextInt(this.random, 20, 80);
|
||||
}
|
||||
} else {
|
||||
@@ -73,7 +73,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -442,6 +467,14 @@
|
||||
@@ -444,6 +469,14 @@
|
||||
int i = 0;
|
||||
|
||||
if (this.hookedIn != null) {
|
||||
@@ -88,7 +88,7 @@
|
||||
this.pullEntity(this.hookedIn);
|
||||
CriterionTriggers.FISHING_ROD_HOOKED.trigger((EntityPlayer) entityhuman, itemstack, this, Collections.emptyList());
|
||||
this.level.broadcastEntityEvent(this, (byte) 31);
|
||||
@@ -457,6 +490,15 @@
|
||||
@@ -459,6 +492,15 @@
|
||||
while (iterator.hasNext()) {
|
||||
ItemStack itemstack1 = (ItemStack) iterator.next();
|
||||
EntityItem entityitem = new EntityItem(this.level, this.getX(), this.getY(), this.getZ(), itemstack1);
|
||||
@@ -104,7 +104,7 @@
|
||||
double d0 = entityhuman.getX() - this.getX();
|
||||
double d1 = entityhuman.getY() - this.getY();
|
||||
double d2 = entityhuman.getZ() - this.getZ();
|
||||
@@ -464,7 +506,11 @@
|
||||
@@ -466,7 +508,11 @@
|
||||
|
||||
entityitem.setDeltaMovement(d0 * 0.1D, d1 * 0.1D + Math.sqrt(Math.sqrt(d0 * d0 + d1 * d1 + d2 * d2)) * 0.08D, d2 * 0.1D);
|
||||
this.level.addFreshEntity(entityitem);
|
||||
@@ -114,10 +114,10 @@
|
||||
+ entityhuman.level.addFreshEntity(new EntityExperienceOrb(entityhuman.level, entityhuman.getX(), entityhuman.getY() + 0.5D, entityhuman.getZ() + 0.5D, playerFishEvent.getExpToDrop()));
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
if (itemstack1.is((Tag) TagsItem.FISHES)) {
|
||||
if (itemstack1.is(TagsItem.FISHES)) {
|
||||
entityhuman.awardStat(StatisticList.FISH_CAUGHT, 1);
|
||||
}
|
||||
@@ -474,8 +520,25 @@
|
||||
@@ -476,8 +522,25 @@
|
||||
}
|
||||
|
||||
if (this.onGround) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/entity/projectile/EntityPotion.java
|
||||
+++ b/net/minecraft/world/entity/projectile/EntityPotion.java
|
||||
@@ -33,6 +33,16 @@
|
||||
@@ -32,6 +32,16 @@
|
||||
import net.minecraft.world.phys.MovingObjectPositionBlock;
|
||||
import net.minecraft.world.phys.MovingObjectPositionEntity;
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
public class EntityPotion extends EntityProjectileThrowable implements ItemSupplier {
|
||||
|
||||
public static final double SPLASH_RANGE = 4.0D;
|
||||
@@ -99,7 +109,7 @@
|
||||
@@ -98,7 +108,7 @@
|
||||
|
||||
if (flag) {
|
||||
this.applyWater();
|
||||
@@ -26,7 +26,7 @@
|
||||
if (this.isLingering()) {
|
||||
this.makeAreaOfEffectCloud(itemstack, potionregistry);
|
||||
} else {
|
||||
@@ -145,6 +155,7 @@
|
||||
@@ -144,6 +154,7 @@
|
||||
private void applySplash(List<MobEffect> list, @Nullable Entity entity) {
|
||||
AxisAlignedBB axisalignedbb = this.getBoundingBox().inflate(4.0D, 2.0D, 4.0D);
|
||||
List<EntityLiving> list1 = this.level.getEntitiesOfClass(EntityLiving.class, axisalignedbb);
|
||||
@@ -34,7 +34,7 @@
|
||||
|
||||
if (!list1.isEmpty()) {
|
||||
Entity entity1 = this.getEffectSource();
|
||||
@@ -163,21 +174,47 @@
|
||||
@@ -162,21 +173,47 @@
|
||||
d1 = 1.0D;
|
||||
}
|
||||
|
||||
@@ -96,7 +96,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -213,7 +250,14 @@
|
||||
@@ -212,7 +249,14 @@
|
||||
entityareaeffectcloud.setFixedColor(nbttagcompound.getInt("CustomPotionColor"));
|
||||
}
|
||||
|
||||
@@ -112,10 +112,10 @@
|
||||
}
|
||||
|
||||
public boolean isLingering() {
|
||||
@@ -224,13 +268,25 @@
|
||||
@@ -223,13 +267,25 @@
|
||||
IBlockData iblockdata = this.level.getBlockState(blockposition);
|
||||
|
||||
if (iblockdata.is((Tag) TagsBlock.FIRE)) {
|
||||
if (iblockdata.is(TagsBlock.FIRE)) {
|
||||
- this.level.removeBlock(blockposition, false);
|
||||
+ // CraftBukkit start
|
||||
+ if (!CraftEventFactory.callEntityChangeBlockEvent(this, blockposition, Blocks.AIR.defaultBlockState()).isCancelled()) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/entity/projectile/EntityShulkerBullet.java
|
||||
+++ b/net/minecraft/world/entity/projectile/EntityShulkerBullet.java
|
||||
@@ -60,8 +60,21 @@
|
||||
@@ -59,8 +59,21 @@
|
||||
this.finalTarget = entity;
|
||||
this.currentMoveDirection = EnumDirection.UP;
|
||||
this.selectNextMoveDirection(enumdirection_enumaxis);
|
||||
@@ -22,7 +22,7 @@
|
||||
@Override
|
||||
public SoundCategory getSoundSource() {
|
||||
return SoundCategory.HOSTILE;
|
||||
@@ -225,7 +238,7 @@
|
||||
@@ -224,7 +237,7 @@
|
||||
MovingObjectPosition movingobjectposition = ProjectileHelper.getHitResult(this, this::canHitEntity);
|
||||
|
||||
if (movingobjectposition.getType() != MovingObjectPosition.EnumMovingObjectType.MISS) {
|
||||
@@ -31,7 +31,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -292,7 +305,7 @@
|
||||
@@ -291,7 +304,7 @@
|
||||
if (flag) {
|
||||
this.doEnchantDamageEffects(entityliving, entity);
|
||||
if (entity instanceof EntityLiving) {
|
||||
@@ -40,7 +40,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -318,6 +331,11 @@
|
||||
@@ -317,6 +330,11 @@
|
||||
|
||||
@Override
|
||||
public boolean hurt(DamageSource damagesource, float f) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/entity/raid/EntityRaider.java
|
||||
+++ b/net/minecraft/world/entity/raid/EntityRaider.java
|
||||
@@ -166,7 +166,7 @@
|
||||
@@ -165,7 +165,7 @@
|
||||
MobEffect mobeffect1 = new MobEffect(MobEffects.BAD_OMEN, 120000, i, false, false, true);
|
||||
|
||||
if (!this.level.getGameRules().getBoolean(GameRules.RULE_DISABLE_RAIDS)) {
|
||||
@@ -9,7 +9,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -306,7 +306,7 @@
|
||||
@@ -305,7 +305,7 @@
|
||||
|
||||
private final T mob;
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
this.mob = entityraider;
|
||||
this.setFlags(EnumSet.of(PathfinderGoal.Type.MOVE));
|
||||
}
|
||||
@@ -522,7 +522,7 @@
|
||||
@@ -521,7 +521,7 @@
|
||||
while (iterator.hasNext()) {
|
||||
EntityRaider entityraider = (EntityRaider) iterator.next();
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
}
|
||||
|
||||
}
|
||||
@@ -539,7 +539,7 @@
|
||||
@@ -538,7 +538,7 @@
|
||||
while (iterator.hasNext()) {
|
||||
EntityRaider entityraider = (EntityRaider) iterator.next();
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/entity/raid/PersistentRaid.java
|
||||
+++ b/net/minecraft/world/entity/raid/PersistentRaid.java
|
||||
@@ -109,19 +109,33 @@
|
||||
@@ -110,19 +110,33 @@
|
||||
boolean flag = false;
|
||||
|
||||
if (!raid.isStarted()) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/entity/vehicle/EntityBoat.java
|
||||
+++ b/net/minecraft/world/entity/vehicle/EntityBoat.java
|
||||
@@ -52,6 +52,15 @@
|
||||
@@ -51,6 +51,15 @@
|
||||
import net.minecraft.world.phys.shapes.VoxelShape;
|
||||
import net.minecraft.world.phys.shapes.VoxelShapes;
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
public class EntityBoat extends Entity {
|
||||
|
||||
private static final DataWatcherObject<Integer> DATA_ID_HURT = 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];
|
||||
@@ -161,6 +178,19 @@
|
||||
@@ -160,6 +177,19 @@
|
||||
if (this.isInvulnerableTo(damagesource)) {
|
||||
return false;
|
||||
} else if (!this.level.isClientSide && !this.isRemoved()) {
|
||||
@@ -51,7 +51,7 @@
|
||||
this.setHurtDir(-this.getHurtDir());
|
||||
this.setHurtTime(10);
|
||||
this.setDamage(this.getDamage() + f * 10.0F);
|
||||
@@ -169,6 +199,15 @@
|
||||
@@ -168,6 +198,15 @@
|
||||
boolean flag = damagesource.getEntity() instanceof EntityHuman && ((EntityHuman) damagesource.getEntity()).getAbilities().instabuild;
|
||||
|
||||
if (flag || this.getDamage() > 40.0F) {
|
||||
@@ -67,7 +67,7 @@
|
||||
if (!flag && this.level.getGameRules().getBoolean(GameRules.RULE_DOENTITYDROPS)) {
|
||||
this.spawnAtLocation((IMaterial) this.getDropItem());
|
||||
}
|
||||
@@ -204,9 +243,29 @@
|
||||
@@ -203,9 +242,29 @@
|
||||
public void push(Entity entity) {
|
||||
if (entity instanceof EntityBoat) {
|
||||
if (entity.getBoundingBox().minY < this.getBoundingBox().maxY) {
|
||||
@@ -97,7 +97,7 @@
|
||||
super.push(entity);
|
||||
}
|
||||
|
||||
@@ -257,6 +316,7 @@
|
||||
@@ -256,6 +315,7 @@
|
||||
return this.getDirection().getClockWise();
|
||||
}
|
||||
|
||||
@@ -105,7 +105,7 @@
|
||||
@Override
|
||||
public void tick() {
|
||||
this.oldStatus = this.status;
|
||||
@@ -297,6 +357,22 @@
|
||||
@@ -296,6 +356,22 @@
|
||||
this.setDeltaMovement(Vec3D.ZERO);
|
||||
}
|
||||
|
||||
@@ -128,7 +128,7 @@
|
||||
this.tickBubbleColumn();
|
||||
|
||||
for (int i = 0; i <= 1; ++i) {
|
||||
@@ -801,6 +877,11 @@
|
||||
@@ -800,6 +876,11 @@
|
||||
|
||||
this.causeFallDamage(this.fallDistance, 1.0F, DamageSource.FALL);
|
||||
if (!this.level.isClientSide && !this.isRemoved()) {
|
||||
@@ -140,7 +140,7 @@
|
||||
this.kill();
|
||||
if (this.level.getGameRules().getBoolean(GameRules.RULE_DOENTITYDROPS)) {
|
||||
int i;
|
||||
@@ -814,6 +895,7 @@
|
||||
@@ -813,6 +894,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/entity/vehicle/EntityMinecartAbstract.java
|
||||
+++ b/net/minecraft/world/entity/vehicle/EntityMinecartAbstract.java
|
||||
@@ -49,6 +49,15 @@
|
||||
@@ -48,6 +48,15 @@
|
||||
import net.minecraft.world.phys.AxisAlignedBB;
|
||||
import net.minecraft.world.phys.Vec3D;
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
public abstract class EntityMinecartAbstract extends Entity {
|
||||
|
||||
private static final DataWatcherObject<Integer> DATA_ID_HURT = DataWatcher.defineId(EntityMinecartAbstract.class, DataWatcherRegistry.INT);
|
||||
@@ -91,6 +100,17 @@
|
||||
@@ -90,6 +99,17 @@
|
||||
private double lyd;
|
||||
private double lzd;
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
protected EntityMinecartAbstract(EntityTypes<?> entitytypes, World world) {
|
||||
super(entitytypes, world);
|
||||
this.blocksBuilding = true;
|
||||
@@ -217,6 +237,19 @@
|
||||
@@ -216,6 +236,19 @@
|
||||
if (this.isInvulnerableTo(damagesource)) {
|
||||
return false;
|
||||
} else {
|
||||
@@ -54,7 +54,7 @@
|
||||
this.setHurtDir(-this.getHurtDir());
|
||||
this.setHurtTime(10);
|
||||
this.markHurt();
|
||||
@@ -225,6 +258,15 @@
|
||||
@@ -224,6 +257,15 @@
|
||||
boolean flag = damagesource.getEntity() instanceof EntityHuman && ((EntityHuman) damagesource.getEntity()).getAbilities().instabuild;
|
||||
|
||||
if (flag || this.getDamage() > 40.0F) {
|
||||
@@ -70,7 +70,7 @@
|
||||
this.ejectPassengers();
|
||||
if (flag && !this.hasCustomName()) {
|
||||
this.discard();
|
||||
@@ -284,6 +326,14 @@
|
||||
@@ -283,6 +325,14 @@
|
||||
|
||||
@Override
|
||||
public void tick() {
|
||||
@@ -85,7 +85,7 @@
|
||||
if (this.getHurtTime() > 0) {
|
||||
this.setHurtTime(this.getHurtTime() - 1);
|
||||
}
|
||||
@@ -293,7 +343,7 @@
|
||||
@@ -292,7 +342,7 @@
|
||||
}
|
||||
|
||||
this.checkOutOfWorld();
|
||||
@@ -94,7 +94,7 @@
|
||||
double d0;
|
||||
|
||||
if (this.level.isClientSide) {
|
||||
@@ -359,6 +409,18 @@
|
||||
@@ -358,6 +408,18 @@
|
||||
}
|
||||
|
||||
this.setRot(this.getYRot(), this.getXRot());
|
||||
@@ -113,7 +113,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));
|
||||
|
||||
@@ -367,8 +429,26 @@
|
||||
@@ -366,8 +428,26 @@
|
||||
Entity entity = (Entity) list.get(l);
|
||||
|
||||
if (!(entity instanceof EntityHuman) && !(entity instanceof EntityIronGolem) && !(entity instanceof EntityMinecartAbstract) && !this.isVehicle() && !entity.isPassenger()) {
|
||||
@@ -140,7 +140,7 @@
|
||||
entity.push(this);
|
||||
}
|
||||
}
|
||||
@@ -380,6 +460,14 @@
|
||||
@@ -379,6 +459,14 @@
|
||||
Entity entity1 = (Entity) iterator.next();
|
||||
|
||||
if (!this.hasPassenger(entity1) && entity1.isPushable() && entity1 instanceof EntityMinecartAbstract) {
|
||||
@@ -155,7 +155,7 @@
|
||||
entity1.push(this);
|
||||
}
|
||||
}
|
||||
@@ -396,7 +484,7 @@
|
||||
@@ -395,7 +483,7 @@
|
||||
}
|
||||
|
||||
protected double getMaxSpeed() {
|
||||
@@ -164,7 +164,7 @@
|
||||
}
|
||||
|
||||
public void activateMinecart(int i, int j, int k, boolean flag) {}
|
||||
@@ -407,12 +495,16 @@
|
||||
@@ -406,12 +494,16 @@
|
||||
|
||||
this.setDeltaMovement(MathHelper.clamp(vec3d.x, -d0, d0), vec3d.y, MathHelper.clamp(vec3d.z, -d0, d0));
|
||||
if (this.onGround) {
|
||||
@@ -183,7 +183,7 @@
|
||||
}
|
||||
|
||||
}
|
||||
@@ -603,7 +695,7 @@
|
||||
@@ -602,7 +694,7 @@
|
||||
}
|
||||
|
||||
protected void applyNaturalSlowdown() {
|
||||
@@ -192,7 +192,7 @@
|
||||
Vec3D vec3d = this.getDeltaMovement();
|
||||
|
||||
vec3d = vec3d.multiply(d0, 0.0D, d0);
|
||||
@@ -742,6 +834,14 @@
|
||||
@@ -741,6 +833,14 @@
|
||||
if (!this.level.isClientSide) {
|
||||
if (!entity.noPhysics && !this.noPhysics) {
|
||||
if (!this.hasPassenger(entity)) {
|
||||
@@ -207,7 +207,7 @@
|
||||
double d0 = entity.getX() - this.getX();
|
||||
double d1 = entity.getZ() - this.getZ();
|
||||
double d2 = d0 * d0 + d1 * d1;
|
||||
@@ -921,4 +1021,26 @@
|
||||
@@ -920,4 +1020,26 @@
|
||||
|
||||
private EnumMinecartType() {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user