First support 1.21.130

This commit is contained in:
AkmalFairuz
2025-12-10 23:05:46 +07:00
parent 2b6358ea51
commit 65693b1e85
22 changed files with 10348 additions and 40 deletions

View File

@@ -13,9 +13,6 @@ type ResourcePackStack struct {
// join the server. If set to true, the client gets the option to either download the resource packs and
// join, or quit entirely. Behaviour packs never have to be downloaded.
TexturePackRequired bool
// BehaviourPack is a list of behaviour packs that the client needs to download before joining the server.
// All of these behaviour packs will be applied together, and the order does not necessarily matter.
BehaviourPacks []protocol.StackResourcePack
// TexturePacks is a list of texture packs that the client needs to download before joining the server.
// The order of these texture packs specifies the order that they are applied in on the client side. The
// first in the list will be applied first.
@@ -41,7 +38,10 @@ func (*ResourcePackStack) ID() uint32 {
func (pk *ResourcePackStack) Marshal(io protocol.IO) {
io.Bool(&pk.TexturePackRequired)
protocol.Slice(io, &pk.BehaviourPacks)
if proto.IsProtoLT(io, proto.ID898) {
var emptyResourcePack []protocol.StackResourcePack
protocol.Slice(io, &emptyResourcePack)
}
protocol.Slice(io, &pk.TexturePacks)
io.String(&pk.BaseGameVersion)
protocol.SliceUint32Length(io, &pk.Experiments)