#is kubejs mistaking a texture for an item?

14 messages · Page 1 of 1 (latest)

primal tulip
#

So i have an odd issue. I have a custom item from kubejs, textured as an echo shard, that when right clicked works as intended HOWEVER when i right click with the vanilla echo shard item (not the custom kubejs one), it does player.tell('test') which shouldn't happen unless its the custom item.

After changing the item texture to apple, echo shards that existed before changing the texture still send player.tell('test') and newly made apples do this also.

Is this a known issue or am I doing something wrong and did my description of the issue make sense?

Included are all the files I have in my datapacks and script folders. Its 1.21.1 neoforge using rhino-2101.2.7-build.81 and kubejs-neoforge-2101.7.2-build.348 with no addons or other mods.

dark cedarBOT
#

Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!

gentle pierBOT
#

Paste version of server_void_teleporter_item.js, startup_Ship_Engine_and_Remote.js, datapack.zip from @primal tulip

primal tulip
gentle pierBOT
#

Gnome cannot help with that directly. Go to #1254790121807548437 and #1047320998199955458 for support, and open a ticket there

cobalt current
#

you've intrigued me, im gonna test it now

#

doesnt seem like it does that to me

#

it only does it when i use the item i created with your script

primal tulip
#

Im losing my mind. I literally did a clean install. Maybe I'll throw it on modrinth tomorrow and see if its different than curseforge. Or maybe it's something my computer is doing? Ill take a video tomorrow after work and show you too

warm swift
#

your rightclick event is global for all items, and the block where you check for remote_crystal only includes the player.teleportTo
The player.tell is outside of that block

Use ItemEvents.rightClicked('dimensions:remote_crystal', event => {}) to exclusively run your code for just the item you want, or include your player.tell within the if-block just above it

cobalt current
#

Oh wait I did make a slight change there

#

I turned it into a guard clause

#

Didn't even realize, cuz of the formatting

primal tulip
#

thank you so much guys. My scripting skills aren't the highest so its super appreciated yall