You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To reduce meaningless bandwidth overheads caused by #42 (with PDC), PDC Filter is set.
Patch
By redefine.
At FriendlyByteBuf (Paper, called PacketDataSerializer in spigot)
publicFriendlyByteBufwriteItem(ItemStackstack) {
if (stack.isEmpty() || stack.getItem() == null) { // CraftBukkit - NPE fix itemstack.getItem()this.writeBoolean(false);
} else {
this.writeBoolean(true);
Itemitem = stack.getItem();
this.writeVarInt(Item.getId(item));
this.writeByte(stack.getCount());
CompoundTagnbttagcompound = null;
if (item.canBeDepleted() || item.shouldOverrideMultiplayerNbt()) {
// Spigot start - filterstack = stack.copy();
// CraftItemStack.setItemMeta(stack, CraftItemStack.getItemMeta(stack)); // Paper - This is no longer needed due to NBT being supported// Spigot endnbttagcompound = stack.getTag();
// Paper startif (nbttagcompound != null && nbttagcompound.contains("SkullOwner", 10)) {
CompoundTagowner = nbttagcompound.getCompound("SkullOwner");
if (owner.hasUUID("Id")) {
nbttagcompound.putUUID("SkullOwnerOrig", owner.getUUID("Id"));
net.minecraft.world.level.block.entity.SkullBlockEntity.sanitizeUUID(owner);
}
}
// Paper end
}
this.writeNbt(nbttagcompound);
}
returnthis;
}
Inserting hooks before this.writeNbt(nbttagcompound) would work, however it is leading to full of asm codes.
Tasks
So here're our tasks:
Find CompoundTag in obfuscated environments. (including 1.18+, treat them as obfuscated)
Find FriendlyByteBuf / PacketDataSerializer in obfuscated environments.
Determine injector solution. Predefine or redefine or server patching? I prefer redefine with mixin but there're no projects has implemented mixin injection for bukkit ( or poor API )
Other
This feature is an option and disabled by default.
The text was updated successfully, but these errors were encountered:
We will need to handle creative item actions due to minecraft feature. Players in creative mode sends itemstack data from their client, which overrides server-side item even though it has pdc or sth else.
To reduce meaningless bandwidth overheads caused by #42 (with PDC), PDC Filter is set.
Patch
By redefine.
At
FriendlyByteBuf
(Paper, calledPacketDataSerializer
in spigot)Inserting hooks before
this.writeNbt(nbttagcompound)
would work, however it is leading to full of asm codes.Tasks
So here're our tasks:
Other
This feature is an option and disabled by default.
The text was updated successfully, but these errors were encountered: