#Simultaneous Right and Left Click not functioning
1 messages · Page 1 of 1 (latest)
What are you using for left click detection?
Enchantments certainly is a thing
it's just that the left-click makes it so that right-clicking doesn't work.
Yep, but it's helpful to know what methods you're using, and left click detection has a wider, newer range
If you're using enchantments then no, you're not
I don't know why you think "enchantments" isn't an acceptable answer
I just searched it up... (I wasn't even sure if I got it correct)
How about you actually explain how you are doing left click detection then
Because I cannot read your mind
Ok, so the item has an enchantment. This enchant has the post_piercing_attack effect attached to it. It should run a function. But it doesn't work with right-clicking.
That is in fact using an enchantment, and it is new, not that that matters
So yes, it's checking if you're doing a jab attack, during which you can't use (aka right click) other items, and vice versa
This is expected behavior
I did use consumable components too for right clicks.
Yep, which means those work by attempting to use the item, literally attempting to eat it
You can't eat food while attacking with a spear, same concept applies here
so it's impossible.
There is probably not a clean way to check if the player is both left and right clicking in the same tick, no
What do you suggest then?
For what?
I don't know what mechanic you're trying to implement, all I can infer is you want to detect if the player left clicks and right clicks at the same time. We've established you can't do that, so I don't know what you're asking
So I want an item that runs an ability either one left or right click.
more like a function?
If you want it on either left or right click, why is it a problem that it can't detect both at the same time?
A function would be what you use to run whatever you want the ability to be
Why does that matter? If the left click detection is working, then the ability should run fine, yes?
what do you mean exactly by that? more to the point: you said how you set up your left click detection, but how have you set up your right click detection?
Consumable component
yes, but detection
i used advancements.
just double checking. so then again, you mean your advancement isnt working on your item with the left click detection?
pretty much.
hm, my immediate guess would be something off in your advancement then. could you send that in ``` code blocks, along with whatever gives your item
I used recipes...
"criteria": {
"using_item": {
"trigger": "minecraft:using_item",
"conditions": {
"item": {
"items": "minecraft:firework_star",
"components": {
"minecraft:firework_explosion": {
"shape": "small_ball",
"colors": [
14429954
]
},
"minecraft:custom_data": {
"fire_spell:1": {}
}
}
}
}
}
},
"rewards": {
"function": "broken_barriers:fire_spell_function_control_r"
}
}
"type": "minecraft:crafting_shaped",
"show_notification": true,
"category": "misc",
"pattern": [
"aba",
"cdc",
"aba"
],
"key": {
"a": [
"minecraft:magma_cream"
],
"b": [
"minecraft:blaze_rod"
],
"c": [
"minecraft:blaze_powder"
],
"d": [
"minecraft:nether_star"
]
},
"result": {
"id": "minecraft:firework_star",
"components": {
"minecraft:firework_explosion": {
"shape": "small_ball",
"colors": [
14429954
]
},
"minecraft:custom_data": {
"fire_spell:1": {}
},
"minecraft:custom_name": {
"text": " Spell",
"color": "#dc2f02",
"italic": false
},
"minecraft:tooltip_display": {
"hidden_components": [
"minecraft:firework_explosion"
]
},
"minecraft:consumable": {
"consume_seconds": 0.05,
"animation": "none",
"sound": "minecraft:item.firecharge.use",
"has_consume_particles": false
},
"minecraft:lore": [
{
"text": "Mana Cost: 7 Points",
"color": "white",
"italic": false
}
],
"minecraft:piercing_weapon": {},
"minecraft:enchantments": {
"broken_barriers:fire_spell_left_click_detection": 1
}
},
"count": 5
}
}
so did this advancement work on a version of this item without the left click detection, or have you only tested this as is?
it worked before the left click came in.
apologies for the delay, but i'm testing now and its working fine for me. are you sure your advancement isn't already granted and that the reward function itself is working properly?
Hnmm. I will try to bugfix it later.