NBT Autocomplete

NBT Autocomplete

1M Downloads

more about #38

BarbTurnip437 opened this issue ยท 2 comments

commented

execute as @a if items entity @s weapon.mainhand minecraft:lapis_block run item modify entity @s weapon.mainhand {function:"minecraft:set_components",entries:[],components:{"minecraft:food":{nutrition:0,saturation:0,can_always_eat:1,eat_seconds:0.05,effects:[{effect:{id:"minecraft:wither",amplifier:2,duration:400},probability:0.005},{effect:{id:"minecraft:wind_charged",amplifier:2,duration:400},probability:0.025},{effect:{id:"minecraft:weaving",amplifier:2,duration:400},probability:0.025},{effect:{id:"minecraft:weakness",amplifier:2,duration:400},probability:0.025},{effect:{id:"minecraft:water_breathing",amplifier:2,duration:400},probability:0.025},{effect:{id:"minecraft:unluck",amplifier:2,duration:400},probability:0.025},{effect:{id:"minecraft:trial_omen",amplifier:2,duration:400},probability:0.025},{effect:{id:"minecraft:strength",amplifier:2,duration:400},probability:0.025},{effect:{id:"minecraft:speed",amplifier:2,duration:400},probability:0.025},{effect:{id:"minecraft:slowness",amplifier:2,duration:400},probability:0.025},{effect:{id:"minecraft:slowness",amplifier:2,duration:400},probability:0.025},{effect:{id:"minecraft:slow_falling",amplifier:2,duration:400},probability:0.025},{effect:{id:"minecraft:saturation",amplifier:2,duration:400},probability:0.025},{effect:{id:"minecraft:resistance",amplifier:2,duration:400},probability:0.025},{effect:{id:"minecraft:regeneration",amplifier:2,duration:400},probability:0.025},{effect:{id:"minecraft:raid_omen",amplifier:2,duration:400},probability:0.025},{effect:{id:"minecraft:poison",amplifier:2,duration:400},probability:0.025},{effect:{id:"minecraft:oozing",amplifier:2,duration:400},probability:0.025},{effect:{id:"minecraft:night_vision",amplifier:2,duration:400},probability:0.025},{effect:{id:"minecraft:nausea",amplifier:2,duration:400},probability:0.025},{effect:{id:"minecraft:mining_fatigue",amplifier:2,duration:400},probability:0.025},{effect:{id:"minecraft:luck",amplifier:2,duration:400},probability:0.025},{effect:{id:"minecraft:levitation",amplifier:2,duration:400},probability:0.025},{effect:{id:"minecraft:jump_boost",amplifier:2,duration:400},probability:0.025},{effect:{id:"minecraft:invisibility",amplifier:2,duration:400},probability:0.025},{effect:{id:"minecraft:instant_damage",amplifier:2,duration:400},probability:0.0001},{effect:{id:"minecraft:instant_health",amplifier:2,duration:400},probability:0.0001},{effect:{id:"minecraft:infested",amplifier:2,duration:400},probability:0.025},{effect:{id:"minecraft:hunger",amplifier:2,duration:400},probability:0.025},{effect:{id:"minecraft:hero_of_the_village",amplifier:2,duration:400},probability:0.025},{effect:{id:"minecraft:health_boost",amplifier:2,duration:400},probability:0.025},{effect:{id:"minecraft:haste",amplifier:2,duration:400},probability:0.025},{effect:{id:"minecraft:glowing",amplifier:2,duration:400},probability:0.025},{effect:{id:"minecraft:fire_resistance",amplifier:2,duration:400},probability:0.025},{effect:{id:"minecraft:dolphins_grace",amplifier:2,duration:400},probability:0.025},{effect:{id:"minecraft:darkness",amplifier:2,duration:400},probability:0.025},{effect:{id:"minecraft:conduit_power",amplifier:2,duration:400},probability:0.025},{effect:{id:"minecraft:blindness",amplifier:2,duration:400},probability:0.025},{effect:{id:"minecraft:bad_omen",amplifier:2,duration:400},probability:0.025},{effect:{id:"minecraft:absorption",amplifier:2,duration:400},probability:0.025}]}},conditions:[]}

this command will modify lapis_block making it give you random effects when you "eat" it (tested in 1.21.1)


execute as @a if predicate {condition:"minecraft:all_of",terms:[{condition:"minecraft:entity_properties",entity:"this",predicate:{flags:{is_sneaking:1b}}}]} run say huh sneaky

this command will let sneaking players /say huh sneaky (tested in 1.21.1)


predicate & item modifier made by misode
commented

First of all, sorry for closing your previous issue. I thought these commands only accept IDs of modifiers/predicates that were defined in data packs.
I'll try to fix it, but it won't be soon. First, I won't have much time next month and in my free time I'll mostly work on update to my other mod. Also, I have other things that I would like to change in NBTac. Update to 1.21.4 didn't update some item components that changed in this version (it will be fixed most likely in the 1.3.11 which I'll try to release before the end of this year). I have plans to by default disable disassembler in 1.4 (which caused many very bad issues) and add pregenerated list of tags in JAR. I also still have plans to add API which I promised to add about a year and a half ago (most likely in 1.4 or 1.5). As for this issue, I will try to resolve it someday, but this will be after I finally bring this mod (at least on a technical side of things) to a decent state.
Anyway, thank you for reporting.

commented

owo