ClayCoffee / ClayTech

An addon for slimefun.
GNU Affero General Public License v3.0
17 stars 15 forks source link

[BUG] Use of Rocket Launcher breaks item #91

Closed mrcoffee1026 closed 3 years ago

mrcoffee1026 commented 3 years ago

Describe 描述 Upon use of Rocket Launcher a named Iron Block is returned to your inventory INSTEAD of a Rocket Launcher, making this a single time use item.

To Reproduce 如何复现 Use Rocket Launcher to launch yourself to a planet, attempt to use it a second time.

Running Environment 运行环境

[09:58:04 INFO]: This Server uses the following setup of Slimefun: [09:58:04 INFO]: Paper v1_16_R2 [09:58:04 INFO]: CS-CoreLib vDEV - 91 (git e42a05d1) [09:58:04 INFO]: Slimefun vDEV - 734 (git 28dda7ca) [09:58:04 INFO]: Metrics build: #17 [09:58:04 INFO]: [09:58:04 INFO]: Installed Addons: (29) [09:58:04 INFO]: GlobalWarming vDEV - 4 (git bd8e730a) [09:58:04 INFO]: SlimyPowerSuits vDEV - 8 (git a93bd3ae) [09:58:04 INFO]: ExtraTools vDEV - 22 (git ea11f88b) [09:58:04 INFO]: FoxyMachines vDEV - 6 (git 25cf6098) [09:58:04 INFO]: SlimefunOreChunks vDEV - 9 (git 88dd72b0) [09:58:04 INFO]: SensibleToolbox vDEV - 30 (git df3c1fe5) [09:58:04 INFO]: ExtraGear vDEV - 12 (git 4570ea2c) [09:58:04 INFO]: MoreTools vDEV - 8 (git db8d8814) [09:58:04 INFO]: ClayTech v1.2.17 [09:58:04 INFO]: InfinityExpansion vDEV - 32 (git 4b3c9690) [09:58:04 INFO]: SFCalc vDEV - 12 (git b7835e8f) [09:58:04 INFO]: ElectricSpawners vDEV - 18 (git f9da206b) [09:58:04 INFO]: ExtraHeads vDEV - 17 (git 6c77b605) [09:58:04 INFO]: MobCapturer vDEV - 11 (git 4edf38dd) [09:58:04 INFO]: SlimyTreeTaps vDEV - 15 (git 205f8afc) [09:58:04 INFO]: PrivateStorage vDEV - 14 (git 98a31c90) [09:58:04 INFO]: TranscEndence vDEV - 20 (git b158f9b4) [09:58:04 INFO]: FluffyMachines vDEV - 35 (git 52b6fec3) [09:58:04 INFO]: CMI v8.7.9.3 [09:58:04 INFO]: ChestTerminal vDEV - 36 (git 7d68899b) [09:58:04 INFO]: DyedBackpacks vDEV - 9 (git c42435c1) [09:58:04 INFO]: SoundMuffler vDEV - 16 (git b5ec0098) [09:58:04 INFO]: EcoPower vDEV - 2 (git b0c0c875) [09:58:04 INFO]: HotbarPets vDEV - 31 (git 5909202f) [09:58:04 INFO]: SlimefunLuckyBlocks vDEV - 29 (git db79cb7c) [09:58:04 INFO]: ExoticGarden vDEV - 60 (git 2595001e) [09:58:04 INFO]: Barrels vDEV - 14 (git 1563de94) [09:58:04 INFO]: LiteXpansion vDEV - 94 (git 442a78ad) [09:58:04 INFO]: SoulJars vDEV - 17 (git 9eedba0f)

Screenshots 截图 Before use: rocketlaunch1

After use: rocketlaunch2

ClayCoffee commented 3 years ago

See p.getInventory().addItem(ClayTechItems.ROCKET_LAUNCHER);

ClayCoffee commented 3 years ago

I don't think it's a bug, after use, it will give the player a Rocket Launcher from the register ItemStack. It should be a Slimefun problem.

mrcoffee1026 commented 3 years ago

This is a bug with your addon. Using Slimefun directly and using the /sf give command would provide me with a working Rocket Launcher. If it were a Slimefun issue, every Rocket Launcher provided by Slimefun would be unuseable, as would any crafted Rocket Launcher. This issue exists only if you use the Rocket Launcher: the item that is returned to your inventory at that moment is NOT a Rocket Launcher, so is clearly not the same item "from the register ItemStack": you have a bug.

"Sounds a lot more like he is giving a non-SlimefunItemStack simply. Also yeeeeeeeeep He stores all Items as regular ItemStacks, not SlimefunItemStacks" - TheBusyBiscuit

ClayCoffee commented 3 years ago

Download the latest build, please. Fixed it.

mrcoffee1026 commented 3 years ago

yes this does fix it, thank you!