#(Scta) Falling Trees - polishing code

31 messages · Page 1 of 1 (latest)

next glade
#

https://paste.denizenscript.com/View/139147
when you break the log of a tree (precisely a log which is connected to dirt) the entire tree turns to falling blocks which slowly tip over before finaly falling to the ground and turning to items.
the code is very ugly tho and im asking for help to make it clean enough for #showcase

oak thicketBOT
#

(Scta) Falling Trees - polishing code

glossy islandBOT
oak thicketBOT
#

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.

zinc dune
pale flumeBOT
zinc dune
#

Firstly.

#

What is that indenting in your first script container.

next glade
#

probably happend durting pasting

zinc dune
#

Why context.material matches instead of on player breaks *_log?

next glade
#

cause it had a diffrent filter at first

#

ill change it

#

and it cant be log cause of stripped logs

#

i need regex for that which i dont know
it needs to be all logs which are not stripped

zinc dune
#

Could keep *_log in the script event matcher, but make it ignore striped in the if logic.

next glade
#

good idea

zinc dune
#

Also.

next glade
#

also i forgot a part

#

ill paste the new script

zinc dune
#

You're running through coordinate additions to fell the log I see.

#

This might be highly unnecessary.

#

Consider:

#

!t locationtag.flood_fill

pale flumeBOT
# zinc dune !t locationtag.flood_fill

Returns the set of all blocks, starting at the given location,
that can be directly reached in a way that only travels through blocks of the same type as the starting block.
For example, if starting at an air block inside an enclosed building, this will return all air blocks inside the building (but none outside, and no non-air blocks).
As another example, if starting on a block of iron_ore in the ground, this will find all other blocks of iron ore that are part of the same vein.
This will not t...

Group

world

Returns

ListTag(LocationTag)

next glade
#

but it needs to break diagonal blocks too

zinc dune
#

Ah.

#

I didn't know you were doing that.

next glade
#

would using both boost performance?

next glade