LeavesMC / Leaves

Fork of Paper aimed at repairing broken vanilla properties.
https://leavesmc.org
Other
325 stars 34 forks source link

Friendly Bytebuf API #205

Closed Lumine1909 closed 2 months ago

Lumine1909 commented 2 months ago

A possibility of https://github.com/LeavesMC/Leaves/issues/194 (only partially completed)

Example plugin: https://github.com/Lumine1909/BytebufAPIExample/tree/master

TODO: More writable item for details, see "top.leavesmc.leaves.packet.bytebuf.WrappedBytebuf" and "net.minecraft.network.FriendlyByteBuf"

Lumine1909 commented 2 months ago

我们能否绕过包装的创建,而直接允许new 我认为这可以使使用体验成倍的增加

Like this new version? The experience doesn’t seem to have changed much (see example), but the implementation becomes stupid. This implementation is imitate from ItemStack, CraftItemStack and nmsItemStack.

s-yh-china commented 2 months ago

我不是很拿得准 @MC-XiaoHei @Bluemangoo

Bluemangoo commented 2 months ago

i have no idea😕

Lumine1909 commented 2 months ago

在这个模式下,我怀疑性能可能出现一些问题 要不还是改回去(被打

我倾向于改回去 不知道小黑他们什么意见(

MC-XiaoHei commented 2 months ago

在这个模式下,我怀疑性能可能出现一些问题 要不还是改回去(被打

改啥?我觉得性能优先吧,