@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/entity/EntityInsentient.java
|
||||
+++ b/net/minecraft/world/entity/EntityInsentient.java
|
||||
@@ -75,6 +75,19 @@
|
||||
@@ -76,6 +76,19 @@
|
||||
import net.minecraft.world.level.pathfinder.PathType;
|
||||
import net.minecraft.world.phys.AxisAlignedBB;
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
public abstract class EntityInsentient extends EntityLiving implements Targeting {
|
||||
|
||||
private static final DataWatcherObject<Byte> DATA_MOB_FLAGS_ID = DataWatcher.defineId(EntityInsentient.class, DataWatcherRegistry.BYTE);
|
||||
@@ -122,6 +135,8 @@
|
||||
@@ -123,6 +136,8 @@
|
||||
private BlockPosition restrictCenter;
|
||||
private float restrictRadius;
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
protected EntityInsentient(EntityTypes<? extends EntityInsentient> entitytypes, World world) {
|
||||
super(entitytypes, world);
|
||||
this.handItems = NonNullList.withSize(2, ItemStack.EMPTY);
|
||||
@@ -147,6 +162,12 @@
|
||||
@@ -148,6 +163,12 @@
|
||||
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
protected void registerGoals() {}
|
||||
|
||||
public static AttributeProvider.Builder createMobAttributes() {
|
||||
@@ -258,7 +279,38 @@
|
||||
@@ -259,7 +280,38 @@
|
||||
}
|
||||
|
||||
public void setTarget(@Nullable EntityLiving entityliving) {
|
||||
@@ -81,7 +81,7 @@
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -398,6 +450,12 @@
|
||||
@@ -399,6 +451,12 @@
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -94,7 +94,7 @@
|
||||
@Override
|
||||
public void addAdditionalSaveData(NBTTagCompound nbttagcompound) {
|
||||
super.addAdditionalSaveData(nbttagcompound);
|
||||
@@ -456,7 +514,7 @@
|
||||
@@ -457,7 +515,7 @@
|
||||
}
|
||||
|
||||
nbttagcompound.put("HandDropChances", nbttaglist3);
|
||||
@@ -103,7 +103,7 @@
|
||||
nbttagcompound2 = new NBTTagCompound();
|
||||
if (this.leashHolder instanceof EntityLiving) {
|
||||
UUID uuid = this.leashHolder.getUUID();
|
||||
@@ -487,16 +545,26 @@
|
||||
@@ -488,16 +546,26 @@
|
||||
nbttagcompound.putBoolean("NoAI", this.isNoAi());
|
||||
}
|
||||
|
||||
@@ -132,7 +132,7 @@
|
||||
NBTTagList nbttaglist;
|
||||
int i;
|
||||
|
||||
@@ -543,6 +611,11 @@
|
||||
@@ -544,6 +612,11 @@
|
||||
}
|
||||
|
||||
this.setNoAi(nbttagcompound.getBoolean("NoAI"));
|
||||
@@ -144,7 +144,7 @@
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -610,7 +683,7 @@
|
||||
@@ -611,7 +684,7 @@
|
||||
|
||||
protected void pickUpItem(EntityItem entityitem) {
|
||||
ItemStack itemstack = entityitem.getItem();
|
||||
@@ -153,7 +153,7 @@
|
||||
|
||||
if (!itemstack1.isEmpty()) {
|
||||
this.onItemPickup(entityitem);
|
||||
@@ -624,6 +697,12 @@
|
||||
@@ -625,6 +698,12 @@
|
||||
}
|
||||
|
||||
public ItemStack equipItemIfPossible(ItemStack itemstack) {
|
||||
@@ -166,7 +166,7 @@
|
||||
EnumItemSlot enumitemslot = getEquipmentSlotForItem(itemstack);
|
||||
ItemStack itemstack1 = this.getItemBySlot(enumitemslot);
|
||||
boolean flag = this.canReplaceCurrentItem(itemstack, itemstack1);
|
||||
@@ -634,11 +713,19 @@
|
||||
@@ -635,11 +714,19 @@
|
||||
flag = itemstack1.isEmpty();
|
||||
}
|
||||
|
||||
@@ -187,7 +187,7 @@
|
||||
}
|
||||
|
||||
if (enumitemslot.isArmor() && itemstack.getCount() > 1) {
|
||||
@@ -790,6 +877,7 @@
|
||||
@@ -791,6 +878,7 @@
|
||||
@Override
|
||||
protected final void serverAiStep() {
|
||||
++this.noActionTime;
|
||||
@@ -195,7 +195,7 @@
|
||||
this.level().getProfiler().push("sensing");
|
||||
this.sensing.tick();
|
||||
this.level().getProfiler().pop();
|
||||
@@ -1183,6 +1271,12 @@
|
||||
@@ -1184,6 +1272,12 @@
|
||||
if (!this.isAlive()) {
|
||||
return EnumInteractionResult.PASS;
|
||||
} else if (this.getLeashHolder() == entityhuman) {
|
||||
@@ -208,7 +208,7 @@
|
||||
this.dropLeash(true, !entityhuman.getAbilities().instabuild);
|
||||
this.gameEvent(GameEvent.ENTITY_INTERACT, entityhuman);
|
||||
return EnumInteractionResult.sidedSuccess(this.level().isClientSide);
|
||||
@@ -1208,6 +1302,12 @@
|
||||
@@ -1209,6 +1303,12 @@
|
||||
ItemStack itemstack = entityhuman.getItemInHand(enumhand);
|
||||
|
||||
if (itemstack.is(Items.LEAD) && this.canBeLeashed(entityhuman)) {
|
||||
@@ -221,7 +221,7 @@
|
||||
this.setLeashedTo(entityhuman, true);
|
||||
itemstack.shrink(1);
|
||||
return EnumInteractionResult.sidedSuccess(this.level().isClientSide);
|
||||
@@ -1223,7 +1323,7 @@
|
||||
@@ -1224,7 +1324,7 @@
|
||||
if (itemstack.getItem() instanceof ItemMonsterEgg) {
|
||||
if (this.level() instanceof WorldServer) {
|
||||
ItemMonsterEgg itemmonsteregg = (ItemMonsterEgg) itemstack.getItem();
|
||||
@@ -230,7 +230,7 @@
|
||||
|
||||
optional.ifPresent((entityinsentient) -> {
|
||||
this.onOffspringSpawnedFromEgg(entityhuman, entityinsentient);
|
||||
@@ -1273,12 +1373,19 @@
|
||||
@@ -1274,12 +1374,19 @@
|
||||
return this.restrictRadius != -1.0F;
|
||||
}
|
||||
|
||||
@@ -251,7 +251,7 @@
|
||||
|
||||
if (t0 == null) {
|
||||
return null;
|
||||
@@ -1312,7 +1419,12 @@
|
||||
@@ -1313,7 +1420,12 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -265,7 +265,7 @@
|
||||
if (this.isPassenger()) {
|
||||
Entity entity = this.getVehicle();
|
||||
|
||||
@@ -1333,7 +1445,8 @@
|
||||
@@ -1334,7 +1446,8 @@
|
||||
|
||||
if (this.leashHolder != null) {
|
||||
if (!this.isAlive() || !this.leashHolder.isAlive()) {
|
||||
@@ -275,7 +275,7 @@
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1344,7 +1457,9 @@
|
||||
@@ -1345,7 +1458,9 @@
|
||||
this.leashHolder = null;
|
||||
this.leashInfoTag = null;
|
||||
if (!this.level().isClientSide && flag1) {
|
||||
@@ -285,7 +285,7 @@
|
||||
}
|
||||
|
||||
if (!this.level().isClientSide && flag && this.level() instanceof WorldServer) {
|
||||
@@ -1394,6 +1509,7 @@
|
||||
@@ -1395,6 +1510,7 @@
|
||||
boolean flag1 = super.startRiding(entity, flag);
|
||||
|
||||
if (flag1 && this.isLeashed()) {
|
||||
@@ -293,7 +293,7 @@
|
||||
this.dropLeash(true, true);
|
||||
}
|
||||
|
||||
@@ -1418,7 +1534,9 @@
|
||||
@@ -1419,7 +1535,9 @@
|
||||
}
|
||||
|
||||
if (this.tickCount > 100) {
|
||||
@@ -303,7 +303,7 @@
|
||||
this.leashInfoTag = null;
|
||||
}
|
||||
}
|
||||
@@ -1500,7 +1618,14 @@
|
||||
@@ -1501,7 +1619,14 @@
|
||||
int i = EnchantmentManager.getFireAspect(this);
|
||||
|
||||
if (i > 0) {
|
||||
@@ -319,7 +319,7 @@
|
||||
}
|
||||
|
||||
boolean flag = entity.hurt(this.damageSources().mobAttack(this), f);
|
||||
@@ -1574,6 +1699,7 @@
|
||||
@@ -1576,6 +1701,7 @@
|
||||
@Override
|
||||
protected void removeAfterChangingDimensions() {
|
||||
super.removeAfterChangingDimensions();
|
||||
|
||||
Reference in New Issue
Block a user