Add the files I forget adding
This commit is contained in:
@ -319,7 +319,7 @@ func handleSoundEffect(c *Client, p pk.Packet) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if c.Events.SoundPlay != nil {
|
if c.Events.SoundPlay != nil {
|
||||||
if soundName, ok := data.GetSoundNameByID(data.SoundID(s.Sound)); ok {
|
if soundName, ok := soundid.GetSoundNameByID(soundid.SoundID(s.Sound)); ok {
|
||||||
return c.Events.SoundPlay(
|
return c.Events.SoundPlay(
|
||||||
soundName, int(s.Category),
|
soundName, int(s.Category),
|
||||||
float64(s.X)/8, float64(s.Y)/8, float64(s.Z)/8,
|
float64(s.X)/8, float64(s.Y)/8, float64(s.Z)/8,
|
||||||
|
170
data/packetid/packetid.go
Normal file
170
data/packetid/packetid.go
Normal file
@ -0,0 +1,170 @@
|
|||||||
|
// This file is automatically generated by gen_packetIDs.go. DO NOT EDIT.
|
||||||
|
|
||||||
|
package packetid
|
||||||
|
|
||||||
|
// Valid PktID values.
|
||||||
|
const (
|
||||||
|
// Clientbound packets for connections in the login state.
|
||||||
|
Compress = 0x03
|
||||||
|
Disconnect = 0x00
|
||||||
|
EncryptionBeginClientbound = 0x01
|
||||||
|
LoginPluginRequest = 0x04
|
||||||
|
Success = 0x02
|
||||||
|
|
||||||
|
// Serverbound packets for connections in the login state
|
||||||
|
EncryptionBeginServerbound = 0x01
|
||||||
|
LoginPluginResponse = 0x02
|
||||||
|
LoginStart = 0x00
|
||||||
|
|
||||||
|
// Clientbound packets for connections in the play state.
|
||||||
|
AbilitiesClientbound = 0x30
|
||||||
|
AcknowledgePlayerDigging = 0x07
|
||||||
|
Advancements = 0x57
|
||||||
|
Animation = 0x05
|
||||||
|
AttachEntity = 0x45
|
||||||
|
BlockAction = 0x0a
|
||||||
|
BlockBreakAnimation = 0x08
|
||||||
|
BlockChange = 0x0b
|
||||||
|
BossBar = 0x0c
|
||||||
|
Camera = 0x3e
|
||||||
|
ChatClientbound = 0x0e
|
||||||
|
CloseWindowClientbound = 0x12
|
||||||
|
Collect = 0x55
|
||||||
|
CombatEvent = 0x31
|
||||||
|
CraftProgressBar = 0x14
|
||||||
|
CraftRecipeResponse = 0x2f
|
||||||
|
CustomPayloadClientbound = 0x17
|
||||||
|
DeclareCommands = 0x10
|
||||||
|
DeclareRecipes = 0x5a
|
||||||
|
Difficulty = 0x0d
|
||||||
|
Entity = 0x2a
|
||||||
|
EntityDestroy = 0x36
|
||||||
|
EntityEffect = 0x59
|
||||||
|
EntityEquipment = 0x47
|
||||||
|
EntityHeadRotation = 0x3a
|
||||||
|
EntityLook = 0x29
|
||||||
|
EntityMetadata = 0x44
|
||||||
|
EntityMoveLook = 0x28
|
||||||
|
EntitySoundEffect = 0x50
|
||||||
|
EntityStatus = 0x1a
|
||||||
|
EntityTeleport = 0x56
|
||||||
|
EntityUpdateAttributes = 0x58
|
||||||
|
EntityVelocity = 0x46
|
||||||
|
Experience = 0x48
|
||||||
|
Explosion = 0x1b
|
||||||
|
FacePlayer = 0x33
|
||||||
|
GameStateChange = 0x1d
|
||||||
|
HeldItemSlotClientbound = 0x3f
|
||||||
|
KeepAliveClientbound = 0x1f
|
||||||
|
KickDisconnect = 0x19
|
||||||
|
Login = 0x24
|
||||||
|
Map = 0x25
|
||||||
|
MapChunk = 0x20
|
||||||
|
MultiBlockChange = 0x3b
|
||||||
|
NamedEntitySpawn = 0x04
|
||||||
|
NamedSoundEffect = 0x18
|
||||||
|
NbtQueryResponse = 0x54
|
||||||
|
OpenBook = 0x2c
|
||||||
|
OpenHorseWindow = 0x1e
|
||||||
|
OpenSignEntity = 0x2e
|
||||||
|
OpenWindow = 0x2d
|
||||||
|
PlayerInfo = 0x32
|
||||||
|
PlayerlistHeader = 0x53
|
||||||
|
PositionClientbound = 0x34
|
||||||
|
RelEntityMove = 0x27
|
||||||
|
RemoveEntityEffect = 0x37
|
||||||
|
ResourcePackSend = 0x38
|
||||||
|
Respawn = 0x39
|
||||||
|
ScoreboardDisplayObjective = 0x43
|
||||||
|
ScoreboardObjective = 0x4a
|
||||||
|
ScoreboardScore = 0x4d
|
||||||
|
SelectAdvancementTab = 0x3c
|
||||||
|
SetCooldown = 0x16
|
||||||
|
SetPassengers = 0x4b
|
||||||
|
SetSlot = 0x15
|
||||||
|
SoundEffect = 0x51
|
||||||
|
SpawnEntity = 0x00
|
||||||
|
SpawnEntityExperienceOrb = 0x01
|
||||||
|
SpawnEntityLiving = 0x02
|
||||||
|
SpawnEntityPainting = 0x03
|
||||||
|
SpawnPosition = 0x42
|
||||||
|
Statistics = 0x06
|
||||||
|
StopSound = 0x52
|
||||||
|
TabCompleteClientbound = 0x0f
|
||||||
|
Tags = 0x5b
|
||||||
|
Teams = 0x4c
|
||||||
|
TileEntityData = 0x09
|
||||||
|
Title = 0x4f
|
||||||
|
TradeList = 0x26
|
||||||
|
TransactionClientbound = 0x11
|
||||||
|
UnloadChunk = 0x1c
|
||||||
|
UnlockRecipes = 0x35
|
||||||
|
UpdateHealth = 0x49
|
||||||
|
UpdateLight = 0x23
|
||||||
|
UpdateTime = 0x4e
|
||||||
|
UpdateViewDistance = 0x41
|
||||||
|
UpdateViewPosition = 0x40
|
||||||
|
VehicleMoveClientbound = 0x2b
|
||||||
|
WindowItems = 0x13
|
||||||
|
WorldBorder = 0x3d
|
||||||
|
WorldEvent = 0x21
|
||||||
|
WorldParticles = 0x22
|
||||||
|
|
||||||
|
// Serverbound packets for connections in the play state.
|
||||||
|
AbilitiesServerbound = 0x1a
|
||||||
|
AdvancementTab = 0x22
|
||||||
|
ArmAnimation = 0x2c
|
||||||
|
BlockDig = 0x1b
|
||||||
|
BlockPlace = 0x2e
|
||||||
|
ChatServerbound = 0x03
|
||||||
|
ClientCommand = 0x04
|
||||||
|
CloseWindowServerbound = 0x0a
|
||||||
|
CraftRecipeRequest = 0x19
|
||||||
|
CustomPayloadServerbound = 0x0b
|
||||||
|
DisplayedRecipe = 0x1e
|
||||||
|
EditBook = 0x0c
|
||||||
|
EnchantItem = 0x08
|
||||||
|
EntityAction = 0x1c
|
||||||
|
Flying = 0x15
|
||||||
|
GenerateStructure = 0x0f
|
||||||
|
HeldItemSlotServerbound = 0x25
|
||||||
|
KeepAliveServerbound = 0x10
|
||||||
|
LockDifficulty = 0x11
|
||||||
|
Look = 0x14
|
||||||
|
NameItem = 0x20
|
||||||
|
PickItem = 0x18
|
||||||
|
PositionLook = 0x13
|
||||||
|
PositionServerbound = 0x12
|
||||||
|
QueryBlockNbt = 0x01
|
||||||
|
QueryEntityNbt = 0x0d
|
||||||
|
RecipeBook = 0x1f
|
||||||
|
ResourcePackReceive = 0x21
|
||||||
|
SelectTrade = 0x23
|
||||||
|
SetBeaconEffect = 0x24
|
||||||
|
SetCreativeSlot = 0x28
|
||||||
|
SetDifficulty = 0x02
|
||||||
|
Settings = 0x05
|
||||||
|
Spectate = 0x2d
|
||||||
|
SteerBoat = 0x17
|
||||||
|
SteerVehicle = 0x1d
|
||||||
|
TabCompleteServerbound = 0x06
|
||||||
|
TeleportConfirm = 0x00
|
||||||
|
TransactionServerbound = 0x07
|
||||||
|
UpdateCommandBlock = 0x26
|
||||||
|
UpdateCommandBlockMinecart = 0x27
|
||||||
|
UpdateJigsawBlock = 0x29
|
||||||
|
UpdateSign = 0x2b
|
||||||
|
UpdateStructureBlock = 0x2a
|
||||||
|
UseEntity = 0x0e
|
||||||
|
UseItem = 0x2f
|
||||||
|
VehicleMoveServerbound = 0x16
|
||||||
|
WindowClick = 0x09
|
||||||
|
|
||||||
|
// Clientbound packets used to respond to ping/status requests.
|
||||||
|
PingClientbound = 0x01
|
||||||
|
ServerInfo = 0x00
|
||||||
|
|
||||||
|
// Serverbound packets used to ping or read server status.
|
||||||
|
PingServerbound = 0x01
|
||||||
|
PingStart = 0x00
|
||||||
|
)
|
@ -1,5 +1,4 @@
|
|||||||
//+build ignore
|
//+build ignore
|
||||||
//go:generate go run $GOFILE
|
|
||||||
|
|
||||||
// gen_soundIDs.go generates the enumeration of sound IDs.
|
// gen_soundIDs.go generates the enumeration of sound IDs.
|
||||||
package main
|
package main
|
||||||
@ -21,6 +20,7 @@ type sound struct {
|
|||||||
Name string
|
Name string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//go:generate go run $GOFILE
|
||||||
func main() {
|
func main() {
|
||||||
sounds, err := downloadSoundInfo()
|
sounds, err := downloadSoundInfo()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -28,7 +28,7 @@ func main() {
|
|||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
f, err := os.Create("soundIDs.go")
|
f, err := os.Create("soundid.go")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Fprintf(os.Stderr, "Error: %v\n", err)
|
fmt.Fprintf(os.Stderr, "Error: %v\n", err)
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
@ -37,11 +37,9 @@ func main() {
|
|||||||
|
|
||||||
fmt.Fprintln(f, "// Code generated by gen_soundIDs.go. DO NOT EDIT.")
|
fmt.Fprintln(f, "// Code generated by gen_soundIDs.go. DO NOT EDIT.")
|
||||||
fmt.Fprintln(f)
|
fmt.Fprintln(f)
|
||||||
fmt.Fprintln(f, "package data")
|
fmt.Fprintln(f, "package soundid")
|
||||||
fmt.Fprintln(f)
|
fmt.Fprintln(f)
|
||||||
|
|
||||||
fmt.Fprintln(f, "//go:generate go run gen_soundIDs.go")
|
|
||||||
fmt.Fprintln(f)
|
|
||||||
fmt.Fprintln(f, "// SoundID represents a sound ID used in the minecraft protocol.")
|
fmt.Fprintln(f, "// SoundID represents a sound ID used in the minecraft protocol.")
|
||||||
fmt.Fprintln(f, "type SoundID int32")
|
fmt.Fprintln(f, "type SoundID int32")
|
||||||
fmt.Fprintln(f)
|
fmt.Fprintln(f)
|
||||||
|
1008
data/soundid/soundid.go
Normal file
1008
data/soundid/soundid.go
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user