#Item exchange using a block

1 messages · Page 1 of 1 (latest)

chilly trout
#

Basically when the player is inside a loom I want certain items to be transmuted into banners with otherwise the same data so that they can be designed with patterns and then turned back when the player exits the loom inventory.

However I only know how to check when they open the inventory and originally I didn't mind and was just going to have it then create a raycast that checks if the player is still looking at a loom, and then when they weren't it would turn the stuff back into normal items. But if the player is out of the inventory and looking at the loom they can still place the items and I don't want that.

marble mangoBOT
#

<@&1201956957406109788>

Someone will come and help soon!

💬 While you wait, take this time to provide more context and details.

✅ Once your question has been resolved (or you no longer need it), please click Resolve Question or run /resolve

#
⚠️ You already have a question open!

Don't forget to close or resolve your old questions once you're done with them. It makes our lives much easier! :D

Open question: #1383868485423337633

chilly trout
#

An cos you can't just like invert the check because that just make it for when you use something that ISN'T a loom so can't do tht

indigo needle
#

an item used on block advancement tags them and starts a schedule that manages the raycast. once the player looks away, you remove the tag and stop the raycasting.

#

You can make the raycast return 0 or 1 if they do or don't hit a loom until they reach their limit lenght.

chilly trout
#

well yeah that's the idea I had but again that has the problem of the player still placing the item on the loom as a banner

#

It's not that I don't know how to implement what I said, it's that what I said presents issues that I would rather not have so I'm looking for another method

marble mangoBOT
# marble mango <@&1201956957406109788>

<@&1166082198152159386> <@&1202694677766348840>

🙇 Helpers Arise!

Please note that you still might not immediately get a response since all helpers are human beings and volunteers (and also might be sleeping right now)

steel meteor
#

maybe set them in adventure while raycasting?

#

a little ugly but works lol

slender grove
#

well the issue with that method is that, you don't really have to be looking at the loom to use it

#

you could click it while falling, raycast method fails

#

or someone digs a block under you, and you are now looking at a grass block

#

ee eyea

#

my best recommendation if I understood what you are trying to do is, just make it turn into a banner if the player is holding it with his cursor while the loom is open, and to detect when the loom "isn't" open, your best bet is to track the player's keys. if the player clicks forward backward jump shift ..etc it means they're out of the gui

#

and for turning the item into a banner with the same data, you could just use an item modifier I believe

#

it's not too hard

#

but if the data on that item is exclusive to it, which is rare with the new component system but still possible, then yea you will need a more complicated method, but i highly doubt that

#

(you could use the set_item modifier, but as I mentioned there could be some lost info)