Jump to content

Block regen


Skray

Recommended Posts

¬†This dosn't work. ūüėě I need some help.

on mine:

  if event-block is coal ore, iron ore, diamond ore, emerald ore, or stone

    cancel event

  else:

    clear the drops

    set event-block to event-block

    send "You can't mine that".

Link to comment
Share on other sites

What is it suppose to do it just looks like you are making it so everything can't be mined?

Edit: # I made you the script that I think you wanted.

on break:
    if event-block is coal ore or iron ore or diamond ore or emerald ore or stone:
        set event-block to event-block
    else:
        cancel event
        send "You can't mine that"

Edited by Thedukc
Misstake
Link to comment
Share on other sites

1 hour ago, Thedukc said:

What is it suppose to do it just looks like you are making it so everything can't be mined?

Edit: # I made you the script that I think you wanted.

on break:
    if event-block is coal ore or iron ore or diamond ore or emerald ore or stone:
        set event-block to event-block
    else:
        cancel event
        send "You can't mine that"

Nah, if you mine a block who isnt on the list it should be regened and the drop cleared. 

Link to comment
Share on other sites

Ok but what happens to the block that are on the list I'm confused at the point of the script? The script you made just makes it so you can't mine anything. Also I found errors in you're script.

 

Here's the corrected version:

on break:
    if event-block is coal ore or iron ore or diamond ore or emerald ore or stone
        cancel event
    else:
        clear the drops
        set event-block to event-block
        send "You can't mine that"    

Link to comment
Share on other sites

2 hours ago, Thedukc said:

Ok but what happens to the block that are on the list I'm confused at the point of the script? The script you made just makes it so you can't mine anything. Also I found errors in you're script.

 

Here's the corrected version:

on break:
    if event-block is coal ore or iron ore or diamond ore or emerald ore or stone
        cancel event
    else:
        clear the drops
        set event-block to event-block
        send "You can't mine that"    

Here is what gonna happen:

on break stone:    

if gamemode of player is survival:        

wait 3 ticks        

set event-block to bedrock        

wait 30 seconds        

set event-block to stone             

Link to comment
Share on other sites

2 hours ago, Thedukc said:

Ok but what happens to the block that are on the list I'm confused at the point of the script? The script you made just makes it so you can't mine anything. Also I found errors in you're script.

 

Here's the corrected version:

on break:
    if event-block is coal ore or iron ore or diamond ore or emerald ore or stone
        cancel event
    else:
        clear the drops
        set event-block to event-block
        send "You can't mine that"    

Or wait, what does "cancel event" means? Does that mean that the block wont get destroyed?

Link to comment
Share on other sites

6 minutes ago, Thedukc said:

No it cancel's the event of the action. If you break something or place something it will make it so it's like it never happened. You can also uncancel events.

 

So if you break a stone block it will just reaper?

Link to comment
Share on other sites

1 minute ago, Thedukc said:

Yes it will reappear without anything happening. 

Oh, okay! Thanks! Do you think this would work?

 

Blacklist: Stone, Iron ore

 

On break:

   If not {blacklist} contains event-block

     cancel event

 

on break coal ore:  

 player's world = "world":    

if gamemode of player is survival:      

 wait 3 ticks

       set event-block to bedrock

       wait 30 seconds

       set event-block to coal ore              

 

 

on break stone:  

 player's world = "world":    

if gamemode of player is survival:      

 wait 3 ticks

       set event-block to bedrock

       wait 30 seconds

       set event-block to stone          

Link to comment
Share on other sites

3 minutes ago, Thedukc said:

Yes if the spacing is good it should break the stone give you cobble stone and then make it bedrock for 30 seconds then turn it back to stone same with coal. 

Okay thanks!

But would this part work: 

 

Blacklist: Stone, Iron ore

 

On break:

   If not {blacklist} contains event-block

     cancel event

Edited by Skray
Fix
Link to comment
Share on other sites

This script simply wouldn't work. I've made you 2 scripts  that should work. If none of them fit your question reply and I'll try again :).

 

#First one

options:
    Blacklist: Stone and Iron ore

 

On break:
    if {@Blacklist} contains event-block:
        cancel event

 

#Second one

options:
    Blacklist: Stone and Iron ore

On break:
    if {@Blacklist} contains event-block:
        stop
    else:
        cancel event

 

Ps: I'm not the greatest scripter and i never will but this is the simplest way that I found to do this. 

 Hope this helps!

 

Edited by Thedukc
Grammar mistakes
  • Thanks 1
Link to comment
Share on other sites

11 minutes ago, Thedukc said:

This script simply wouldn't work. I've made you 2 a scripts  that should work. If none of them fit your question reply and I'll try again :).

 

#First one

options:
    Blacklist: Stone and Iron ore

 

On break:
    if {@Blacklist} contains event-block:
        cancel event

 

#Second one

options:
    Blacklist: Stone and Iron ore

On break:
    if {@Blacklist} contains event-block:
        stop
    else:
        cancel event

 

Ps: I'm not the greatest scripter and i never will but this is the simplest way that I found to do this. 

 Hope this helps!

 

Thank you! The second one was what I needed! Thanks so much! ūüėĄ

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


√ó
√ó
  • Create New...