#(Daniwan) Crops thing

337 messages · Page 1 of 1 (latest)

stark remnant
#

Hey there, I'm trying to create a mechanism for crops. Basically I'd like the crops to grow one stage at a particular time (2am, in game). But another thing that needs to be checked is if the dirt is watered with a bucket of water, or if there is a water source nearby, then only will the crop grow through the stage.

Could you let me know how one could probably approach this method?

naive elbowBOT
#

(Daniwan) Crops thing

naive elbowBOT
#

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.
You can block this bot if you don't want to see these messages, I won't mind.
<@&525394568410038282>

grizzled path
#

This is certainly possible. You will need a couple events to do different things.

#

!e on time

short burrowBOT
# grizzled path !e on time
Cannot Specify Searched Event

Multiple possible events: system time hh:mm, time changes in world, chunk loads for the first time, player logs in for the first time, delta time hourly|minutely|secondly.

grizzled path
#

!e time changes

short burrowBOT
# grizzled path !e time changes
Group

World

Event Lines

time changes (in <world>) time <0-23> (in <world>)

Triggers

when the current time changes in a world (once per mine-hour).

Context

<context.time> returns the current time (the hour, as a number from 0 to 23).
<context.world> returns the world.

grizzled path
#

!t locationtag.find_blocks.within

short burrowBOT
grizzled path
#

!c modifyblock

short burrowBOT
# grizzled path !c modifyblock
Group

world

Syntax

modifyblock [<location>|.../<ellipsoid>/<cuboid>] [<material>|...] (no_physics/naturally:<tool>) (delayed) (<script>) (<percent chance>|...) (source:<player>) (max_delay_ms:<#>)

Short Description

Modifies blocks.

Description

Changes blocks in the world based on the criteria given.

Use 'no_physics' to place the blocks without physics taking over the modified blocks.
This is useful for block types such as portals or water. This does NOT control physics for an extended period of time.

Specify (<percent chance>|...) to give a chance of each material being placed (in any material at all).

Use 'naturally:' when setting a block to air to break it naturally, meaning that it will drop items. Specify the tool item that sho...

grizzled path
#

To prevent crop growth normally.

#

!e block grows

short burrowBOT
# grizzled path !e block grows
Group

Block

Event Lines

<block> grows

Switches

from:<age> to only process the event if the material started at a specific age.
to:<age> to only process the event if the material ended at a specific age.

Triggers

when a block grows naturally in the world, EG, when wheat, sugar canes, cacti, watermelons or pumpkins grow.

Context

<context.location> returns the LocationTag of the block that grew (still at original material state when event fires).
<context.material> returns the MaterialTag of the block's newly grown state.

Has Known Location

True - this adds switches in:<area> + location_flagged:<flag name>.

Cancellable

True - this adds <context.cancelled> and determines cancelled + cancelled:false.

grizzled path
#

To tie it all together, we strongly recommend starting with the Denizen guide for a better understanding on how Denizen works.

Edit: typo

#

@stark remnant

#

!guide

short burrowBOT
loud glade
#

If you want to specifically base it on the vanilla mechanic of watering farmland:

#

!t MaterialTag.level

short burrowBOT
# loud glade !t MaterialTag.level

Returns the current level for a Levelled material, cake, beehives, snow, or farmland.
"Levelled" materials include: water, lava, cauldrons, composters, light 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 is the amount of honey contained.
For snow, th...

Group

properties

Returns

ElementTag(Number)

Mechanism

MaterialTag.level

loud glade
#

For farmland, this is the moisture level.

stark remnant
loud glade
#

Do you want the water to specifcially be on the farmland?

stark remnant
#

Yes please

loud glade
#

If you want it to just be around it to water it like in vanilla, then can just let vanilla handle it and only check the moisture

stark remnant
#

Or it can be any block, if that makes it easier

#

Basically, player clicks the block with a water bucket, it gets emptied, I'll run a water droplet particle and the water sound, and the block is considered water

loud glade
#

I see, then you'll probably want to cancel vanilla watering first - I.e. prevent the farmland from getting the water naturally

stark remnant
#

And then at 2am, it'll be dry again, which makes it so that player needs to do the mechanism again

stark remnant
loud glade
#

If you use a block without the vanilla behavior you wouldn't have to water it, but then you'd need a different way of showing the player that the block is watered

stark remnant
#

That could work

#

Wait, not server flag. Player flag

loud glade
#

I mean, probably a location flag? the location is getting watered for everyone, not just that specific player

#

Also if you use a block that isn't farmland you'll probably need to handle placing the crops yourself, as they can only be placed on farmland in vanilla

stark remnant
#

Well, it's a Skyblock based feature. So I think it would be player based right? Or would it still be location flag?

stark remnant
loud glade
#

We can help, you just need to have the fully formed idea first

#

Also, I'd say still use farmland - cancelling most likely one event to prevent it from getting water the normal way sounds easier then having to manually handle crops placement, prevent them from breaking when the block updates, etc.

stark remnant
#

I see

#

And if we were to model the vanilla crops?

#

Alright I'll try it with farmlands and see right now

#

I can explain the idea. Basically player gets a special farmland block to grow carrots or potatoes. They first would till the dirt, and with a bucket of water they'd water the block. The water doesn't need to be placed around the farmland, as long as the player waters the dirt, the plant grows

#

So I think the click event, time event, and after player empties bucket event would work here

#

And player flag, or island player flag..

#

I think island players would be better. Set an expiration time till 2am Minecraft time, and ask them to water the dirt for the crop to grow

loud glade
#

So it's a specific farmland block, and not all farmland in general?

stark remnant
#

Not all farmland

#

Just a specific one

grizzled path
#

You can flag a location, then check for the flag.

stark remnant
#

Ah alright! I'll try it out

mental flameBOT
stark remnant
#

I was writing this time script, but it doesn't show up for some reason. Is the type wrong?

#

Console doesn't show anything

#

Should I have done an on join event?

stark remnant
#

I got it working, my bad there! But is there a way to not spam the console with delta time?

loud glade
#

Once you're done working on a script, you can disable it's debugging

stark remnant
#

Is there a way to possibly move the actionbar text around the screen? Possibly above the scoreboard or so?

stark remnant
stark remnant
loud glade
#

!vague

short burrowBOT
# loud glade !vague
Info: vague

Your question is too vague to be able to answer well.

If you're asking how to do something, please make sure to add some background detail. Make sure to specify your overall end goal and the general design/idea and any existing progress towards that goal, not just the single specific point.

For script-related problems, see also !info haste debug. For non-scripting server trouble, see !logs.

See also !xyproblem

loud glade
#

What script? why does it keep executing / how do you want it to execute?

loud glade
stark remnant
stark remnant
loud glade
#

Why don't you want a custom resource pack though? it's a pretty common thing these days

stark remnant
stark remnant
#

I think it might be easier, with itemsadder. So i'll read through and see

stark remnant
#

Or wait, I'll figure this out

stark remnant
#

Got that working then, Damn! That took way too long

stark remnant
#

Would
`on player places cactus against:sand

  • deremine cancelled ` be right? Would that block the player from placing cactus on sand?
shy mist
#

isn't that redundant

#

unless you want to allow some weird edge-case of placing

#

(which this probably does)

stark remnant
stark remnant
#

I also wanted to know. I was going through this https://github.com/Hydroxycobalamin/BlockArchitect/blob/main/external/BlockArchitect/custom_blocks/samples/iron.dsc

If I was to create a noteblock as a custom block, would it still have the properties of that as a note block? Because I've heard that note blocks dont seem to cause a lot of lag, rather than having the other blocks?

GitHub

A denizen script which allows you to create custom blocks! - BlockArchitect/external/BlockArchitect/custom_blocks/samples/iron.dsc at main · Hydroxycobalamin/BlockArchitect

#

As Im trying to create customcrops with Denizen, where we have a pot and all those features

#

I used Itesmadder to create my blocks and all, but I realized I wouldnt be able to implement it with Denizen, even though they have a said script on their wiki 😕

#

Or wait, is it possible to check if a paper is being placed or something, with custommodeldata?

stark remnant
#

The way it works is, the player places the paper on the ground, a note block comes up with the texture. But I dont want them placing both these papers on top of the note block. If that makes sense? 😬

stark remnant
grizzled path
#

A paper is being placed on the ground?

#

!e player places block

short burrowBOT
# grizzled path !e player places block
Group

Player

Event Lines

player places block player places <item>

Switches

using:<hand_type> to only process the event if the player is using the specified hand type (HAND or OFF_HAND).
against:<location> to only process the event if block that this new block is being placed against matches the specified LocationTag matcher.
type:<material> to only process the event if the block placed matches the MaterialTag matcher input.

Triggers

when a player places a block.

Has Player

Always. - this adds switches flagged:<flag name> + permission:<node>, in addition to the <player> link.

Context

<context.location> returns the LocationTag of the block that was placed.
<context.material> returns the MaterialTag of the block that was placed.
<context.old_material> returns the MaterialTag of the block that was replaced.
<context.item_in_hand> returns the ItemTag of the item in hand.
<context.hand> returns the name of the hand that the block was in (HAND or OFF_HAND).
<context.against> returns the LocationTag of the block this block was placed against.

Has Known Location

True - this adds switches in:<area> + location_flagged:<flag name>.

Cancellable

True - this adds <context.cancelled> and determines cancelled + cancelled:false.

Examples
on player places block:
after player places torch using:off_hand:
on player places cactus against:sand:
# This example process the event only if the player places any block that isn't tnt.
on player places block type:!tnt:
- announce "<player.name> has placed a block that isn't TNT. Lucky!"
grizzled path
#

There's that ^, otherwise I have no idea what you are talking about.

stark remnant
#

Is it possible to check a blocks raw nbt, once it's placed?

stark remnant
loud glade
grizzled path
stark remnant
#

I understand this is wrong

#

Its trying to check if air matches m@air

#

And how does one remove the properties of a note block?

#

Cuz when I modify and place the block, the notes show up

tawny charm
short burrowBOT
stark remnant
#

Not sure if I'm doing it right.

lethal carbon
#

- if <context.location.block.above.material.name> == air:

tawny charm
#

this tag <context.location.block.above.material> returns a MaterialTag

#

and you want to access to a property of this object

stark remnant
#

Oh my bad!

#

So that's working now! But it seems to be placing 2 note blocks

#

Instead of one

lethal carbon
#

!e clicks block

short burrowBOT
# lethal carbon !e clicks block
Group

Player

**WARNING**

this event may in some cases double-fire, requiring usage of the 'ratelimit' command (like 'ratelimit <player> 1t') to prevent doubling actions.

Event Lines

player (right|left) clicks <block>

Switches

with:<item> to only process the event if a specified item was held.
using:hand/off_hand/either_hand to only process the event if the specified hand was used to click.
type:<material> to only run if the block clicked matches the material input.

Triggers

when a player clicks on a block or in the air.

Has Player

Always. - this adds switches flagged:<flag name> + permission:<node>, in addition to the <player> link.

Context

<context.item> returns the ItemTag the player is clicking with.
<context.location> returns the LocationTag the player is clicking on.
<context.relative> returns a LocationTag of the air block in front of the clicked block.
<context.click_type> returns an ElementTag of the Spigot API click type <@link url https://hub.spi...
<context.hand> returns an ElementTag of the used hand.

Has Known Location

True - this adds switches in:<area> + location_flagged:<flag name>.

Cancellable

True - this adds <context.cancelled> and determines cancelled + cancelled:false.

lethal carbon
#

WARNING this event may in some cases double-fire, requiring usage of the 'ratelimit' command (like 'ratelimit <player> 1t') to prevent doubling actions.

#

!c ratelimit

short burrowBOT
# lethal carbon !c ratelimit
Group

queue

Syntax

ratelimit [<object>] [<duration>]

Short Description

Limits the rate that queues may process a script at.

Description

Limits the rate that queues may process a script at.
If another queue tries to run the same script faster than the duration, that second queue will be stopped.

Note that the rate limiting is tracked based on two unique factors: the object input, and the specific script line.
That is to say: if you have a 'ratelimit <player> 10s', and then a few lines down a 'ratelimit <player> 10s',
those are two separate rate limiters.
Additionally, if you have a 'ratelimit <player> 10s' and two different play...

lethal carbon
#

try ratelimiting

stark remnant
#

Cool, got that sorted. Now the watering 😬

#

Btw, am I able to set a model for that particular note_block? With a resource pack I understand that's possible, but how is the question 😬

#

Also, another issue I ran into is. The location doesn't seem to be flagged after I added in the rate limit

#

Alright, I think I fixed tht

#

It doesnt seem to replace the water_bucket with an empty bucket

#

And the noteblock plays the notes too

#

Which I dont want 😬

lethal carbon
#

slot:<player.item_in_hand> no

#

!t held_item_slot

short burrowBOT
stark remnant
lethal carbon
#

sir yessir

#

- inventory set o:bucket slot:<player.held_item_slot>

#

try that ^

stark remnant
#

What is O: ?

lethal carbon
#

!c inventory

short burrowBOT
# lethal carbon !c inventory
Group

item

Syntax

inventory [open/close/copy/move/swap/set/keep/exclude/fill/clear/update/adjust <mechanism>:<value>/flag <name>(:<action>)[:<value>] (expire:<time>)] (destination:<inventory>) (origin:<inventory>/<item>|...) (slot:<slot>)

Short Description

Edits the inventory of a player, NPC, or chest.

Description

Use this command to edit the state of inventories.
By default, the destination inventory is the current attached player's inventory.

If you are copying, swapping, removing from (including via "keep" and "exclude"), adding to, moving, or filling inventories,
you'll need both destination and origin inventories.

Origin inventories may be specified as a list of ItemTags, but destinations must be actual InventoryTags.

Using "open", "clear", or "update" only require a destination.
"Update" also req...

lethal carbon
#

(origin:<inventory>/<item>|...)

stark remnant
#

I see!

stark remnant
lethal carbon
stark remnant
mental flameBOT
lethal carbon
#

you could just cancel the event for the particular notes

#

but there might be a better way

stark remnant
#

Oh wait!

lethal carbon
#

!e noteblock plays note

short burrowBOT
# lethal carbon !e noteblock plays note
Group

Block

Event Lines

noteblock plays note

Switches

instrument:<instrument> to only process the event if a specific instrument was played.

Triggers

when a NoteBlock plays a note.

Context

<context.location> returns the LocationTag of the note block.
<context.instrument> returns the name of the instrument played, see list at <@link url https://hub...
<context.sound> returns the name of the sound (that fits into <@link command playsound>) represented by the instrument.
<context.tone> returns the note tone played (A to G).
<context.octave> returns the octave the note is played at (as a number).
<context.sharp> returns a boolean indicating whether the note is sharp.
<context.pitch> returns the computed pitch value (that fits into <@link command playsound>). Note that volume is always 3.

Has Known Location

True - this adds switches in:<area> + location_flagged:<flag name>.

Cancellable

True - this adds <context.cancelled> and determines cancelled + cancelled:false.

stark remnant
#

I see

#

Alright! I'll do those

lethal carbon
#

try - inventory set o:bucket slot:<context.item.slot>

stark remnant
#

Yup, I made the mistake of writing item_in_hand again

#

My bad there!

lethal carbon
#

i think it'd be better to use <context.item.slot> anyway

stark remnant
#

Also, I'm using a paper to place the block

#

Once I retexture the paper, do you think it would have the same swing animation?

#

Or would I have to do that?

stark remnant
lethal carbon
#

i have no idea you'll have to wait for someone who knows more about that

stark remnant
#

Alrighty, thank you!

#

Also, am I able to a flag expire based on a given Minecraft time I set?

#

On an event I'm guessing

lethal carbon
#

no idea what you mean x

stark remnant
#

It's alright, I'll figure that out!

#

Thank you so much for your help!!

#

♥️

lethal carbon
#

i meant i dont understand what you want to do

stark remnant
short burrowBOT
stark remnant
#

is this what you mean?

#

Yup

#

I just found that on the meta

lethal carbon
#

🙏

stark remnant
#

you'll only have to do the conversion from ticks to hours

#

Yup, will do that

stark remnant
#

i have no texture or animation experience xD

#

Ah damn 😂

#

No worries I'll wait!

stark remnant
#

Hey, I seem to have an issue with schematics

#

Could someone letme know what I'm doing wrong?

stark remnant
#

😬

knotty hornet
#

Schematic file potdry does not exist. Are you sure it's in C:\Users\Dan10\OneDrive\Desktop\Server/plugins/Denizen/schematics/?

#

error Message: Schematic file potdry is not loaded

#

23:07:35 +- Queue 'FARMINGBOX_PLACEMENT_47542_SizedBefore' Executing: (line 21) if <context.location.block.above> matches air ---------+ 23:07:35 +> Executing 'IF': use_braces='true' 23:07:35 ERROR in script 'farmingbox_placement' in queue 'FARMINGBOX_PLACEMENT_47542_SizedBefore' while executing command 'IF' in file '\scripts\player\Crops\farming_new.dsc' on line '21' with player 'Danjoe3'! Error Message: Invalid context ID 'location'! 23:07:35 Additional Error Info: Tag-base 'context' returned null. 23:07:35 Additional Error Info: Tag <context.location.block.above> is invalid!

the reason this returned null is because:
on player right clicks block with:farmingbox

#

!event player clicks block

short burrowBOT
# knotty hornet !event player clicks block
Group

Player

**WARNING**

this event may in some cases double-fire, requiring usage of the 'ratelimit' command (like 'ratelimit <player> 1t') to prevent doubling actions.

Event Lines

player (right|left) clicks <block>

Switches

with:<item> to only process the event if a specified item was held.
using:hand/off_hand/either_hand to only process the event if the specified hand was used to click.
type:<material> to only run if the block clicked matches the material input.

Triggers

when a player clicks on a block or in the air.

Has Player

Always. - this adds switches flagged:<flag name> + permission:<node>, in addition to the <player> link.

Context

<context.item> returns the ItemTag the player is clicking with.
<context.location> returns the LocationTag the player is clicking on.
<context.relative> returns a LocationTag of the air block in front of the clicked block.
<context.click_type> returns an ElementTag of the Spigot API click type <@link url https://hub.spi...
<context.hand> returns an ElementTag of the used hand.

Has Known Location

True - this adds switches in:<area> + location_flagged:<flag name>.

Cancellable

True - this adds <context.cancelled> and determines cancelled + cancelled:false.

knotty hornet
#

oh it doesn't explain in the meta

#

if you click air, there is no location you're clicking

#

you'll need a fallback

#

!tag if_null

short burrowBOT
# knotty hornet !tag if_null

If the object is null (or the tag errors), this will return the input object.
If the object isn't null, the input won't be parsed, and the original object will be returned.
For example, "<player.if_null[<npc>]>" will return the player if there is a player, and otherwise will return the NPC.
This functions as a fallback - meaning, if the tag up to this point errors, that error will be hidden.

Returns

ObjectTag

knotty hornet
#

example usage;

- if !<context.location.if_null[null].is_truthy>:
  - narrate "the location context tag is invalid because the player is not clicking a block, theyre clicking off into the sky or something"```
knotty hornet
#

!cuboidtool

#

er

stark remnant
#

OOH

knotty hornet
#

!info list

short burrowBOT
# knotty hornet !info list
Available Info Names

Available info names: ask, thread, debug, scripts, channel, no_s, paste, pastelog, pasteconfig, pastejava, pastepom, citizensfree, getstarted, mcve, logs, restartlog, donate, timings, worksisnotcorrect, knowwhatyouknow, donttrim, cracks, skins, 1.8, plugin_conflict, guides, forum, hiring, clickcommands, iunderstand, tias, cantreadminds, faq, notspigot, toovague, xyproblem, seltool, npchealth, freeservers, forks, patchupdates, npcname, disablereplies, loadorder, piracy, crackedserver, crackedplugins, ancientversion, api, denizencitizens, invite, imnothome, leftclick, forumpostfaq, minimessage

stark remnant
#

ok i get it

#

yeye

knotty hornet
#

yeah lol

stark remnant
#

sorry for barging in

knotty hornet
#

was going to reference uh

#

it's okay

#

!seltool

short burrowBOT
knotty hornet
#

this script actually has that check as well for reference ^

#

well, kinda

#

it uses the legacy ||fallback method

#
    - define location <context.location||null>
    - if <[location].material.name||air> == air:
        - define location <player.cursor_on[30]||null>
        - if <[location].material.name||air> == air:
            - stop
#

<tag||invalid> is the same as <tag.if_null[invalid]>

loud glade
#

Can't seem to find that there? it uses fallacks, but not that weird combo - isn't that just exists?

knotty hornet
#

well, its kiind of the same concept, just more specific

#

<list.exists> is true, but it's not truthy

shut jewelBOT
knotty hornet
#

i think it's a good idea to check if it's truthy

#

i strayed so far from the original topic im so sorry lol

#

your problem is that the schematic isn't loaded

loud glade
#

I mean, yeah, but in that case it's a location - either way is_truthy is a fallback on it's own

#

I.e. no need for the extra if_null

knotty hornet
#

OH

#

you're right, im thinking of pre-defining it

#

eg;

- define location <context.location.if_null[null]>
- if !<[location].is_truthy>:
  - narrate "the location context tag is invalid because the player is not clicking a block, theyre clicking off into the sky or something"```
#

i added an extra step, my bad

#

^ this way <[location]> can be used again later in the script if it is truthy

loud glade
#

Also do note that you should be careful when using is_truthy like that - I.e. in a command script you may use it that way on an arg, and the player would specify 0 making it error although it's actually valid (vs just == null)

stark remnant
stark remnant
#

Well this is a place event, so they have a paper, they place the paper on a block (Like any normal block) and a schematic file loads in, and pastes

stark remnant
#

Basically wherever the player clicks that paper on a block, it triggers the schematic file and places it on the placed block

stark remnant
#

Still trying to figure this out 😬

loud glade
#

But either way, what's your actual issue currently? you pasted a script and explained what it does, but never said what's wrong

stark remnant
#

Well the schematic isn't showing up

stark remnant
#

But I loaded in the schematic, and it didn't seem to show up

#

The item gets taken away

#

I get the narrate tag

#

But the issue just shows up with the schematic

#

It doesn't seem to paste it

stark remnant
#

I read the dubug and thought it was because the schematic wasn't loaded

loud glade
#

schemtic load loads it in and keeps it in memory - server restarting wipes in-memory stuff ofc, but you don't need to load it in every time

stark remnant
#

I see

#

It doesn't place the schematic block, that's all

loud glade
#

!debug

short burrowBOT
# loud glade !debug
Info: 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!

stark remnant
stark remnant
#

I think I got it

#

But the schematic block isnt placing on the block the player taps on

loud glade
#

o.O did you delete the script?

#

But also, that looks like the schematic file just doesn't exist? are you sure it's in the right place?

stark remnant
#

But I think while copying the schematic, I made a mistake

#

How would one make sure that when the player places the block on THAT specific block, the schematic just pastes?

stark remnant
#

!c worldedit

short burrowBOT
# stark remnant !c worldedit
Required Plugins or Platforms

Depenizen, WorldEdit

Group

Depenizen

Syntax

worldedit [create_schematic/copy_to_clipboard/paste] (file:<file path>) (cuboid:<cuboid>) (position:<location>) (rotate:<#>) (undoable) (noair)

Short Description

Controls schematics and clipboards in WorldEdit.

Description

Controls schematics and clipboards in WorldEdit. You should almost always use !command schematic instead of this.

The action can be create_schematic, copy_to_clipboard, or paste.

For 'paste':
Specify 'noair' to exclude air blocks.
Specify 'rotate' to rotate the schematic when pasting it.
Specify 'undoable' to attach the paste to the player's WorldEdit history which allows them to undo/redo.

For 'copy_to_clipboard':
Specify either a cuboid or a file.
The file path starts in the folder: ...

stark remnant
#

How would one write the file path?

#

I know Denizen has a schematic section of their own, but like if I wanted to use world edit schematics then?

#

define filepath?

loud glade
#

Just... write it? file:path/to/file

short burrowBOT
# loud glade !c schematic
Group

world

Syntax

schematic [create/load/unload/rotate/save/flip_x/flip_y/flip_z/paste (fake_to:<player>|... fake_duration:<duration>) (noair) (mask:<material_matcher>)] [name:<name>] (filename:<name>) (angle:<#>) (<location>) (area:<area>) (delayed) (max_delay_ms:<#>) (entities) (flags)

Short Description

Creates, loads, pastes, and saves schematics (Sets of blocks).

Description

Creates, loads, pastes, and saves schematics. Schematics are files containing info about blocks and the order of those blocks.

Denizen offers a number of tools to manipulate and work with schematics.
Schematics can be rotated, flipped, pasted with no air, or pasted with a delay.

All schematic command usages must specify the "name" argument, which is a unique global identifier of the schematic in memory.
This will be created by "create" or "load" options, and persist in memory until "unload" is...

stark remnant
#

Oh my bad

loud glade
#

Oh the meta is a tad bit unclear there, but generally you'll put your schematics in plugins/Denizen/schematics

loud glade
loud glade
#

If you're having issues should

#

!info paste debug

short burrowBOT
#
Info: 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!

stark remnant
#

I got the schematic to paste, is there a way it needs to be saved? The schematic? Cuz when I click the block, it just moves a block back

#

Theres no error with the schematic, I think its the way I copied it?

#
        - if <context.location.block.above> matches air:
            - flag <context.location.above[1]> farmingbox:true
            - worldedit paste file:../../WorldEdit/schematics/potdry2 position:<context.location.above[1]> noair
            - take item:farmingbox from:<player> quantity:1
            - narrate "<&a>You've placed a Farming Box! Remember to water the Box."
        - determine cancelled```

I'm using worldedit schematic just to test all the schematics out
#

As I'm learning and would like to know all 😬

loud glade
# short burrow

I mean, as the meta there states itself ^, you should generally prefer the schematic command, unless you specifically need WorldEdit for some reason

stark remnant
#

For now, Im trying to use worldedit

stark remnant
stark remnant
#

Just figured this out

stark remnant
#

Hey there, came back after a few days of testing. I wanted to know if this type of script would be right? Basically im trying to check if the corn has these basic necessities for it to grow at 7 am (1000 ticks) in the minecraft world-> the farmbox flag, the watered flag and the corn flag, all are location flags. Once its found, it grows to the next stage of the crop. I wanted to know if this sort of format would be right? The crops are being spawned with an invis armor stand with the texture on their head.

https://paste.denizenscript.com/View/111475

The case is basically flagged like corn:stage1 corn:stage2 and so on

dusk bear
# stark remnant Hey there, came back after a few days of testing. I wanted to know if this type ...

there are a few things that could be changed from a quick look.

  1. using <context.location.blocks_flagged[corn]> will not match the other cases and therefore always fail. this is because the blocks_flagged tag returns a list of locations, not the actual flag values. you'll have to loop through each location and get the location's flag value for this to work as intended
  2. you can't determine passively cancelled this event. you can just remove the whole else block because it won't do anything else if the farming box does not have the watered flag.
#

also i just noticed that the time changes in world event does not have a <context.location>

stark remnant
stark remnant
#

Oops I'm really sorry for the ping! I forgot to remove the last ping!!

dusk bear
#

No worries haha I don’t mind pings

stark remnant
#

Could I possibly know how one could trigger an event based on world time? The event im currently using is

#

!e time changes

short burrowBOT
# stark remnant !e time changes
Group

World

Event Lines

time changes (in <world>) time <0-23> (in <world>)

Triggers

when the current time changes in a world (once per mine-hour).

Context

<context.time> returns the current time (the hour, as a number from 0 to 23).
<context.world> returns the world.

stark remnant
#

after time 7 in world

#

But that script seems to be running at random times, but also at 7am

#

7 AM which is 1000 ticks

lethal carbon
#

!e delta time

short burrowBOT
# lethal carbon !e delta time
Group

Core

Event Lines

delta time hourly|minutely|secondly

Switches

every:<count> to only run the event every *count* times (like "on delta time secondly every:5" for every 5 seconds).

Triggers

every <count> seconds, minutes, or hours of game calculation time. Default repetitions count of 1.
This is specifically based on the rate of time advancement in the game server,
which is not necessarily equivalent to the real passage of time (for example, this event may fire slower if the server is lagging).
For real time, see !event system time.

Context

<context.second> returns the exact delta time since system start.

lethal carbon
#

!e system time

short burrowBOT
# lethal carbon !e system time
Group

Core

Event Lines

system time <HH:MM> system time hourly|minutely|secondly

Switches

every:<count> to only run the event every *count* times (like "on system time secondly every:5" for every 5 seconds).

Triggers

when the system time changes to the specified value.
The system time is the real world time set in the server's operating system.
It is not necessarily in sync with the game server time, which may vary (for example, when the server is lagging).
For events based on in-game time passage, use !event delta time or !command wait.

Context

<context.hour> returns the exact hour of the system time.
<context.minute> returns the exact minute of the system time.

Examples
on system time hourly:
- announce "Whoa an hour passed!"
on system time 12:00:
- announce "Whoa it's noon!"
on system time 03:00:
- announce "Daily restart in 5 minutes!"
- wait 5m
- adjust server restart
stark remnant
lethal carbon
#

oh then i believe the event you

#

oop hit enter too soon

#

lol

stark remnant
#

It'll run hourly itself

lethal carbon
#

for specific game hour time

#

i believe

#

!e time changes

short burrowBOT
# lethal carbon !e time changes
Group

World

Event Lines

time changes (in <world>) time <0-23> (in <world>)

Triggers

when the current time changes in a world (once per mine-hour).

Context

<context.time> returns the current time (the hour, as a number from 0 to 23).
<context.world> returns the world.

stark remnant
#

I've tried that

lethal carbon
#

time <0-23> (in <world>)

stark remnant
#

Which is why I've kept the debug above too

#

It runs on random times

#

The event just fires at like 3:15 PM or something else

lethal carbon
#

ah my bad, unsure you'd have to wait for someone more knowledgable

stark remnant
#

No problemo, thank you so much though! ♥️

somber patrol
#

Do you have multiple worlds on your server? Actually you do, because there's the nether and the end. You should specify which world you want the event to trigger for. So you'd add in <world_name>, and obviously replace with whatever your overworld's world name is.

#

And if that isn't fixing it for you, then you'll need to paste a true debug. You should add in a debug line for both <context.time> and <context.world>, so we can see in the debug when it's actually triggering, and where it's triggering for. You'll want to capture the "buggy" time as well, so leave the debug running until it triggers when it's not supposed to.

stark remnant
stark remnant
#

Oops!! I'm sorry for the ping!

loud glade
#

!object WorldTag

short burrowBOT
# loud glade !object WorldTag

A WorldTag represents a world on the server.

This object type is flaggable.
Flags on this object type will be stored in the world folder in a file named 'denizen_flags.dat', like "server/world/denizen_flags.dat".

Prefix

w

Base Type

ElementTag

Implements

FlaggableObject

Format

The identity format for worlds is the name of the world it should be associated with.
For example, to reference the world named 'world1', use simply 'world1'.
World names are case insensitive.

loud glade
#

"world" plaintext: always matches.

#

It's firing for every world, you can use something like world flags with world_flagged instead

cursive flameBOT
#
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.)

#

@stark remnant