But this makes all blocks unbreakable. Also, you must be able to undo, so you should make an array with the original destroy times, and like if the command is /breakable 1 then: Block.setDestroyTime( 1, array[0]);, and of course with splitting the number from the command etc.
I get that, but may main point was that a hardness of 10000 is not unbreakable; -1 is.
0.1
-Will be adding command /breakable <id>
Use the command /unbreakable <id>
id = block id that you want
<spoiler>
-Stone(id = 1)
-Grass(id = 2)
-Dirt(id = 3)
-Cobblestone(id = 4)
-Oak Wood Plank(id = 5)
-Bedrock(id = 7)
-Sand(id = 12)
-Gravel(id = 13)
-Gold Ore(id = 14)
-Iron Ore(id = 15)
-Coal Ore(id = 16)
-Oak Wood(id = 17)
-Oak Leaves(id = 18)
-Sponge(id = 19)
-Glass(id = 20)
-Lapis Lazuli Ore(id = 21)
-Lapis Lazuli Block(id = 22)
-Sandstone(id = 24)
-White Wool(id = 35)
-Gold Block(id = 41)
-Iron Block(id = 42)
-Double Stone Slab(id = 43)
-Stone Slab(id = 44)
-Brick(id = 45)
-Tnt(id = 46)
-BookShelf(id = 47)
-Mossy Cobblestone(id = 48)
-Oak Wood Stairs(id = 53)
-Diamond Ore(id = 56)
-Diamond Block(id = 57)
-Crafting Table(id = 58)
-Soil(id = 60)
-Cobblestone Stairs(id = 67)
-Furnace(id = 61)
-Burning Furnace(id = 62)
-RedStone Ore(id = 73)
-Snow(id = 78)
-Ice(id = 79)
-Snow Block(id = 80)
-Clay(id = 82)
-Netherrack(id = 87)
-Glowstone(id = 89)
-Stone Brick(id = 98)
-Brick Stairs(id = 108)
-Stone Brick Stairs(id = 109)
-Nether Brick(id = 112)
-Oak Wood Slab(id = 126)
-Double Oak Wood Slab(id = 125)
-Spruce Wood Stairs(id = 134)
-Birch Wood Stairs(id = 135)
-Cobblestone Walls(id = 139)
-Quartz Block(id = 155)
-Quartz Stairs(id = 156)
-Hay Bale(id = 170)
-Block of Coal(id = 173)
</spoiler>
https://www.dropbox.com/s/n74n7arz9g5zywg/Unbreakable Block.jsAny forum mod can help change this topic to mods/tools??
<script src="" rel="noopener nofollow" target="_blank">https://apis.google.com/js/platform.js"></script>
if(cmd[0]=="unbreakable"){ if(cmd[1] >= 1 && cmd[1] <= 173){ Block.setDestroyTime(cmd[1],10000); } }?
for(i = 0; i < 256; 1++){ Block.setDestroyTime(i, -1); }Want GUI Templates? Done!
https://github.com/BeATz-UnKNoWN/ModPE_Scripts/wiki/ModPE-Script-Templates
P.S. Feel free to follow me so you know when I post "awesome" content and make the MCForums a brighter place (totally).
If you need to contact me you can either shoot a Kik message to beatz_unknown or send an email to [email protected]
I get that, but may main point was that a hardness of 10000 is not unbreakable; -1 is.
Want GUI Templates? Done!
https://github.com/BeATz-UnKNoWN/ModPE_Scripts/wiki/ModPE-Script-Templates
P.S. Feel free to follow me so you know when I post "awesome" content and make the MCForums a brighter place (totally).
If you need to contact me you can either shoot a Kik message to beatz_unknown or send an email to [email protected]
Your welcome!
Want GUI Templates? Done!
https://github.com/BeATz-UnKNoWN/ModPE_Scripts/wiki/ModPE-Script-Templates
P.S. Feel free to follow me so you know when I post "awesome" content and make the MCForums a brighter place (totally).
If you need to contact me you can either shoot a Kik message to beatz_unknown or send an email to [email protected]