1.21.6 dev
Co-authored-by: Bjarne Koll <git@lynxplay.dev> Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com> Co-authored-by: Jason Penilla <11360596+jpenilla@users.noreply.github.com> Co-authored-by: Lulu13022002 <41980282+Lulu13022002@users.noreply.github.com> Co-authored-by: Noah van der Aa <ndvdaa@gmail.com> Co-authored-by: Owen1212055 <23108066+Owen1212055@users.noreply.github.com> Co-authored-by: Spottedleaf <Spottedleaf@users.noreply.github.com>
This commit is contained in:
committed by
Nassim Jahnke
parent
39203a65e0
commit
a24f9b204c
@@ -30,7 +30,7 @@
|
||||
+ stack.getAllOfType(ConsumableListener.class).forEach(listener -> {
|
||||
+ listener.cancelUsingItem(player, stack, packets); // Paper - properly resend entities - collect packets for bundle
|
||||
+ });
|
||||
+ player.server.getPlayerList().sendActiveEffects(player, packets::add); // Paper - properly resend entities - collect packets for bundle
|
||||
+ player.getServer().getPlayerList().sendActiveEffects(player, packets::add); // Paper - properly resend entities - collect packets for bundle
|
||||
+ player.connection.send(new net.minecraft.network.protocol.game.ClientboundBundlePacket(packets));
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/item/component/CustomData.java
|
||||
+++ b/net/minecraft/world/item/component/CustomData.java
|
||||
@@ -33,7 +_,17 @@
|
||||
@@ -36,7 +_,17 @@
|
||||
private static final Logger LOGGER = LogUtils.getLogger();
|
||||
public static final CustomData EMPTY = new CustomData(new CompoundTag());
|
||||
private static final String TYPE_TAG = "id";
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/item/component/ResolvableProfile.java
|
||||
+++ b/net/minecraft/world/item/component/ResolvableProfile.java
|
||||
@@ -20,9 +_,10 @@
|
||||
@@ -21,9 +_,10 @@
|
||||
instance -> instance.group(
|
||||
ExtraCodecs.PLAYER_NAME.optionalFieldOf("name").forGetter(ResolvableProfile::name),
|
||||
UUIDUtil.CODEC.optionalFieldOf("id").forGetter(ResolvableProfile::id),
|
||||
@@ -12,12 +12,21 @@
|
||||
);
|
||||
public static final Codec<ResolvableProfile> CODEC = Codec.withAlternative(
|
||||
FULL_CODEC, ExtraCodecs.PLAYER_NAME, name -> new ResolvableProfile(Optional.of(name), Optional.empty(), new PropertyMap())
|
||||
@@ -49,7 +_,7 @@
|
||||
if (this.isResolved()) {
|
||||
@@ -53,7 +_,7 @@
|
||||
} else {
|
||||
Optional<GameProfile> optional;
|
||||
if (this.id.isPresent()) {
|
||||
- optional = SkullBlockEntity.fetchGameProfile(this.id.get()).getNow(null);
|
||||
+ optional = SkullBlockEntity.fetchGameProfile(this.id.get(), this.name.orElse(null)).getNow(null); // Paper - player profile events - pass name
|
||||
} else {
|
||||
optional = SkullBlockEntity.fetchGameProfile(this.name.orElseThrow()).getNow(null);
|
||||
}
|
||||
@@ -67,7 +_,7 @@
|
||||
return CompletableFuture.completedFuture(this);
|
||||
} else {
|
||||
- return this.id.isPresent() ? SkullBlockEntity.fetchGameProfile(this.id.get()).thenApply(optional -> {
|
||||
+ return this.id.isPresent() ? SkullBlockEntity.fetchGameProfile(this.id.get(), this.name.orElse(null)).thenApply(optional -> { // Paper - player profile events
|
||||
GameProfile gameProfile = optional.orElseGet(() -> new GameProfile(this.id.get(), this.name.orElse("")));
|
||||
return new ResolvableProfile(gameProfile);
|
||||
}) : SkullBlockEntity.fetchGameProfile(this.name.orElseThrow()).thenApply(optional -> {
|
||||
return this.id.isPresent()
|
||||
- ? SkullBlockEntity.fetchGameProfile(this.id.get()).thenApply(this::createProfile)
|
||||
+ ? SkullBlockEntity.fetchGameProfile(this.id.get(), this.name.orElse(null)).thenApply(this::createProfile) // Paper - player profile events - pass name
|
||||
: SkullBlockEntity.fetchGameProfile(this.name.orElseThrow()).thenApply(this::createProfile);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user