Refactor item mapping to use dragonflyMapping parameter and remove deleteDebugStick references

This commit is contained in:
AkmalFairuz
2025-07-02 21:53:13 +07:00
parent 0abc5c3694
commit 9b6ddc51fd
16 changed files with 86 additions and 76 deletions

View File

@@ -4,22 +4,21 @@ import (
"github.com/sandertv/gophertunnel/minecraft"
)
// All returns a slice of all legacy protocol versions that are supported. deleteDebugStick
// must be set to true if you're using Dragonfly. deleteDebugStick must be set to false if you're using
// PocketMine, Nukkit, or other server software that includes the debug stick in the item registry.
func All(deleteDebugStick bool) []minecraft.Protocol {
// All returns a slice of all legacy protocol versions that are supported. dragonflyMapping
// must be set to true if you're using Dragonfly.
func All(dragonflyMapping bool) []minecraft.Protocol {
return []minecraft.Protocol{
New800(deleteDebugStick),
New786(deleteDebugStick),
New776(deleteDebugStick),
New766(deleteDebugStick),
New748(deleteDebugStick),
New729(deleteDebugStick),
New712(deleteDebugStick),
New686(deleteDebugStick),
New685(deleteDebugStick),
New671(deleteDebugStick),
New662(deleteDebugStick),
New649(deleteDebugStick),
New800(dragonflyMapping),
New786(dragonflyMapping),
New776(dragonflyMapping),
New766(dragonflyMapping),
New748(dragonflyMapping),
New729(dragonflyMapping),
New712(dragonflyMapping),
New686(dragonflyMapping),
New685(dragonflyMapping),
New671(dragonflyMapping),
New662(dragonflyMapping),
New649(dragonflyMapping),
}
}