Slimefun / Slimefun4

Slimefun 4 - A unique Spigot/Paper plugin that looks and feels like a modpack. We've been giving you backpacks, jetpacks, reactors and much more since 2013.
GNU General Public License v3.0
958 stars 547 forks source link

replace isitemsimilar #4120

Open J3fftw1 opened 7 months ago

J3fftw1 commented 7 months ago

Description

This PR replaces isItemSImilar with a new method for now called compareItem()

Proposed changes

Replace isItemSImilar with a better check

Related Issues (if applicable)

Checklist

ToDo

github-actions[bot] commented 7 months ago

Your Pull Request was automatically labelled as: "🧹 Chores" Thank you for contributing to this project! ❤️

github-actions[bot] commented 7 months ago

Slimefun preview build

A Slimefun preview build is available for testing! Commit: 9f01d73f

https://preview-builds.walshy.dev/download/Slimefun/4120/9f01d73f

Note: This is not a supported build and is only here for the purposes of testing. Do not run this on a live server and do not report bugs anywhere but this PR!

WalshyDev commented 7 months ago

Testing required

This will need just general Slimefun testing. Some areas to specifically cover:

WalshyDev commented 6 months ago

Boomer:

I even added teleporting, basic dust farming, tested a few nodes going thru cargo, and everything seems to work as expected. backpacks are fine. no issues on ancient altar. all i tested with though was core slimefun. no addons or outside plugins. Added multiple power generators, geo mining, teleporting with the gps pad, and everything seems to be running as expected.

the environment was 1.20.4, paper version 405. probably need to update that but, eh for now

ybw0014 commented 6 months ago

Type check is the first, so items with changed item type (e.g. explosive pickaxe is diamond pickaxe, and using the improvement forge from FoxyMachines to upgrade it to netherite) will not match. maybe we can have some sort of whitelist for tools and weapons. and other type mismatches will return immediately.

WalshyDev commented 6 months ago

An allowlist just leads to unmaintable again annoyingly

I'd say just do this when we know it isn't an Slimefun item but that will slow down a bunch...