Advertisement
Svely

Anni Ender furnace

Jun 9th, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.02 KB | None | 0 0
  1. variables:
  2. {EnderFurnaceX} = 1000000
  3. {EnderFurnaceY} = 200
  4. {EnderFurnaceZ} = 1000000
  5. {FurnaceLoc.%player%} = 0
  6. command /enderfurnace [<text>]:
  7. trigger:
  8. loop 1 times:
  9. if arg 1 is not set:
  10. #if player doesnt have a ender furnace
  11. if {EnderFurnace.%player%} is not set:
  12. set block at the location ({EnderFurnaceX}, {EnderFurnaceY}, {EnderFurnaceZ}) to furnace
  13. set block at the location ({EnderFurnaceX}+1, {EnderFurnaceY}, {EnderFurnaceZ}) to furnace
  14. set {EnderFurnace.%player%} to location of block at the location ({EnderFurnaceX}, {EnderFurnaceY}, {EnderFurnaceZ})
  15. if {EnderFurnaceX} is less than 1000300:
  16. add 3 to {EnderFurnaceX}
  17. else:
  18. set {EnderFurnaceX} to 1000300
  19. if {EnderFurnaceZ} is less than 1000300:
  20. add 2 to {EnderFurnaceZ}
  21. else:
  22. set {EnderFurnaceZ} to 1000000
  23. add 1 to {EnderFurnaceY}
  24. open the inventory of the block at {EnderFurnace.%player%} to the player
  25. else:
  26. open the inventory of the block at {EnderFurnace.%player%} to the player
  27. #open other player's ender furnace
  28. else:
  29. #if player already has a ender furnace
  30. if {EnderFurnace.%arg 1%} is set:
  31. open the inventory of the block at {EnderFurnace.%arg 1%} to the player
  32. #set a furnace at a location
  33. else:
  34. set block at the location ({EnderFurnaceX}, {EnderFurnaceY}, {EnderFurnaceZ}) to furnace
  35. set block at the location ({EnderFurnaceX}+1, {EnderFurnaceY}, {EnderFurnaceZ}) to furnace
  36. set {EnderFurnace.%arg 1%} to location of block at the location ({EnderFurnaceX}, {EnderFurnaceY}, {EnderFurnaceZ})
  37. if {EnderFurnaceX} is less than 1000300:
  38. add 3 to {EnderFurnaceX}
  39. else:
  40. set {EnderFurnaceX} to 1000300
  41. if {EnderFurnaceZ} is less than 1000300:
  42. add 2 to {EnderFurnaceZ}
  43. else:
  44. set {EnderFurnaceZ} to 1000000
  45. add 1 to {EnderFurnaceY}
  46. open the inventory of the block at {EnderFurnace.%arg 1%} to the player
  47. #fuel slot storage
  48. #on click of fuel slot:
  49. # broadcast "a player is trying to store item to fuel slot"
  50. on click on furnace:
  51. set {FurnaceLoc.%event-player%} to location of clicked block
  52. if {FurnaceLoc.%event-player%} = {BlueFurnaceLoc}:
  53. if {team.red.%player%} is true:
  54. cancel event
  55. make player execute command "/enderfurnace"
  56. message "&5This is your team's Ender Furnace. Anything you place here to be smelted will be safe from any of your teamates and enemies."
  57. if {FurnaceLoc.%event-player%} = {RedFurnaceLoc}:
  58. if {team.red.%player%} is true:
  59. cancel event
  60. make player execute command "/enderfurnace"
  61. message "&5This is your team's Ender Furnace. Anything you place here to be smelted will be safe from any of your teamates and enemies."
  62.  
  63. on break of furnace:
  64. if location of event-block is {BlueFurnaceLoc}:
  65. cancel event
  66. if location of event-block is {RedFurnaceLoc}:
  67. cancel event
  68.  
  69. on right click with any dye:
  70. if event-item is lapis lazuli:
  71. if target block is furnace:
  72. set event-block to {RedFurnaceLoc}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement