#(pattonsteel) How to script custom trial spawners?

71 messages · Page 1 of 1 (latest)

calm nest
#

Hello, I'm scripting a small dungeon instance, and would like to make use of the new trial spawners. I have generated the custom NBT for it:
trial_spawner[block_entity_data={id:"minecraft:trial_spawner",required_player_range:14,target_cooldown_length:3600,normal_config:{spawn_range:4,total_mobs:20,simultaneous_mobs:10,ticks_between_spawn:1,spawn_potentials:[{data:{entity:{id:"minecraft:zombie"}},weight:3},{data:{entity:{id:"minecraft:husk"}},weight:1}]},spawn_potentials:[{data:{entity:{id:"minecraft:zombie"}},weight:3},{data:{entity:{id:"minecraft:husk"}},weight:1}]}]

And using the /minecraft:give command, obtain a functional block.

I would like to be able to reset the field with Denizen, but have been reading that NBT is not meant to be supported(?) and am scratching my head with the -adjustblock usage vs. NBT

A finger ponting in the right direction would be super helpful! Thank you!

native capeBOT
#

(pattonsteel) How to script custom trial spawners?

native capeBOT
#

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.

calm nest
#

More on this, I've simply used setblock, but now I am running into the issue of not being able to find when the trial spawner has been defeated

#

I'm trying to find the data:cooldown_ends_at

#

or alternatively, the state of the spawner would work just as well

#

I know I can get material from a location tag, but how can I get the NBT?

zealous ferry
#

!t property_map

still boughBOT
zealous ferry
#

this?

#

or i think that only gets denizen attributes

#

im not sure if there is sa way to get NBT for location/material

calm nest
#

I'm getting unfilled from location[].property_map, and an empty list from location[].material.property_map

calm nest
#

is there a way to bring a block up to an entity?

zealous ferry
#

what are you trying to do with the NBT??

calm nest
zealous ferry
#

!m item_component

still boughBOT
#
Possible Confusion

Did you mean to search for item_type?

zealous ferry
#

since nbt is no longer a thing technically

#

!s component

still boughBOT
# zealous ferry !s component
Search Results

[Partial Name Match] !Mechanism itemtag.components_patch, !Tag itemtag.components_patch, !Property itemtag.components_patch, !Tag itemtag.full_components_patch,
[Semi-Decent Match] !Language slot inputs, !Tag cuboidtag.get, !Command discordmessage, !Tag locationtag.round, !Tag locationtag.round_to, !Tag locationtag.round_up, !Tag locationtag.round_down, !Language denizen text formatting, !Language interact script triggers, !Tag locationtag.round_to_precision.

zealous ferry
#

where is it..

#

!Mechanism itemtag.components_patch'

still boughBOT
#
Possible Confusion

Did you mean to search for itemtag.components_patch?

still boughBOT
# zealous ferry !Mechanism itemtag.components_patch'

(Property) Sets the item's internal component patch. That is, the changes in components on top of the item type's default components.
The map is in !language Raw NBT Encoding format.
This is mainly intended for item data persistence, and scripts should prefer using proper item properties instead of setting raw data directly.
If you're trying to control custom data (such as data set by other plugins), use !property ItemTag.custom_data.

Group

Properties

**WARNING**

Due to this being a direct representation of internal data, compatibility for script usage across versions is not guaranteed.

Object

ItemTag

Input

MapTag

Tags

<ItemTag.components_patch> (Property) Returns the item's internal component patch. That is, the ch...

zealous ferry
#

ughh

#

maybe try that?

calm nest
zealous ferry
#

also i do wonder if the regular spawner mechs work with the trial spawner?

calm nest
#

I'm setting up a dungeon run using the new trail chambers, using the /minecraft:setblock to create spawners with custom parameters (link if curious). I am setting up exit conditions, including: player death, player exit, and all trial spawners defeated

I want to check the state of the spawner to see if the player has defeated all the mobs

calm nest
#

here, upon changing to a normal spawner from a trial spawner

zealous ferry
#

huh interesting, this might be a feature request or a components patch thing

#

you might want to hear from someone else on this

calm nest
#

I wonder if I can use vanilla Minecraft commands as a workaround for now

calm nest
zealous ferry
#

its basically nbt

calm nest
#

its the new NBT right?

zealous ferry
#

yes

calm nest
#

Not sure how to use it, since it's drawing from an ItemTag and I only have a MaterialTag from <location[].material>?

#

yeah, how do I get an EntityTag from the location?

calm nest
#

Do people compile custom versions of Denizen? I'm thinking that it'd be relatively straightforward to modify one of the existing spawner types to match my needs

fleet canyon
#

At that point you may as well just make a PR.

calm nest
#

If I can get it to work, I'll do that, I haven't messed with Java in a hot minute, it may also lack the scope that people would expect

fleet canyon
#

I'm not sure if trial spawners have proper support yet, it'd be nice to have.

#

Check #denizen-contrib

#

I've made a request to modify spawners before, because they're kind of problematic with entitys.

calm nest
#

Okay I'd love to give it a shot

fleet canyon
calm nest
#

Heh, I came across this first thread when I was searching for more spawner info, the second one is new to me

calm nest
scarlet cloud
nimble canopyBOT
#
Thread Closing Reminder

Has your issue been resolved, or your question been answered?
If so, please use the </resolved:1028673926114594866> command to close your thread.
Or </invalid:1028673926898909185> if it's not possible to resolve.

If not yet resolved, please reply below to tell us what you still need.

(Note that if there is no reply for a few days, this thread will eventually close itself.)

#

@calm nest

calm nest
#

Oh! Should I reply in the other thread?

scarlet cloud
#

likely updates will be posted there since it's marked as a "feature request"

#

(i actually have one i'm trying to post, but discord's having some issues rn and that thread is apparently impacted)

calm nest
#

Ok, I'm getting back into Minecraft after a bit of a hiatus, so I'm happy to try and contribute / support in the coming weeks

scarlet cloud
nimble canopyBOT
#
Thread Closing Reminder

Has your issue been resolved, or your question been answered?
If so, please use the </resolved:1028673926114594866> command to close your thread.
Or </invalid:1028673926898909185> if it's not possible to resolve.

If not yet resolved, please reply below to tell us what you still need.

(Note that if there is no reply for a few days, this thread will eventually close itself.)

#

@calm nest