#(nimsy) trying to create a "multitool" pic with a constant breaking speed on all materials

1 messages · Page 1 of 1 (latest)

thick iris
#

title

wraith ledgeBOT
#

(nimsy) trying to create a "multitool" pic with a constant breaking speed on all materials

wraith ledgeBOT
#

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>

thick iris
#

i figured there's two ways i can do it:

#
  1. just adjust all the block_strength of every single material on my map to the same number
#
  1. use math and somehow calculate the breaking speed based on the block you're breaking's block_strength and the potion effects (haste and fatigue) you have on you
desert rain
#

It's more direct to do the first one.

thick iris
#

yea but ive had some bad experience with adjusting materials

#

like it resets and shit

desert rain
#

You can also just fake the mining

thick iris
#

via blockcrack?

desert rain
#

It's basically

  1. Cancel the block click event
  2. block crack while holding left click
  3. Make block break after however long
thick iris
#

yea

desert rain
#

The only tricky part is determining left click. The way I did it was

thick iris
#

on player left clicks block

desert rain
#

That only fires for the inital click

#
on player animates:
   - flag player skillable.is_holding_left_click expire:3t
on player left clicks block flagged:!skillable.is_holding_left_click priority:-10:
   - flag player skillable.is_holding_left_click expire:1t```
faint barn
#

!t visual_pose

chrome kayakBOT
faint barn
#

there's a digging thing in there

desert rain
#

So on player left clicks block is the initial click. I give them a 1t flag, then use on animate to refresh the tag. On animate only ever seems to fire when you swing your arm, ie mining.

#

The pose thing might work too. Something like "while pose == digging"

#

you'll have to tias though

#

But defintely either set all materials, or just force all blocks to break at the same speed by overwriting vanilla mining mechanics.

thick iris
#

Because i also want to save the progress on the broken block

#

Ie you break a block halfway, it stays that way

#

Yo @desert rain what if I flagged the blocks with how much damage they’ve taken? Would that make the gamemode laggy for a 100 players constantly doing the same thing you think?

thick iris
#

also @desert rain is it guaranteed that the player clicks block event always fires before the animates event?

desert rain
#

Tbh, I have no idea. From using it, it seemed to.

thick iris
#

yea looks like it

desert rain
thick iris
#

ok cool ty

thick iris
#

wait hang on @desert rain i just got another idea

#

i could literally just use custom blocks for any of the blocks i wanna use

#

ie noteblocks

#

retextured

#

rip, setting the block as - blockcrack <[block]> progress:0 players:<server.online_players> doesn't seem to prevent the block from getting the break effect

#

im thinking of just switching the player between survival and adventure mode in that case

#

actually nvm that wouldn't work

thick iris
#

yo @desert rain how would i cancel/override any current blockcrack effects?

desert rain
#

!c blockcrack

chrome kayakBOT
# desert rain !c blockcrack
Group

player

Syntax

blockcrack [<location>] [progress:<#>] (stack) (players:<player>|...)

Short Description

Shows the player(s) a block cracking animation.

Description

You must specify a progress number between 1 and 10, where 1 is the first stage and 10 is the last.
To remove the animation, you must specify any number outside of that range. For example, 0.
Optionally, you can stack multiple effects

thick iris
#
fort_pic_handler:
  type: world
  debug: false
  events:

    on player animates ARM_SWING with:fort_pic flagged:fort.pic.block_target:
    - define block <player.flag[fort.pic.block_target]>
    - flag player fort.pic.block_target:<[block]> duration:3t

    #- if <[block].flag[health]> == -1:
      #- determine passively cancelled
    - blockcrack <[block]> progress:0 players:<server.online_players>

    - ratelimit <player> 1t

    on player clicks block type:!air:
    - stop if:<player.world.name.equals[fortnite_map].not>
    - determine passively cancelled
    - if <player.item_in_hand.script.name||null> == fort_pic:
      - define block <context.location>

      - flag player fort.pic.block_target:<[block]> duration:1t

      #flag the block health if it hasn't been set yet
      - if !<[block].has_flag[health]>:
        - define mat <[block].material.name>
        - define type <proc[get_material_type].context[<[mat]>]>

        #if it's not in the list of valid materials to return either wood, brick, or metal
        - if <[type]> == null:
          - define hp -1
        - else:
          - define hp <script[nimnite_config].data_key[materials.<[type]>.hp]>

        - flag <[block]> health:<[hp]>
#

this is what i have rn

desert rain
#

You should just be able to set it to 0

thick iris
#

i set it to 0 but it doesn't wokr

#

doesn't work as in the actual block cracking still happens

desert rain
#

Is the clicks block event firing?

thick iris
#

ye

#

fires once

#

(like its supposed to)

desert rain
#

!paste

chrome kayakBOT
desert rain
#

Or sorry, debug

thick iris
#

oops wrong thing

#

here's the pic

thick iris
#

there's not really any errors

desert rain
#

Turn debug true on, and try mining a block

thick iris
desert rain
#

Ya, idk. The initial (real) block crack effect is prevented by the on click block event. The event is getting cancelled, so idk why you'd still be seeing it. You shouldn't need to set the blockcrack to zero unless you're trying to clear out your own effect. What happens if you just have an event that does ```yaml
on player clicks block:

  • determine cancelled``` is the block crack still there?
#

Basically make an mcve

thick iris
#

but then cancels the breaking

#

basically does the same thing as

- determine cancelled
desert rain
#

What? I wonder if something changed. It used to not do that. Cheerleadra_shrug

desert rain
#

i dunno. can you have your players in adventure mode?

thick iris
#

sure yea

desert rain
#

cause that'll turn off regular mining

thick iris
#

but then id have to calculate what block they're looking at

#

<player.cursor_on> with the range thing

desert rain
#

Doesn't on click still fire?

thick iris
#

no

desert rain
#

gdmit thats annoying

thick iris
#

ikr

desert rain
#

still, that might be the solution

thick iris
#

right clicking does though

#

i have an idea

#

1 sec

#

bruh

#

doesn't work

#

tried doing

#
on player clicks block:
- change to adventure
on player stops damging block:
- change to survival
#

i mean it works, but when you change to adventure mid-break, it still lets you break the block for some reason

#

ok so @desert rain quick update, it seems like if the blockcrack of a block is greater than the state being broken, it stays the same

#

for example if i change the block's state to 9 and i mine it, it'll stay at 9 until i break it further than 9

thick iris
#

i thin i might just uhh

#

use noteblocks with custom textures

#

yo

#

nvm bruh this is so hard when i can't even cancel the original block breaking effect...

thick iris
#

Yo so @desert rain or any other helpers, is there no way to disappear/override any block crack effects?

spice widget
#

rule 3

thick iris
rotund sinew
#

oh mb

#

it worked for me

#

previously

thick iris
#

When

rotund sinew
#

uhh i dont remember i think during 1.18.2

#

nvm 1.19.3...

#

i think i didnt something else then

#

i had an issue where blockcrack would stay after the block was gone

thick iris
#

IM GONNA CRY

#

I TRIED TO MAKE PROGRESS ALL DAY AND THEN THIS IS THE ISSUE THAT PERSISTS 😭

thick iris
#

bruh

#

i just tried using the block_strength mech and it has no effect................................................. im so annoyed rn i think img enuienly losing my sanity

limpid pecan
#

Perhaps thinking outside of the box here, you could replace your blocks with mushroom blocks in different orientations, akin to some prison-esque maps, and using a resource pack to give them their own block texture.

thick iris
#

yea so im still stuck with this

#

and the thread keeps on closing on me bruh

spice widget
#

it's not closing, it's just getting hidden

rotund sinew
rotund sinew
#

honestly cant you just give them like 500 haste or something

#

and then make it so that you have to break that block over and over again

thick iris
#

like you're saying

#

give the block multiple "lives"?

rotund sinew
#

it also saves the hp over time too

#

so no need for blockcrack to update to 0

thick iris
#

you gave me an idea tho

#

i think i might just use slow digging depending on the type of material and that's it

rotund sinew
thick iris
#

¯_(ツ)_/¯

rotund sinew
#

thats a bit tight aint it

#

considering you dont have this yet

thick iris
#

ok @rotund sinew

rotund sinew
thick iris
#

things are going well except it seems like if i give the player fast digging 999 or smth the block breaking only registers when i click once and not hold left click

rotund sinew
thick iris
#

yea

rotund sinew
#

does determine cancel the block break not work?

thick iris
#

yea but it's bad if you can't hold left click

#

it ruins the immersion

rotund sinew
#

isnt mergu working on it with display entities

#

you can have custom blocks in that way no?

#

you dont even need texture packs

thick iris
#

not mergu

#

whatever, it's fine

#

i got it to work @rotund sinew

rotund sinew
#

how so

thick iris
#

got a netherite pick and gave it efficiency 999

#

now it's way too fast 💀

rotund sinew
#

wait that works

#

whats the difference?

thick iris
#

you can hold down left click and it'll still continue breaking the block after you place something front

rotund sinew
#

huh

thick iris
#

actually, even 5 is a bit much

#

efficieny 2 is perf

rotund sinew
#

nice

wet tuskBOT
#
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.)

#

@thick iris