Update to Minecraft 1.21.2

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2024-10-23 02:15:00 +11:00
parent 2c4beb962b
commit d3a23f42c3
522 changed files with 8501 additions and 6477 deletions

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/world/entity/ai/sensing/TemptingSensor.java
+++ b/net/minecraft/world/entity/ai/sensing/TemptingSensor.java
@@ -18,6 +18,14 @@
@@ -19,6 +19,14 @@
import net.minecraft.world.entity.player.EntityHuman;
import net.minecraft.world.item.ItemStack;
@@ -14,17 +14,17 @@
+
public class TemptingSensor extends Sensor<EntityCreature> {
public static final int TEMPTATION_RANGE = 10;
@@ -30,7 +38,7 @@
private static final PathfinderTargetCondition TEMPT_TARGETING = PathfinderTargetCondition.forNonCombat().ignoreLineOfSight();
@@ -31,7 +39,7 @@
protected void doTick(WorldServer worldserver, EntityCreature entitycreature) {
BehaviorController<?> behaviorcontroller = entitycreature.getBrain();
PathfinderTargetCondition pathfindertargetcondition = TemptingSensor.TEMPT_TARGETING.copy().range((double) ((float) entitycreature.getAttributeValue(GenericAttributes.TEMPT_RANGE)));
- Stream stream = worldserver.players().stream().filter(IEntitySelector.NO_SPECTATORS).filter((entityplayer) -> {
+ Stream<net.minecraft.server.level.EntityPlayer> stream = worldserver.players().stream().filter(IEntitySelector.NO_SPECTATORS).filter((entityplayer) -> { // CraftBukkit - decompile error
return TemptingSensor.TEMPT_TARGETING.test(entitycreature, entityplayer);
}).filter((entityplayer) -> {
return entitycreature.closerThan(entityplayer, 10.0D);
@@ -44,7 +52,17 @@
return pathfindertargetcondition.test(worldserver, entitycreature, entityplayer);
}).filter(this::playerHoldingTemptation).filter((entityplayer) -> {
return !entitycreature.hasPassenger((Entity) entityplayer);
@@ -43,7 +51,17 @@
if (!list.isEmpty()) {
EntityHuman entityhuman = (EntityHuman) list.get(0);