Energyxxer

Enhanced Hoes CPM Project - Energyxxer

Jun 25th, 2016
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.61 KB | None | 0 0
  1. ::section config
  2. name: Enhanced Hoes
  3. enable-math:true
  4. shape: wall
  5. max-height: 6
  6.  
  7. import:
  8. #Relative Blocks (BETA TEST)
  9. yLuBwShx
  10. include-success:false
  11.  
  12. ::section settings
  13. # Edit the duplication chances per hoe tier (0-100%):
  14. #
  15. $shortcut chanceWood 5
  16. $shortcut chanceStone 10
  17. $shortcut chanceIron 20
  18. $shortcut chanceGold 30
  19. $shortcut chanceDiamond 55
  20. #
  21. #
  22. #
  23. #
  24. #
  25. #
  26. #
  27. #
  28. #
  29. #
  30. #
  31. #
  32. #
  33. #
  34. #
  35. #
  36. #
  37. #
  38. #
  39. #
  40.  
  41. ::section main
  42. $shortcut obj_count eh_count
  43. $shortcut obj_tier eh_hoeTier
  44. $shortcut obj_crowd eh_crowd
  45. $newline
  46. :R!: execute @e[type=Item] ~ ~ ~ scoreboard players tag @e[type=Item,r=0,c=1] add crop {Item:{id:minecraft:wheat},Age:0s,PickupDelay:10s}
  47.  
  48. #Fully Grown Items
  49. :MULTI:
  50. iterations: 1
  51. !i';beetroot
  52. execute @e[type=Item] ~ ~ ~ scoreboard players tag @e[type=Item,r=0,c=1] add crop {Item:{id:minecraft:%i},Age:0s,PickupDelay:10s}
  53.  
  54. #"Self" crop items (Dropped by partially-grown crops)
  55. :MULTI:
  56. iterations: 7
  57. !i';wheat_seeds,melon_seeds,pumpkin_seeds,beetroot_seeds,carrot,potato,nether_wart
  58. execute @e[type=Item] ~ ~ ~ scoreboard players tag @e[type=Item,r=0,c=1] add self_crop {Item:{id:minecraft:%i},Age:0s,PickupDelay:10s}
  59. scoreboard players tag @e[type=Item,tag=self_crop] add crop
  60. execute @e[type=ItemFrame] ~ ~ ~ scoreboard players tag @e[type=Item,tag=crop,r=1] remove crop
  61.  
  62. ::section anti_dupe_and_tiers
  63. :R!: execute @e[type=Item,tag=self_crop] ~ ~ ~ scoreboard players add @e[type=Item,tag=self_crop,dx=0] $s obj_crowd; 1
  64. entitydata @e[type=Item,tag=self_crop,score_$s obj_crowd;==1] {Tags:[]}
  65. scoreboard players reset @e[type=Item,score_$s obj_crowd;_min=1] $s obj_crowd;
  66. scoreboard players set @a $s obj_tier; 0
  67. :MULTI:
  68. iterations: 5
  69. !h';wooden,stone,iron,golden,diamond
  70. !v';1,2,3,4,5
  71. scoreboard players set @a $s obj_tier; %v {SelectedItem:{id:minecraft:%h_hoe}}
  72.  
  73. ::section tagging
  74. :R!:
  75. :MULTI:
  76. iterations:5
  77. !t';1,2,3,4,5
  78. !s';Wood,Stone,Iron,Gold,Diamond
  79. execute @a[score_$s obj_tier;==%t] ~ ~ ~ scoreboard players tag @e[tag=!noDuplicate,r=7,rym=0,ry=round(multiply(divide($s chance%s;,100),360))] add duplicate {Tags:["crop"]}
  80.  
  81. ::section duplicating
  82. :R!: scoreboard players set @e[type=Item,tag=duplicate] $s obj_count; 1 {Item:{Count:1b}}
  83. execute @e[type=Item,tag=duplicate] ~ ~ ~ particle happyVillager ~ ~ ~ 0.25 0.25 0.25 0 5
  84. entitydata @e[type=Item,tag=duplicate,score_$s obj_count;==1] {Item:{Count:2}}
  85. scoreboard players reset @e[type=Item,tag=duplicate] $s obj_count;
  86. entitydata @e[type=Item,tag=duplicate] {Tags:["noDuplicate"]}
  87. scoreboard players tag @e[type=Item,tag=crop] remove crop
  88. $newline
  89.  
  90. ::section uninstall
  91. :I: setblock ~ ~ ~ minecraft:sea_lantern
  92. :I!: scoreboard objectives remove $s obj_tier;
  93. scoreboard objectives remove $s obj_count;
  94. scoreboard objectives remove $s obj_crowd;
  95. tellraw @a ["\n\n",{"text":" Enhanced Hoes ","color":"red","bold":true},{"text":"by Energyxxer","color":"red","italic":true},{"text":"\n has been successfully uninstalled.","color":"dark_red","italic":true},"\n\n"]
  96. fill ~-7 ~-6 ~-1 ~1 ~1 ~3 air
  97.  
  98. ::section install
  99. :I!: $pos a set; tellraw @a ["\n\n",{"text":" Enhanced Hoes ","color":"aqua","bold":true},{"text":"by Energyxxer","color":"aqua","italic":true},{"text":"\n has been successfully installed.","color":"dark_aqua","italic":true},"\n\n"]
  100. scoreboard objectives add eh_count dummy Enhanced Hoes Item Count
  101. scoreboard objectives add eh_hoeTier dummy Enhanced Hoes Selected Hoe Tier
  102. scoreboard objectives add eh_crowd dummy Enhanced Hoes Item Crowd
  103. fill $pos a get; ~ ~1 ~ minecraft:quartz_block
  104. :I!: blockdata $pos a get; {auto:1b}
  105.  
  106. ::section after
  107. clone ~3 ~-2 ~ ~9 ~4 ~1 ~3 ~-1 ~-1 replace move
  108. fill ~3 ~-1 ~-1 ~8 ~4 ~1 minecraft:sea_lantern 0 replace minecraft:air
  109. fill ~2 ~-2 ~-1 ~9 ~5 ~1 minecraft:quartz_block 0 replace minecraft:air
  110. fill ~2 ~-2 ~ ~9 ~5 ~ minecraft:stained_hardened_clay 9 replace minecraft:quartz_block
  111. fill ~3 ~-1 ~-2 ~8 ~4 ~2 minecraft:stained_glass 9 replace minecraft:air
  112. fill ~3 ~-2 ~-2 ~8 ~5 ~2 minecraft:quartz_block 0 replace minecraft:air
  113. fill ~3 ~-1 ~ ~8 ~-1 ~ minecraft:redstone_block 0 replace minecraft:sea_lantern
  114. setblock ~6 ~ ~ minecraft:redstone_block 0 replace minecraft:sea_lantern
  115. setblock ~7 ~ ~ minecraft:wool 14
  116. fill ~3 ~-1 ~1 ~8 ~-1 ~1 minecraft:redstone_lamp 0 replace minecraft:sea_lantern
  117. #ON
  118. setblock ~6 ~1 ~ minecraft:command_block 0 _ {Command:blockdata ~ ~ ~ {Command:tellraw @a [{"text":" Enhanced Hoes have been ","color":"gold"},{"text":"ENABLED","color":"green","bold":true}]}}
  119. #OFF
  120. setblock ~7 ~1 ~ minecraft:command_block 0 _ {Command:tellraw @a [{"text":" Enhanced Hoes have been ","color":"gold"},{"text":"DISABLED","color":"red","bold":true}]}
  121. setblock ~5 ~2 ~ minecraft:repeating_command_block 0 _ {auto:1b,Command:"setblock ~-4 ~1 ~ minecraft:wall_sign 4 _ {Text1:\"{\\\"text\\\":\\\"\\\"}\",Text2:\"{\\\"text\\\":\\\"Enhanced Hoes\\\",\\\"color\\\":\\\"dark_blue\\\",\\\"bold\\\":true}\",Text3:\"{\\\"text\\\":\\\"by Energyxxer\\\",\\\"color\\\":\\\"blue\\\",\\\"italic\\\":true,\\\"clickEvent\\\":{\\\"action\\\":\\\"run_command\\\",\\\"value\\\":\\\"/tellraw @p [\\\\\\\" \\\\\\\",{\\\\\\\"text\\\\\\\":\\\\\\\"[Link to YouTube channel]\\\\\\\",\\\\\\\"color\\\\\\\":\\\\\\\"red\\\\\\\",\\\\\\\"hoverEvent\\\\\\\":{\\\\\\\"action\\\\\\\":\\\\\\\"show_text\\\\\\\",\\\\\\\"value\\\\\\\":\\\\\\\"Click to open\\\\\\\"},\\\\\\\"clickEvent\\\\\\\":{\\\\\\\"action\\\\\\\":\\\\\\\"open_url\\\\\\\",\\\\\\\"value\\\\\\\":\\\\\\\"http://youtube.com/user/Energyxxer\\\\\\\"}},\\\\\\\"\\n \\\\\\\",{\\\\\\\"text\\\\\\\":\\\\\\\"[Link to Website]\\\\\\\",\\\\\\\"color\\\\\\\":\\\\\\\"gold\\\\\\\",\\\\\\\"hoverEvent\\\\\\\":{\\\\\\\"action\\\\\\\":\\\\\\\"show_text\\\\\\\",\\\\\\\"value\\\\\\\":\\\\\\\"Click to open\\\\\\\"},\\\\\\\"clickEvent\\\\\\\":{\\\\\\\"action\\\\\\\":\\\\\\\"open_url\\\\\\\",\\\\\\\"value\\\\\\\":\\\\\\\"http://energyxxer.com\\\\\\\"}}]\\\"}}\",Text4:\"{\\\"text\\\":\\\"\\\"}\"}"}
  122. setblock ~5 ~1 ~ minecraft:repeating_command_block 0 _ {auto:1b,Command:"setblock ~-4 ~1 ~ minecraft:wall_sign 4 _ {Text1:\"{\\\"text\\\":\\\"==========\\\",\\\"color\\\":\\\"blue\\\",\\\"bold\\\":true,\\\"strikethrough\\\":true,\\\"clickEvent\\\":{\\\"action\\\":\\\"run_command\\\",\\\"value\\\":\\\"fill ~2 ~-3 ~ ~7 ~-2 ~ minecraft:glass 0 replace minecraft:wool\\\"}}\",Text2:\"{\\\"text\\\":\\\"Toggle\\\",\\\"color\\\":\\\"blue\\\",\\\"bold\\\":true,\\\"clickEvent\\\":{\\\"action\\\":\\\"run_command\\\",\\\"value\\\":\\\"fill ~2 ~-3 ~ ~7 ~-2 ~ minecraft:wool 14 replace minecraft:redstone_block\\\"}}\",Text3:\"[\\\"\\\",{\\\"text\\\":\\\"ON\\\",\\\"color\\\":\\\"green\\\"},\\\"/\\\",{\\\"text\\\":\\\"OFF\\\",\\\"color\\\":\\\"dark_red\\\"}]\",Text4:\"{\\\"text\\\":\\\"==========\\\",\\\"color\\\":\\\"blue\\\",\\\"bold\\\":true,\\\"strikethrough\\\":true,\\\"clickEvent\\\":{\\\"action\\\":\\\"run_command\\\",\\\"value\\\":\\\"fill ~2 ~-3 ~ ~7 ~-2 ~ minecraft:redstone_block 0 replace minecraft:glass\\\"}}\"}"}
  123. setblock ~5 ~ ~ minecraft:repeating_command_block 0 _ {auto:1b,Command:"setblock ~-4 ~ ~ minecraft:wall_sign 4 _ {Text1:\"{\\\"text\\\":\\\"==========\\\",\\\"color\\\":\\\"dark_red\\\",\\\"bold\\\":true,\\\"strikethrough\\\":true,\\\"clickEvent\\\":{\\\"action\\\":\\\"run_command\\\",\\\"value\\\":\\\"blockdata ~7 ~ ~-1 {auto:1b}\\\"}}\",Text2:\"{\\\"text\\\":\\\" /!\\\\\ \\\",\\\"color\\\":\\\"red\\\",\\\"bold\\\":true}\",Text3:\"{\\\"text\\\":\\\"Uninstall\\\",\\\"color\\\":\\\"red\\\",\\\"bold\\\":true}\",Text4:\"{\\\"text\\\":\\\"==========\\\",\\\"color\\\":\\\"dark_red\\\",\\\"bold\\\":true,\\\"strikethrough\\\":true}\"}"}
Add Comment
Please, Sign In to add comment