Update patches to latest 1.21.4 #1

Merged
Chaoscaot merged 242 commits from update/1.21.4 into main 2025-04-23 22:27:11 +02:00
Showing only changes of commit cd9d6d6998 - Show all commits

View File

@@ -5,6 +5,7 @@ import com.google.common.base.Preconditions;
import com.google.common.base.Predicates;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Lists;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.UUID;
@@ -243,7 +244,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
Preconditions.checkArgument(location != null, "location cannot be null");
location.checkFinite();
// Paper start - Teleport passenger API
Set<io.papermc.paper.entity.TeleportFlag> flagSet = Set.of(flags);
Set<io.papermc.paper.entity.TeleportFlag> flagSet = new HashSet<>(List.of(flags)); // Wrap into list while multiple old flags link to the same new one
boolean dismount = !flagSet.contains(io.papermc.paper.entity.TeleportFlag.EntityState.RETAIN_VEHICLE);
boolean retainPassengers = flagSet.contains(io.papermc.paper.entity.TeleportFlag.EntityState.RETAIN_PASSENGERS);
// Don't allow teleporting between worlds while keeping passengers