[BUG] Inventory Swap Armor Trim
KhrysAK47 opened this issue · 5 comments
What happened?
I am using:
on inventory click:
event-inventoryaction is swap with cursor
But it seems that add armor trim using lapis_material with eye_pattern to armor trim of event-slot
is doing nothing, no errors and it works if using it through add armor trim using lapis_material with eye_pattern to armor trim of player's tool
and not through the inventory click.
I have debugged and the event-inventoryaction is working as I have another action running just fine from it.
Steps to reproduce
- https://pastebin.com/6TyuycwP
- Try to do it with any armor piece
Expected behavior
It should apply the trim to the event-slot, like it does if using player's tool.
SkBee Version
3.2.1
Server Version
Paper 1.20.4 as server version, using Vanilla 1.20.4 as game version
SkBee Info
[17:11:37 INFO]: --- [SkBee Loading Info] ---
[17:11:37 INFO]: - [NBTAPI] Found Spigot: v1_20_R3! Trying to find NMS support
[17:11:37 INFO]: - [NBTAPI] NMS support 'MC1_20_R3' loaded!
[17:11:37 INFO]: - NBT Elements successfully loaded
[17:11:37 INFO]: - Text Component Elements successfully loaded
[17:11:37 INFO]: - Advancement Elements successfully loaded
[17:11:37 INFO]: - BossBar Elements successfully loaded
[17:11:37 INFO]: - Bound Elements successfully loaded
[17:11:37 INFO]: - Display Entity elements successfully loaded
[17:11:37 INFO]: - Fishing elements successfully loaded
[17:11:37 INFO]: - Game Event Elements successfully loaded
[17:11:37 INFO]: - Particle Elements successfully loaded
[17:11:37 INFO]: - RayTrace elements successfully loaded
[17:11:37 INFO]: - Recipe Elements successfully loaded
[17:11:37 INFO]: - Scoreboard Elements successfully loaded
[17:11:37 INFO]: - Scoreboard Objective Elements successfully loaded
[17:11:37 INFO]: - Statistic Elements successfully loaded
[17:11:37 INFO]: - Structure Elements successfully loaded
[17:11:37 INFO]: - Minecraft Tag elements successfully loaded
[17:11:37 INFO]: - Team Elements successfully loaded
[17:11:37 INFO]: - Tick Manager elements successfully loaded
[17:11:37 INFO]: - Villager Elements successfully loaded
[17:11:37 INFO]: - Virtual Furnace Elements disabled via config
[17:11:37 INFO]: - World Border Elements successfully loaded
[17:11:37 INFO]: - World Creator Elements successfully loaded
[17:11:37 INFO]: --- [Server Info] ---
[17:11:37 INFO]: Server Version: git-Paper-435 (MC: 1.20.4)
[17:11:37 INFO]: Skript Version: 2.8.2
[17:11:37 INFO]: Skript Addons:
[17:11:37 INFO]: SkBee Version: 3.2.1
[17:11:37 INFO]: SkBee Website: https://github.com/ShaneBeee/SkBee
Additional Information
No response
"Try to do it with any armor piece"
Try what exactly?
You've provided no steps to test
"Try to do it with any armor piece" Try what exactly? You've provided no steps to test
Try to inventory swap on a slot that is not an armor slot, like inventory, the trim will not be applied if through inventoryswap event.
However, if we use something like this;
command /test:
trigger:
add armor trim using lapis_material with eye_pattern to armor trim of player's tool
Then it will work.
Even if it's not on a slot that can be trimmed, which is what the issue appears to be?
I did a test with this:
on inventory click:
event-inventoryaction is swap with cursor
set {_i} to event-slot
add armor trim using lapis_material with eye_pattern to armor trim of {_i}
set event-slot to {_i}
It worked.
I dunno why but Skript is really weird with Slots, and personally I wouldn't rely on them.
I took a peak at the code in SkBee, added some debugs in SkBee and the code is running correctly, I think its just the whole slot situation in Skript is janky.
Closing as there's not much I can do in SkBee to fix Skript's short comings.