Update to Minecraft 1.16.2

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2020-08-12 07:00:00 +10:00
parent 5e5f7f19dc
commit 6a9e00d4b6
208 changed files with 2144 additions and 2455 deletions

View File

@@ -3,10 +3,10 @@
@@ -52,7 +52,8 @@
private static void b(EntityPiglin entitypiglin, BehaviorController<EntityPiglin> behaviorcontroller) {
behaviorcontroller.a(Activity.FLIGHT, 10, ImmutableList.of(new BehaviorAttackTargetForget<>((entityliving) -> {
return !d(entitypiglin, entityliving);
- }), new BehaviorRunIf<>(PiglinAI::c, new BehaviorRetreat<>(5, 0.75F)), new BehaviorWalkAwayOutOfRange(1.0F), new BehaviorAttack(20), new BehaviorCrossbowAttack<>(), new BehaviorRememberHuntedHoglin<>(), new BehaviorRemoveMemory<>(PiglinAI::n, MemoryModuleType.ATTACK_TARGET)), MemoryModuleType.ATTACK_TARGET);
return !b(entitypiglin, entityliving);
- }), new BehaviorRunIf<>(PiglinAI::c, new BehaviorRetreat<>(5, 0.75F)), new BehaviorWalkAwayOutOfRange(1.0F), new BehaviorAttack(20), new BehaviorCrossbowAttack<>(), new BehaviorRememberHuntedHoglin<>(), new BehaviorRemoveMemory<>(PiglinAI::j, MemoryModuleType.ATTACK_TARGET)), MemoryModuleType.ATTACK_TARGET);
+ // CraftBukkit - decompile error
+ }), new BehaviorRunIf<>((l) -> PiglinAI.c((EntityLiving) l), new BehaviorRetreat<>(5, 0.75F)), new BehaviorWalkAwayOutOfRange(1.0F), new BehaviorAttack(20), new BehaviorCrossbowAttack<>(), new BehaviorRememberHuntedHoglin<>(), new BehaviorRemoveMemory<>(PiglinAI::n, MemoryModuleType.ATTACK_TARGET)), MemoryModuleType.ATTACK_TARGET);
+ }), new BehaviorRunIf<>((l) -> PiglinAI.c((EntityLiving) l), new BehaviorRetreat<>(5, 0.75F)), new BehaviorWalkAwayOutOfRange(1.0F), new BehaviorAttack(20), new BehaviorCrossbowAttack<>(), new BehaviorRememberHuntedHoglin<>(), new BehaviorRemoveMemory<>(PiglinAI::j, MemoryModuleType.ATTACK_TARGET)), MemoryModuleType.ATTACK_TARGET);
}
private static void c(BehaviorController<EntityPiglin> behaviorcontroller) {
@@ -44,7 +44,7 @@
if (activity != activity1) {
d(entitypiglin).ifPresent(entitypiglin::a);
@@ -130,14 +133,18 @@
s(entitypiglin);
n(entitypiglin);
ItemStack itemstack;
- if (entityitem.getItemStack().getItem() == Items.GOLD_NUGGET) {
@@ -64,25 +64,34 @@
Item item = itemstack.getItem();
@@ -147,7 +154,7 @@
} else if (c(item) && !A(entitypiglin)) {
y(entitypiglin);
@@ -148,7 +155,7 @@
} else if (c(item) && !u(entitypiglin)) {
s(entitypiglin);
} else {
- boolean flag = entitypiglin.g(itemstack);
+ boolean flag = entitypiglin.g(itemstack, entityitem); // CraftBukkit
if (!flag) {
d(entitypiglin, itemstack);
@@ -583,7 +590,7 @@
@@ -350,7 +357,7 @@
}
public static void a(EntityHuman entityhuman, boolean flag) {
- List<EntityPiglin> list = entityhuman.world.a(EntityPiglin.class, entityhuman.getBoundingBox().g(16.0D));
+ List<EntityPiglinAbstract> list = entityhuman.world.a(EntityPiglin.class, entityhuman.getBoundingBox().g(16.0D)); // CraftBukkit - decompile error
list.stream().filter(PiglinAI::d).filter((entitypiglin) -> {
return !flag || BehaviorUtil.c(entitypiglin, entityhuman);
@@ -586,7 +593,7 @@
EntityLiving entityliving = (EntityLiving) behaviorcontroller.getMemory(MemoryModuleType.AVOID_TARGET).get();
EntityTypes<?> entitytypes = entityliving.getEntityType();
- return entitytypes == EntityTypes.HOGLIN ? v(entitypiglin) : (a(entitytypes) ? !behaviorcontroller.b(MemoryModuleType.NEAREST_VISIBLE_ZOMBIFIED, (Object) entityliving) : false);
+ return entitytypes == EntityTypes.HOGLIN ? v(entitypiglin) : (a(entitytypes) ? !behaviorcontroller.b(MemoryModuleType.NEAREST_VISIBLE_ZOMBIFIED, entityliving) : false); // CraftBukkit - decompile error
- return entitytypes == EntityTypes.HOGLIN ? p(entitypiglin) : (a(entitytypes) ? !behaviorcontroller.b(MemoryModuleType.NEAREST_VISIBLE_ZOMBIFIED, (Object) entityliving) : false);
+ return entitytypes == EntityTypes.HOGLIN ? p(entitypiglin) : (a(entitytypes) ? !behaviorcontroller.b(MemoryModuleType.NEAREST_VISIBLE_ZOMBIFIED, entityliving) : false); // CraftBukkit - decompile error
}
}
@@ -665,7 +672,7 @@
@@ -668,7 +675,7 @@
}
public static boolean b(EntityLiving entityliving) {
@@ -90,4 +99,4 @@
+ return entityliving.getEntityType() == EntityTypes.PLAYER && entityliving.a((java.util.function.Predicate<Item>) PiglinAI::a); // CraftBukkit - decompile error
}
private static boolean D(EntityPiglin entitypiglin) {
private static boolean x(EntityPiglin entitypiglin) {