-
-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
272313d
commit f10711f
Showing
22 changed files
with
348 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
minecraft/protocol/packet/compressed_biome_definition_list.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package packet | ||
|
||
import ( | ||
"github.com/sandertv/gophertunnel/minecraft/protocol" | ||
) | ||
|
||
// CompressedBiomeDefinitionList is sent by the server to send a list of biomes to the client. The contents of this packet | ||
// are very large, even after being compressed. This packet is only required when using client-side chunk generation. | ||
type CompressedBiomeDefinitionList struct { | ||
// Biomes is a map of biomes with their identifier as key, and the biome data as value. The biome data contains many | ||
// different fields such as climate, surface materials and generation rules etc. | ||
Biomes map[string]any | ||
} | ||
|
||
// ID ... | ||
func (*CompressedBiomeDefinitionList) ID() uint32 { | ||
return IDCompressedBiomeDefinitionList | ||
} | ||
|
||
func (pk *CompressedBiomeDefinitionList) Marshal(io protocol.IO) { | ||
io.CompressedBiomeDefinitions(&pk.Biomes) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package packet | ||
|
||
import ( | ||
"github.com/sandertv/gophertunnel/minecraft/protocol" | ||
) | ||
|
||
// OpenSign is sent by the server to open a sign for editing. As of 1.19.80, the player can interact with a sign to edit | ||
// the text on both sides instead of just the front. | ||
type OpenSign struct { | ||
// Position is the position of the sign to edit. The client uses this position to get the data of the sign, including | ||
// the existing text and formatting etc. | ||
Position protocol.BlockPos | ||
// FrontSide dictates whether the front side of the sign should be opened for editing. If false, the back side is | ||
// assumed to be edited. | ||
FrontSide bool | ||
} | ||
|
||
// ID ... | ||
func (*OpenSign) ID() uint32 { | ||
return IDOpenSign | ||
} | ||
|
||
func (pk *OpenSign) Marshal(io protocol.IO) { | ||
io.UBlockPos(&pk.Position) | ||
io.Bool(&pk.FrontSide) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package packet | ||
|
||
import ( | ||
"github.com/sandertv/gophertunnel/minecraft/protocol" | ||
) | ||
|
||
// TrimData is sent by the server to the client when they first join the server. It contains a list of all the patterns | ||
// and materials that can be applied via armour trims. | ||
type TrimData struct { | ||
// Patterns is a list of patterns that can be applied to armour. Each pattern has its own style and texture that is | ||
// defined through resource packs. | ||
Patterns []protocol.TrimPattern | ||
// Materials is a list of materials that can be applied to armour. These are mostly different ores that have different | ||
// colours for more customization. | ||
Materials []protocol.TrimMaterial | ||
} | ||
|
||
// ID ... | ||
func (*TrimData) ID() uint32 { | ||
return IDTrimData | ||
} | ||
|
||
func (pk *TrimData) Marshal(io protocol.IO) { | ||
protocol.Slice(io, &pk.Patterns) | ||
protocol.Slice(io, &pk.Materials) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.