#(Joshie) Global speed up of all crop growth during 'summer' event?

98 messages · Page 1 of 1 (latest)

ornate anchor
#

Working on a seasons system and wondering the best way to globally increase planted crops by 1.5x? so 50% faster than usual.

I 'believe' it's set by the tick speed so i'm a little worried how i'm going to achieve this without noting every single planted crop during the event lol.

Thanks!

autumn latchBOT
#

(Joshie) Global speed up of all crop growth during 'summer' event?

autumn latchBOT
#

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>

weary lynx
#

there's a gamerule for this

ornate anchor
#

Specifically for crops :0

weary lynx
#

it might affect more things than you want to? should check mc's wiki to see that

ornate anchor
#

Yeah i assumed it was just tickspeed

weary lynx
ornate anchor
#

randomtickspeed

#

Yeah it speeds up everything

weary lynx
#

dang

ornate anchor
#

Hold on. couldn't i listen for a grow event and jump through stages quicker?

#

So it goes from 1-3 etc

#

!c growth

ivory sandalBOT
#
Possible Confusion

Did you mean to search for glow?

#
Possible Confusion

Did you mean to search for mechanism group?

ornate anchor
#

hum

#

!e grow

ivory sandalBOT
# ornate anchor !e grow
Cannot Specify Searched Event

Multiple possible events: block grows, sheep regrows wool, structure/plant grows.

ornate anchor
#

!e plant grows

ivory sandalBOT
# ornate anchor !e plant grows
Group

World

Event Lines

<structure/plant> grows (naturally) <structure/plant> grows from bonemeal

Triggers

when a structure (a tree or a mushroom) grows in a world.

Has Player

when a player caused the structure growth to occur (eg with bonemeal). - this adds switches flagged:<flag name> + permission:<node>, in addition to the <player> link.

Context

<context.world> returns the WorldTag the structure grew in.
<context.location> returns the LocationTag the structure grew at.
<context.structure> returns an ElementTag of the structure's type. Refer to <@link url https://hub...
<context.blocks> returns a ListTag of all block locations to be modified.
<context.new_materials> returns a ListTag of the new block materials, to go with <context.blocks>.

Has Known Location

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

Cancellable

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

ornate anchor
#

Yeah this could work i think

#
    when a structure (a tree or a mushroom) grows in a world.
#

crap

#

oh

#

!c block grows

ivory sandalBOT
# ornate anchor !c block grows
Cannot Specify Searched Command

Multiple possible commands: CopyBlock, BlockCrack, DebugBlock, ShowFake, AdjustBlock, ModifyBlock, ModifyBlock.

#
Possible Confusion

Did you mean to search for mechanism lock?

ornate anchor
#

!e block grows

ivory sandalBOT
# ornate anchor !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.

ornate anchor
#

This seems to do what i want bu wondering if there is any downsides

#

It doesn't throw an error either if that plant doesn't have that high of a growth age

#

so i think this does what I need.

#

I need to learn how to use cases lol

#

Wait should i cancel the original age too? so it doesnt have to fire it twice?

#

Cuz it turns 1 and THEN 2.. which is pointless if it's going to end up 2 in a microsecond

mystic flame
#

i feel like there is a much easier way to do that instead of having a lot of if and else ifs. it looks as if the age will just increment by one each time right? if so, just set the age to the current age plus one. so something like adjustblock <context.location> age:<context.material.age.add[1]> or something like that

ornate anchor
#

Oooh

#

Wait so

#

If age = anything but maximum age?

#

then adjust age:<context.material.age.add[1]>

#

Is there a maximum tag that works with age?

#

Thanks bread i knew there was obviously a better way lol

#

Wait this is invalid use of an operator isnt it

mystic flame
#

!=

ornate anchor
#

Yeah i thought so

#

thats always tripped me up

mystic flame
#

don't worry about it haha

#

i still do it sometimes by accident 👀

ornate anchor
#

I can't believe i was thinking about noting areas of plants and everything but this did it

#

lel

#

I'm not 100% sure it's working though

#

How can i narrate the old age?

#

Just define before the adjust?

#

Will that work?

#

I assume it would

#

Oddly it doesnt

#

Well either it does and the code isnt working or it doesnt

#

lol

mystic flame
#

i don't think <context.material.age.max> works the way you think

#

i think you want

ornate anchor
#

Yeah i dont think so either lol

mystic flame
#

!t materialtag.maximum_age

ivory sandalBOT
ornate anchor
#

okay yeah thats fixed but

#

i still cant narrate the old and new age

#

just so i can check it's actually working lmao

#

im defining old age before the adjust so that should be the old age right?

#

It's always the same number rn

#

How is an adjustblock changing a definition thats been set before it happened lol

#

After something grows.

Define it's current age as 'oldage'

if it's age now is less than it's maximum age
determine it's growth cancelled passively
then adjust it's age to +1 of what it was going to grow to
then announce the old age and the current age.

#

Eh i added a wait anyway can see it working that way lol

#

This determine wont work though

#

it still grows when i first bone meal it

#

and then 1s later it adds 1

#

I'm trying to determine it cancelled just to stop the event needing to be processed as it's unneeded if it's going to grow another '1' anyway

cold cape
fallow chasm
#

!lang on vs after

ivory sandalBOT
#
Possible Confusion

Did you mean to search for script event after vs on?

ivory sandalBOT
# fallow chasm !lang on vs after

Modern ScriptEvents let you choose between "on" and "after".
An "on" event looks like "on player breaks block:" while an "after" event looks like "after player breaks block:".

An "on" event fires *before* the event actually happens in the world. This means some relevant data won't be updated
(for example, "<context.location.material>" would still show the block type that is going to be broken)
and the result of the event can be changed (eg the event can be cancelled to stop it from actually going through).

An "after" event, as the name implies, fires *after* the event actually happens. This means data will be already updated to the new state
(so "<context.location.material>" would now show air) but could potentially contain an arbitrary new state from unrelated changes
(for example "<con...

Group

Script Events

gleaming fableBOT
#
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.)

#

@ornate anchor