Fix item shaking

This commit is contained in:
AkmalFairuz
2025-03-29 07:42:24 +07:00
parent aa1088d3da
commit 6f8d6e922d
2 changed files with 4 additions and 4 deletions

View File

@@ -1,4 +1,4 @@
[Connection] [Connection]
LocalAddress = "0.0.0.0:19135" LocalAddress = "0.0.0.0:19132"
RemoteAddress = "127.0.0.1:19132" RemoteAddress = "play.venitymc.com:19132"

View File

@@ -103,7 +103,7 @@ func (t *DefaultItemTranslator) DowngradeItemType(input protocol.ItemType) proto
} }
func (t *DefaultItemTranslator) DowngradeItemStack(input protocol.ItemStack) protocol.ItemStack { func (t *DefaultItemTranslator) DowngradeItemStack(input protocol.ItemStack) protocol.ItemStack {
if t.latest == t.mapping { if t.latest == t.mapping || input.NetworkID == 0 {
return input return input
} }
input.ItemType = t.DowngradeItemType(input.ItemType) input.ItemType = t.DowngradeItemType(input.ItemType)
@@ -221,7 +221,7 @@ func (t *DefaultItemTranslator) UpgradeItemType(input protocol.ItemType) protoco
} }
func (t *DefaultItemTranslator) UpgradeItemStack(input protocol.ItemStack) protocol.ItemStack { func (t *DefaultItemTranslator) UpgradeItemStack(input protocol.ItemStack) protocol.ItemStack {
if t.latest == t.mapping { if t.latest == t.mapping || input.NetworkID == 0 {
return input return input
} }
input.ItemType = t.UpgradeItemType(input.ItemType) input.ItemType = t.UpgradeItemType(input.ItemType)