From 4199fa503b859565c0105373bdb87efb36a8eae1 Mon Sep 17 00:00:00 2001 From: TwistedAsylumMC Date: Wed, 28 Aug 2024 14:05:27 +0100 Subject: [PATCH 1/2] packet/event.go: Fix marshaling for Event packet --- minecraft/protocol/events.go | 6 +++--- minecraft/protocol/packet/event.go | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/minecraft/protocol/events.go b/minecraft/protocol/events.go index 7830e7fc..16537a98 100644 --- a/minecraft/protocol/events.go +++ b/minecraft/protocol/events.go @@ -587,7 +587,7 @@ type ItemUsedEvent struct { // Marshal ... func (i *ItemUsedEvent) Marshal(r IO) { r.Int16(&i.ItemID) - r.Varint32(&i.ItemAux) - r.Varint32(&i.UseMethod) - r.Varint32(&i.UseCount) + r.Int32(&i.ItemAux) + r.Int32(&i.UseMethod) + r.Int32(&i.UseCount) } diff --git a/minecraft/protocol/packet/event.go b/minecraft/protocol/packet/event.go index 3bd45898..9f39d4e9 100644 --- a/minecraft/protocol/packet/event.go +++ b/minecraft/protocol/packet/event.go @@ -9,7 +9,7 @@ import ( type Event struct { // EntityRuntimeID is the runtime ID of the player. The runtime ID is unique for each world session, and // entities are generally identified in packets using this runtime ID. - EntityRuntimeID uint64 + EntityRuntimeID int64 // UsePlayerID ... // TODO: Figure out what UsePlayerID is for. UsePlayerID byte @@ -23,7 +23,7 @@ func (*Event) ID() uint32 { } func (pk *Event) Marshal(io protocol.IO) { - io.Varuint64(&pk.EntityRuntimeID) + io.Varint64(&pk.EntityRuntimeID) io.EventType(&pk.Event) io.Uint8(&pk.UsePlayerID) pk.Event.Marshal(io) From 8954c4aef26882c75d98a680797b9aaf5c28d5fb Mon Sep 17 00:00:00 2001 From: Sandertv Date: Sun, 1 Sep 2024 14:02:13 +0200 Subject: [PATCH 2/2] README.md: Removed Sponsors section. --- README.md | 5 ----- 1 file changed, 5 deletions(-) diff --git a/README.md b/README.md index c241757e..855a2673 100644 --- a/README.md +++ b/README.md @@ -19,11 +19,6 @@ Additionally, a MITM proxy is implemented in the [main.go file](https://github.c Gophertunnel supports only one version at a time (generally the latest official Minecraft release), but multiple protocols can be supported with the API. Generally, a new minor version is tagged when gophertunnel supports a new Minecraft version that was not previously supported. -## Sponsors -[![Become Patron](https://img.shields.io/badge/dynamic/json?logo=patreon&style=for-the-badge&color=%23e85b46&label=Patreon&query=data.attributes.patron_count&suffix=%20patrons&url=https%3A%2F%2Fwww.patreon.com%2Fapi%2Fcampaigns%2F2832539)](https://patreon.com/sandertv) - -Gophertunnel is sponsored by all my gopher sponsors. A special thanks goes to the Very Important Gophers! - ## Contact [![Chat on Discord](https://img.shields.io/badge/Chat-On%20Discord-738BD7.svg?style=for-the-badge)](https://discord.com/invite/U4kFWHhTNR)