Skip to content

Commit

Permalink
Update patches
Browse files Browse the repository at this point in the history
  • Loading branch information
coehlrich committed Sep 25, 2024
1 parent 98b3589 commit 4fbbc92
Show file tree
Hide file tree
Showing 11 changed files with 24 additions and 24 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- a/net/minecraft/advancements/critereon/EntitySubPredicates.java
+++ b/net/minecraft/advancements/critereon/EntitySubPredicates.java
@@ -183,7 +183,7 @@
@@ -176,7 +176,7 @@
this.getter = p_336167_;
this.codec = RecordCodecBuilder.mapCodec(
p_335436_ -> p_335436_.group(RegistryCodecs.homogeneousList(p_336141_).fieldOf("variant").forGetter(p_335992_ -> p_335992_.variants))
Expand All @@ -9,7 +9,7 @@
);
}

@@ -226,7 +226,7 @@
@@ -219,7 +219,7 @@
this.getter = p_333805_;
this.codec = RecordCodecBuilder.mapCodec(
p_333719_ -> p_333719_.group(p_333738_.fieldOf("variant").forGetter(p_333753_ -> p_333753_.variant))
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- a/net/minecraft/util/datafix/DataFixers.java
+++ b/net/minecraft/util/datafix/DataFixers.java
@@ -1092,7 +1092,7 @@
@@ -1096,7 +1096,7 @@
Schema schema161 = p_14514_.addSchema(3086, SAME_NAMESPACED);
p_14514_.addFixer(
new EntityVariantFix(
Expand All @@ -9,7 +9,7 @@
p_216528_.defaultReturnValue("minecraft:tabby");
p_216528_.put(0, "minecraft:tabby");
p_216528_.put(1, "minecraft:black");
@@ -1132,7 +1132,7 @@
@@ -1136,7 +1136,7 @@
Schema schema162 = p_14514_.addSchema(3087, SAME_NAMESPACED);
p_14514_.addFixer(
new EntityVariantFix(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
--- a/net/minecraft/world/entity/Entity.java
+++ b/net/minecraft/world/entity/Entity.java
@@ -481,7 +481,7 @@
@@ -480,7 +480,7 @@

this.firstTick = false;
if (!this.level().isClientSide && this instanceof Leashable) {
- Leashable.tickLeash((Entity)((Leashable)this));
+ Leashable.tickLeash((Entity & Leashable)this);
if (this.level() instanceof ServerLevel serverlevel1 && this instanceof Leashable) {
- Leashable.tickLeash(serverlevel1, (Entity)((Leashable)this));
+ Leashable.tickLeash(serverlevel1, (Entity & Leashable)this);
}

profilerfiller.pop();
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
}

private static <E extends Entity & Leashable> void dropLeash(E p_352163_, boolean p_352286_, boolean p_352272_) {
@@ -161,7 +161,7 @@
@@ -163,7 +163,7 @@
}

default void elasticRangeLeashBehaviour(Entity p_353036_, float p_353047_) {
Expand All @@ -36,7 +36,7 @@
}

private static <E extends Entity & Leashable> void legacyElasticRangeLeashBehaviour(E p_353048_, Entity p_353039_, float p_353053_) {
@@ -174,7 +174,7 @@
@@ -176,7 +176,7 @@
}

default void setLeashedTo(Entity p_352411_, boolean p_352183_) {
Expand All @@ -45,7 +45,7 @@
}

private static <E extends Entity & Leashable> void setLeashedTo(E p_352280_, Entity p_352109_, boolean p_352239_) {
@@ -197,7 +197,7 @@
@@ -199,7 +199,7 @@

@Nullable
default Entity getLeashHolder() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- a/net/minecraft/world/entity/TamableAnimal.java
+++ b/net/minecraft/world/entity/TamableAnimal.java
@@ -294,7 +294,7 @@
@@ -297,7 +297,7 @@
}

public class TamableAnimalPanicGoal extends PanicGoal {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- a/net/minecraft/world/entity/animal/axolotl/AxolotlAi.java
+++ b/net/minecraft/world/entity/animal/axolotl/AxolotlAi.java
@@ -73,7 +73,7 @@
@@ -74,7 +74,7 @@
Activity.FIGHT,
0,
ImmutableList.of(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- a/net/minecraft/world/entity/monster/hoglin/HoglinAi.java
+++ b/net/minecraft/world/entity/monster/hoglin/HoglinAi.java
@@ -111,7 +111,7 @@
@@ -112,7 +112,7 @@
SetWalkTargetAwayFrom.entity(MemoryModuleType.AVOID_TARGET, 1.3F, 15, false),
createIdleMovementBehaviors(),
SetEntityLookTargetSometimes.create(8.0F, UniformInt.of(30, 60)),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
Activity.FIGHT,
10,
- ImmutableList.of(
- StopAttackingIfTargetInvalid.create(p_34981_ -> !isNearestValidAttackTarget(p_34904_, p_34981_)),
- StopAttackingIfTargetInvalid.create((p_375910_, p_375911_) -> !isNearestValidAttackTarget(p_375910_, p_34904_, p_375911_)),
+ ImmutableList.<net.minecraft.world.entity.ai.behavior.BehaviorControl<? super Piglin>>of(
+ StopAttackingIfTargetInvalid.<Piglin>create(p_34981_ -> !isNearestValidAttackTarget(p_34904_, p_34981_)),
+ StopAttackingIfTargetInvalid.<Piglin>create((p_375910_, p_375911_) -> !isNearestValidAttackTarget(p_375910_, p_34904_, p_375911_)),
BehaviorBuilder.triggerIf(PiglinAi::hasCrossbow, BackUpIfTooClose.create(5, 0.75F)),
SetWalkTargetFromAttackTargetIfTargetOutOfReach.create(1.0F),
MeleeAttack.create(20),
Expand All @@ -19,7 +19,7 @@
+ ImmutableList.<net.minecraft.world.entity.ai.behavior.BehaviorControl<? super Piglin>>of(
avoidRepellent(),
SetEntityLookTarget.create(PiglinAi::isPlayerHoldingLovedItem, 14.0F),
StartAttacking.<Piglin>create(AbstractPiglin::isAdult, PiglinAi::findNearestValidAttackTarget),
StartAttacking.<Piglin>create((p_375917_, p_375918_) -> p_375918_.isAdult(), PiglinAi::findNearestValidAttackTarget),
- BehaviorBuilder.triggerIf(p_34804_ -> !p_34804_.isDancing(), GoToTargetLocation.create(MemoryModuleType.CELEBRATE_LOCATION, 2, 1.0F)),
- BehaviorBuilder.triggerIf(Piglin::isDancing, GoToTargetLocation.create(MemoryModuleType.CELEBRATE_LOCATION, 4, 0.6F)),
- new RunOne<LivingEntity>(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
+++ b/net/minecraft/world/entity/monster/piglin/StartHuntingHoglin.java
@@ -21,14 +21,14 @@
p_259791_,
(p_259255_, p_260214_, p_259562_, p_259156_) -> (p_259918_, p_259191_, p_259772_) -> {
if (!p_259191_.isBaby()
(p_259255_, p_260214_, p_259562_, p_259156_) -> (p_375937_, p_375938_, p_375939_) -> {
if (!p_375938_.isBaby()
- && !p_259791_.<List>tryGet(p_259156_)
+ && !p_259791_.tryGet(p_259156_)
.map(p_259958_ -> p_259958_.stream().anyMatch(StartHuntingHoglin::hasHuntedRecently))
.isPresent()) {
Hoglin hoglin = p_259791_.get(p_259255_);
PiglinAi.setAngerTarget(p_259191_, hoglin);
PiglinAi.dontKillAnyMoreHoglinsForAWhile(p_259191_);
PiglinAi.broadcastAngerTarget(p_259191_, hoglin);
PiglinAi.setAngerTarget(p_375937_, p_375938_, hoglin);
PiglinAi.dontKillAnyMoreHoglinsForAWhile(p_375938_);
PiglinAi.broadcastAngerTarget(p_375937_, p_375938_, hoglin);
- p_259791_.<List>tryGet(p_259156_).ifPresent(p_259760_ -> p_259760_.forEach(PiglinAi::dontKillAnyMoreHoglinsForAWhile));
+ p_259791_.tryGet(p_259156_).ifPresent(p_259760_ -> p_259760_.forEach(PiglinAi::dontKillAnyMoreHoglinsForAWhile));
return true;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- a/net/minecraft/world/entity/projectile/AbstractArrow.java
+++ b/net/minecraft/world/entity/projectile/AbstractArrow.java
@@ -577,9 +577,9 @@
@@ -575,9 +575,9 @@
super.setOwner(p_36770_);

this.pickup = switch (p_36770_) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- a/net/minecraft/world/level/Explosion.java
+++ b/net/minecraft/world/level/Explosion.java
@@ -16,10 +16,10 @@
@@ -17,10 +17,10 @@
@Nullable
static LivingEntity getIndirectSourceEntity(@Nullable Entity p_363745_) {
return switch (p_363745_) {
Expand Down

0 comments on commit 4fbbc92

Please sign in to comment.