#(xn80a32) Is there a way to detect is dropped item on/in a certain block?
114 messages · Page 1 of 1 (latest)
(xn80a32) Is there a way to detect is dropped item on/in a certain block?
Hi I'm AutoThreadBot! Don't mind me, I'll just be adding the helper team to this thread so they can see it. A human will get to you soon.
While there is an event for dropping an item, I don't think there is an event for it landing on a block.
I'm very unsure of entity steps on block will work for this, especially with water. You may need either a delta time event to check all dropped items in a world, or simply run a task when the item is dropped.
I'm unfamiliar of how to check itemsadder items.
I assume through NBT? We've had threads regarding this.
Thank you much, ill try this later
btw, how to check is cauldron full of water and how to manipulate its fullness?
Its my first script so i kinda dont know what to do and where to write ;d
I want to check is there any water in cauldron and if it is, then empty it by 1 and replace item in players hand
This isn't a real tag, where did you get this from?
its an id from ItemsAdder plugin
This isn't in the denizen meta?
I'm very unfamiliar with this, a developer would have to verify any of this.
However.
Someone else has asked a similar question to get an itemsadder item.
so itemsadder API for denizen doesnt work and i have to use <[item].raw_nbt.deep_get[itemsadder.id].after[:]>?
item means original item that is replaced with itemsadder and itemsadder.id means javaitems:melted_copper_ingot?
anything like this is added on the itemsadder side
i've never heard of this, though
yeah
no idea if they maintain it
If you want to see if you can get it working, you can try asking them
ish, not quite that
but generally there's not a reason to just see if it's an itemsadder item, i wouldn't think
rather, you'd be doing that search as an inherent part of looking for a specific item
i think i will handle the item part, but how to check is cauldron full of water and how to manipulate its fullness?
!t materialtag.level
(Property) Returns the current level for a Levelled material, cake, beehives, snow, farmland, or brushable blocks.
"Levelled" materials include: water, lava, cauldrons, composters, light blocks, brushable blocks, and any other future Levelled implementing types.
For light blocks, this is the brightness of the light.
For water/lava this is the height of the liquid block.
For cauldrons, this is the amount of liquid contained.
For cake, this is the number of bites left.
For beehives/bee nests, this...
Properties
ElementTag(Number)
MaterialTag.level
iirc it actually changes the block material?
so there's a water_cauldron and lava_cauldron block?
prob
i think i quite dont understand something
ill change <player.item_in_hand.javaitems:melted_copper_ingot> if it wont work later
!g tags
!g first tags
View the guide page 'Your First Tags' at: https://guide.denizenscript.com/guides/first-steps/tags.html
hmm
[00:42:13 INFO]: ERROR in script 'copper_transformation' in queue 'COPPER_TRANSFORMATION_23_MillRoad' while executing command 'IF' in file 'scripts/copper_transformation.dsc' on line '5' with player 'xn80a32'! Error Message: Invalid definition name 'paper'. [00:42:13 INFO]: Additional Error Info: Tag <[paper].raw_nbt.get[itemsadder].get[javaitems:melted_copper_ingot].after[string:]> is invalid! [00:42:13 INFO]: Additional Error Info: Unfilled or unrecognized sub-tag(s) '[paper].raw_nbt.get[itemsadder].get[javaitems:melted_copper_ingot].after[string:]' for tag <[paper].raw_nbt.get[itemsadder].get[javaitems:melted_copper_ingot].after[string:]>! [00:42:13 INFO]: Comparing if i@paper[display=Раскалённый медный слиток;custom_data=map@[itemsadder=map@[namespace=string:javaitems;id=string:melted_copper_ingot]];custom_model_data=10068;lore=li@Ингредиенты|;quantity=63] EQUALS [paper].raw_nbt.get[itemsadder].get[javaitems:melted_copper_ingot].after[string:] ... false [00:42:13 INFO]: No part of the if command passed, no block will run. [00:42:13 INFO]: Completing queue 'COPPER_TRANSFORMATION_23_MillRoad' in 3ms.
wait ama try smth
nah
Error Message: Invalid definition name 'paper'.
now im trying
type: world
events:
after player right clicks water_cauldron:
- if <player.item_in_hand> == <item[paper].raw_nbt.get[itemsadder].get[javaitems:melted_copper_ingot].after[string:]> && <context.block> == <material[water_cauldron].level> >= 1:
- take iteminhand
- give javaitems:melted_copper_ingot
- narrate "it works"```
still isnt workin
im just trying to make - if <player.item_in_hand> == <item[paper].raw_nbt.get[itemsadder].get[javaitems:melted_copper_ingot].after[string:]> && <context.block> == <material[water_cauldron].level> >= 1: work ;d
a.
context.block is just getting the location tag. And you're trying to equal it to a material level.
💀
Just check it's materialtag.level and compare it to a number.
context.block.material.level
ah ok
type: world
events:
after player right clicks water_cauldron:
- if <player.item_in_hand> == <item[paper].with[display=Раскалённый медный слиток;custom_model_data=10068;raw_nbt=map@[itemsadder=map@[namespace=string:javaitems;id=string:melted_copper_ingot]]].raw_nbt.get[itemsadder].get[id].after[string:]> && <context.block.material.level> >= 1:
- take iteminhand
- give copper_block
- narrate "it works"```
like that right
I can't vouch for the item comparison check, the level looks correct.
[00:57:07 INFO]: Starting InstantQueue 'COPPER_TRANSFORMATION_41_HandyDiscover' with player 'xn80a32'...
[00:57:07 INFO]: +- Queue 'COPPER_TRANSFORMATION_41_HandyDiscover' Executing: (line 5) if <player.item_in_hand> == <item[paper].with[display=Раскалённый медный
слиток;custom_model_data=10068;raw_nbt=map@[itemsadder=map@[namespace=string:javaitems;id=string:melted_copper_ingot]]].raw_nbt.get[itemsadder].get[id].after[string:]> && <context.block.material.level> >= 1 ---------+
[00:57:07 INFO]: +> Executing 'IF': use_braces='true'
[00:57:07 INFO]: Filled tag <player.item_in_hand> with 'i@paper[display = Раскалённый медный слиток; custom_data = map@[itemsadder = map@[namespace = string:javaitems; id = string:melted_copper_ingot]]; custom_model_data = 10068; lore = li@Ингредиенты|]'.
[00:57:07 INFO]: Applying property 'display' on object of type 'ItemTag'...
[00:57:07 INFO]: Applying property 'custom_model_data' on object of type 'ItemTag'...
[00:57:07 INFO]: Applying property 'raw_nbt' on object of type 'ItemTag'...
[00:57:07 INFO]: Filled tag <item[paper].with[display=Раскалённый медный слиток;custom_model_data=10068;raw_nbt=map@[itemsadder=map@[namespace=string:javaitems;id=string:melted_copper_ingot]]].raw_nbt.get[itemsadder].get[id].after[string:]> with 'melted_copper_ingot'.
[00:57:07 INFO]: Comparing if i@paper[display=Раскалённый медный слиток;custom_data=map@[itemsadder=map@[namespace=string:javaitems;id=string:melted_copper_ingot]];custom_model_data=10068;lore=li@Ингредиенты|] EQUALS melted_copper_ingot ... false
[00:57:07 INFO]: No part of the if command passed, no block will run.
[00:57:07 INFO]: Completing queue 'COPPER_TRANSFORMATION_41_HandyDiscover' in 5ms.```
;d
!debug
If you need help with a script issue, one of the most powerful tools Denizen has to offer is full debug output. This is displaying in your console whenever scripts are running until you turn debug off. To share a debug log quickly and easily with helpers, simply run the command /denizen debug -r in-game to begin recording, then run through the part of the script you need help with, then run the command /denizen submit. This will give you a link to a paste of the debug log, which you can then copy/paste back to us!
Pasting from console makes it unreadable.
Content of Server Log Paste #126631: Denizen Debug Logs From A Minecraft Server... pasted 2024/09/19 17:58:03 UTC-07:00, Paste length: 3619 characters across 34 lines, Content: Java Version: 21.0.3Up-time: 2h 53m
Content of Server Log Paste #126631: Denizen Debug Logs From A Minecraft Server... pasted 2024/09/19 17:58:03 UTC-07:00, Paste length: 3619 characters across 34 lines, Content: Java Version: 21.0.3Up-time: 2h 53m
Purpur version 1.20.6-2233-0d6766e (MC: 1.20.6)
Denizen: 1.3.1-SNAPSHOT (build 7067-DEV) -- (Current build :white_check_mark:)
@neat zephyr
Offline, but proxied.
3 (:triangular_flag_on_post: Offline)
21.0.3 :white_check_mark:
MythicMobs: 5.7.0-SNAPSHOT-db9480c6, ProtocolLib: 5.3.0-SNAPSHOT-726
TAB: 4.1.5 - This plugin adds Below_Name scoreboards to NPCs.
ViaVersion: 5.0.3 - Mixed client vs server versions can sometimes cause packet-related issues.
ModelEngine: R4.0.7 - ModelEngine has Citizens support, but that support is known to be buggy. Issues related to NPCs that use ModelEngine should be reported to ModelEngine support, not Citizens.
I see a few problems.
m
Give me a bit.
type: world
events:
after player right clicks water_cauldron:
- if <player.item_in_hand> == <item[paper].with[display=Раскалённый медный слиток;custom_model_data=10068;raw_nbt=map@[itemsadder=map@[namespace=string:javaitems;id=string:melted_copper_ingot]]].custom_data.get[itemsadder].get[id].after[string:]> && <context.block.material.level> >= 1:
- take iteminhand
- give copper_block
- narrate "it works"```
Content of Server Log Paste #126632: Denizen Debug Logs From A Minecraft Server... pasted 2024/09/19 18:11:50 UTC-07:00, Paste length: 3642 characters across 34 lines, Content: Java Version: 21.0.3Up-time: 3h 7m
not working ;d
Unfortunately, a helper must address this.
somehow itemsadder now succesfully hooked into denizen
BUT
Content of Server Log Paste #126634: Denizen Debug Logs From A Minecraft Server... pasted 2024/09/19 19:09:46 UTC-07:00, Paste length: 2836 characters across 33 lines, Content: Java Version: 21.0.3Up-time: 3m 15s
I AM
STUPID ASS
[02:20:24 INFO]: Comparing if javaitems:melted_copper_ingot EQUALS javaitems:melted_copper_ingot ... true
nothing new there
just did - if <player.item_in_hand.ia_namespaced_id> == javaitems:melted_copper_ingot
all time i was trying to put javaitems:melted_copper_ingot into <player.item_in_hand.ia_namespaced_id>
i was wrong
<player.item_in_hand.ia_namespaced_id> gives an ID of an item
so u have to compare it to ur id using if
now it's doing good
but still something is wrong with <context.block.material.level> >= 1:
Unfortunately, I cannot continue until a helper address some problems.
just for u know i bought minecraft
if you saw that server is offline doesn't mean that i support piracy/don't have license for minecraft
if you need i can prove.
nah man that is harassing
this is just a test server, i have a minecraft license both on mobile devices, on my old PS 3, and on my computer
Content of Server Log Paste #126636: Denizen Debug Logs From A Minecraft Server... pasted 2024/09/19 20:01:11 UTC-07:00, Paste length: 2969 characters across 34 lines, Content: Java Version: 21.0.3Up-time: 1m 35s
Purpur version 1.20.6-2233-0d6766e (MC: 1.20.6)
Denizen: 1.3.1-SNAPSHOT (build 7067-DEV) -- (Current build :white_check_mark:)
@carmine bobcat
3 (:triangular_flag_on_post: Offline)
21.0.3 :white_check_mark:
MythicMobs: 5.7.0-SNAPSHOT-db9480c6, ProtocolLib: 5.3.0-SNAPSHOT-726
TAB: 4.1.5 - This plugin adds Below_Name scoreboards to NPCs.
ViaVersion: 5.0.3 - Mixed client vs server versions can sometimes cause packet-related issues.
ModelEngine: R4.0.7 - ModelEngine has Citizens support, but that support is known to be buggy. Issues related to NPCs that use ModelEngine should be reported to ModelEngine support, not Citizens.
unfair
Thread closed as resolved.
@stable swallow cracked @carmine bobcat
Thread was manually reopened by @last crane.
Role applied.
Thread created: #1286566595446964265