Advertisement
mja00

Eh?

Jun 1st, 2017
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.27 KB | None | 0 0
  1. First I setup a two scoreboard objectives, BreakLog and BLOCKS. BreakLog is setup to increase by 1 every time a player breaks any type of log. BLOCKS counts how many of a certain type of block are around the player, in my case a 3x3x3 area, using two execute commands running on the player replacing leaves, in my case, with barriers and then back to leaves(this shows no flicker/glitching with the blocks). I setup BLOCKS to grab its info from the stats command, which is counting how many blocks the two execute commands are affecting, anything over 1 and the one side of the AND gate activated. The other side of the AND gate activates when a log is mined. Once the gate is true then another commandblock picks a random armor stand from a list of 10. Only 1 of the armor stands is above command blocks that cause damage to the player, giving mining a log a 1/10 chance of causing damage. The commandblock that picks the armor stand executes setblock ~ ~-2 ~ redstone_block which sets the block 2 blocks below the armor stand to a redstone block. This triggers command blocks. 9/10 of the armor stands just set BreakLog to 0 and remove the redstone block. The 1/10 one causes instant damage on the player, sends a message in chat and then does the same as the "null" blocks. That's about all it does.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement