Advertisement
Zeldaboy111

Ingots & Meer ]|[ Skript #355

Oct 15th, 2020
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 20.28 KB | None | 0 0
  1. #multiblock structure
  2. #rename function
  3.  
  4. #requires: SkQuery, SkRayFall, Skellett, SkBee, TuSKe
  5.  
  6.  
  7. options:
  8. logo: &6&lBS&8:&7
  9.  
  10. function updateItemInSlot(furnaceId: Location, type: String, slot: Number, furnaceTier: String, typeId: integer):
  11. set {_typeLower} to {_type} in lower case
  12. loop {inventoryList.%{_furnaceId}%.furnace%{_furnaceTier}%::*}:
  13. set slot {_slot} of loop-value's current inventory to ("%{furnace%{_typeId}%.%{_furnaceId}%.contents.%{_typeLower}%}% %{furnace%{_typeId}%.%{_furnaceId}%.contents.%{_typeLower}%Type}%" parsed as an item)
  14. if {furnace%{_typeId}%.%{_furnaceId}%.contents.%{_typeLower}%} <= 0:
  15. set slot {_slot} of loop-value's current inventory to lime stained glass pane named "&a&l%{_type}%"
  16.  
  17. function updateItemAndRemoveFromLoop(p: Player, item: Item, slot: Number, furnaceTier: Integer, furnaceTierString: String, itemName: String):
  18. set {_nameLower} to {_itemName} in lower case
  19. set {_p}'s cursor slot to {_item}
  20. set {furnace1.%{inventory.%{_p}%.current}%.contents.%{_nameLower}%} to 0
  21. delete {furnace1.%{inventory.%{_p}%.current}%.contents.%{_nameLower}%Type}
  22. set slot ({_slot}) of {_p}'s current inventory to lime stained glass pane named "&a&l%{_itemName}%"
  23. if {_nameLower} is "ore" or "fuel":
  24. resetFuelIndicator({inventory.%{_p}%.current}, {_furnaceTierString})
  25.  
  26. #Coal and inventory click
  27.  
  28. function updateInventoryFuelIndicator(furnaceId: Location, progressBar: Integer, furnaceTier: String):
  29. if {_progressBar} <= 4:
  30. if {_progressBar} >= 0:
  31. loop {inventoryList.%{_furnaceId}%.furnace%{_furnaceTier}%::*}:
  32. set slot 20+{_progressBar} of loop-value's current inventory to gray stained glass pane named "&f%20*({_progressBar}+1)%%%"
  33. if {_progressBar} > 0:
  34. set slot 20+{_progressBar}-1 of loop-value's current inventory to lime stained glass pane named "&f%20*{_progressBar}%%%"
  35. loop 4-{_progressBar} times:
  36. set slot 25-loop-value-2 of loop-value-1's current inventory to dark gray stained glass pane named "&f%100 - 20*((loop-value-2)-1)%%%"
  37.  
  38. function resetFuelIndicator(furnaceId: Location, furnaceTier: String):
  39. set {furnace1.%{_furnaceId}%.smeltTime} to 0
  40. loop {inventoryList.%{_furnaceId}%.furnace%{_furnaceTier}%::*}:
  41. loop 5 times:
  42. set slot 19 + loop-value-2 of loop-value-1's current inventory to gray stained glass pane named "&f%20*loop-value-2%%%"
  43. if {_furnaceTier} is " I":
  44. removeFurnaceFromLoop({_furnaceId}, 1)
  45. else:
  46. removeFurnaceFromLoop({_furnaceId}, 2)
  47.  
  48. function setIngotType(furnaceId: Location, tier: Number):
  49. delete {furnace%{_tier}%.%{_furnaceId}%.contents.ingotType}
  50. if {furnace%{_tier}%.%{_furnaceId}%.contents.ingotType} is set:
  51. stop
  52. set {_type} to "%{furnace%{_tier}%.%{_furnaceId}%.contents.oreType}%"
  53. if {_tier} is 2:
  54. if {_type} is "diamond ore", "emerald ore" or "nether quartz ore":
  55. replace all " ore" in {_type} with ""
  56. set {furnace2.%{_furnaceId}%.contents.ingotType} to {_type} parsed as an item
  57. stop
  58. if {_type} is "iron ore", "gold ore", "lapis ore", "redstone ore" or "coal ore":
  59. replace "ore" in {_type} with "ingot"
  60. set {furnace%{_tier}%.%{_furnaceId}%.contents.ingotType} to {_type} parsed as an item
  61.  
  62. function removeFurnaceFromLoop(furnaceId: Location, typeId: integer):
  63. delete {furnace.%{_furnaceId}%.isAddedToLoop}
  64. remove {_furnaceId} from {furnace%{_typeId}%.loopList::*}
  65.  
  66.  
  67. function loop_furnace1():
  68. set {furnace1.looping} to false
  69. if {furnace1.looping} is not true:
  70. set {furnace1.looping} to true
  71. while {furnace1.looping} is true:
  72. if size of {furnace1.loopList::*} is 0:
  73. set {furnace1.looping} to false
  74. stop loop
  75. else:
  76. loop {furnace1.loopList::*}:
  77. if {furnace1.%loop-value%.contents.ore} < 1:
  78. updateInventoryFuelIndicator(loop-value, 0, " I")
  79. removeFurnaceFromLoop(loop-value, 1)
  80.  
  81. else:
  82. if {furnace1.%loop-value%.contents.fuelingTime} is not set:
  83. remove 1 from {furnace1.%loop-value%.contents.fuel}
  84. updateItemInSlot(loop-value, "Fuel", 40, " I", 1)
  85.  
  86. add 1 to {furnace1.%loop-value%.smeltTime}
  87. add 1 to {furnace1.%loop-value%.fuelingTime}
  88. if "%{furnace1.%loop-value%.smeltTime}/2.0%" doesn't contain ".":
  89. if {furnace1.%loop-value%.smeltTime}/2 > 4:
  90. updateInventoryFuelIndicator(loop-value, 0, " I")
  91. else:
  92. updateInventoryFuelIndicator(loop-value, "%{furnace1.%loop-value%.smeltTime}/2%" parsed as an integer, " I")
  93. if {furnace1.%loop-value%.smeltTime} > 9:
  94. delete {furnace1.%loop-value%.smeltTime}
  95. remove 1 from {furnace1.%loop-value%.contents.ore}
  96. add 1 to {furnace1.%loop-value%.contents.ingot}
  97. setIngotType(loop-value, 1)
  98. updateItemInSlot(loop-value, "Ore", 38, " I", 1)
  99. updateItemInSlot(loop-value, "Ingot", 42, " I", 1)
  100. updateInventoryFuelIndicator(loop-value, 0, " I")
  101.  
  102.  
  103. if {furnace1.%loop-value%.fuelingTime} >= {furnace1.%Loop-value%.fuelingTimeMax}:
  104. if {furnace1.%loop-value%.contents.fuel} <= 0:
  105. delete {furnace1.%loop-value%.smeltTime}
  106. removeFurnaceFromLoop(loop-value, 1)
  107. updateInventoryFuelIndicator(loop-value, 0, " I")
  108. else:
  109. delete {furnace1.%loop-value%.fuelingTime}
  110. wait 1 second
  111.  
  112. #function loop_furnace2():
  113. #if {furnace2.looping} is not true
  114.  
  115. # Returns how many ticks an item gives fuel
  116. function getFuelingTime(type: Item) :: integer:
  117. if {_type} is lava:
  118. return 20000
  119. else if {_type} is block of coal:
  120. return 16000
  121. else if {_type} is dried kelp block:
  122. return 4000
  123. else if {_type} is blaze rod:
  124. return 2400
  125. else if {_type} is coal or charcoal:
  126. return 1600
  127. else if {_type} is any boat or scaffolding:
  128. return 1200
  129. else if {_type} is any log or any planks or any wood slab or oak wood stairs or spruce wood stairs or birch wood stairs or jungle wood stairs or acacia wood stairs or dark oak wood stairs or any wooden button or any wooden trapdoor or any fence gate or any fence or ladder or crafting table or cartography table or fletching table or smithing table or loom or bookshelf or lectern or composter or chest or trapped chest or barrel or daylight detector or jukebox or note block or red mushroom block or brown mushroom block or mushroom stem or banner or bow or fishing rod:
  130. return 300
  131. else if {_type} is any wooden door or any sign or wooden pickaxe or wooden shovel or wooden hoe or wooden axe or wooden sword:
  132. return 200
  133. else if {_type} is bowl or any sapling or stick or any wool:
  134. return 100
  135. else if {_type} is any carpet:
  136. return 67
  137. else if {_type} is bamboo:
  138. return 50
  139. return 0
  140.  
  141. # Returns if the item can be smelted in the furnace, every smelt takes 10 seconds in a normal furnace
  142. function canSmelt(type: Item, tier: Integer) :: boolean:
  143. if {_type} is iron ore or gold ore or lapis ore or redstone ore or coal ore:
  144. return true
  145. else if {_tier} is 2:
  146. if {_type} is diamond ore or emerald ore or nether quartz ore:
  147. return true
  148.  
  149. return false
  150.  
  151. function canSmeltInFurnace(p: Player, item: Item) :: boolean:
  152. set {_furnaceId} to {inventory.%{_p}%.current}
  153. if {furnace1.%{_furnaceId}%.contents.oreType} is set:
  154. if type of {_item} is not type of {furnace1.%{_furnaceId}%.contents.oreType}:
  155. return false
  156.  
  157. if {furnace1.%{_furnaceId}%.contents.ingotType} is set:
  158. set {_item} to "%type of {_item}%"
  159. replace all " ore" in {_item} with " ingot"
  160. if {_item} is not "%type of {furnace1.%{_furnaceId}%.contents.ingotType}%":
  161. return false
  162. return true
  163.  
  164.  
  165. function outlineGui(p: Player):
  166. loop 9 times:
  167. set slot loop-value - 1 of {_p}'s current inventory to gray stained glass pane named "&8"
  168. set slot 54-loop-value of {_p}'s current inventory to gray stained glass pane named "&8"
  169.  
  170. loop 5 times:
  171. set slot loop-value * 9 of {_p}'s current inventory to gray stained glass pane named "&8"
  172. set slot loop-value * 9-1 of {_p}'s current inventory to gray stained glass pane named "&8"
  173.  
  174. function openGuiOutlined(p: Player, loc: Location, rows: integer, name: String):
  175. open chest with {_rows} rows named {_name} to {_p}
  176. set {inventory.%{_p}%.name} to uncolored {_name}
  177. set {inventory.%{_p}%.current} to {_loc}
  178. add {_p} to {inventoryList.%{_loc}%.%{inventory.%{_p}%.name}%::*}
  179. wait 2 ticks
  180. outlineGui({_p})
  181.  
  182. function guiFurnace1(p: Player, loc: Location):
  183. openGuiOutlined({_p}, {_loc}, 6, "&8Furnace I")
  184.  
  185. if {furnace1.%{_loc}%.contents.fuel} is not set:
  186. set {furnace1.%{_loc}%.contents.fuel} to 0
  187. if {furnace1.%{_loc}%.contents.ore} is not set:
  188. set {furnace1.%{_loc}%.contents.ore} to 0
  189. if {furnace1.%{_loc}%.contents.ingot} is not set:
  190. set {furnace1.%{_loc}%.contents.ingot} to 0
  191.  
  192. if {furnace1.%{_loc}%.contents.ingotType} is not set:
  193. set {furnace1.%{_loc}%.contents.ingot} to 0
  194. if {furnace1.%{_loc}%.contents.oreType} is not set:
  195. set {furnace1.%{_loc}%.contents.ore} to 0
  196. if {furnace1.%{_loc}%.contents.fuelType} is not set:
  197. set {furnace1.%{_loc}%.contents.fuel} to 0
  198.  
  199. set {furnace1.%{_loc}%.fuelingTimeMax} to 0
  200. if {furnace1.%{_loc}%.contents.fuelType} is set:
  201. set {furnace1.%{_loc}%.fuelingTimeMax} to getFuelingTime({furnace1.%{_loc}%.contents.fuelType}) / 20
  202.  
  203. set slot 38 of {_p}'s current inventory to lime stained glass pane named "&a&lOre"
  204. set slot 40 of {_p}'s current inventory to lime stained glass pane named "&a&lFuel"
  205. set slot 42 of {_p}'s current inventory to lime stained glass pane named "&a&lIngot"
  206.  
  207. if {furnace1.%{_loc}%.contents.ore} > 0:
  208. set slot 38 of {_p}'s current inventory to ("%{furnace1.%{_loc}%.contents.ore}% %{furnace1.%{_loc}%.contents.oreType}%" parsed as an item)
  209.  
  210. if {furnace1.%{_loc}%.contents.fuel} > 0:
  211. set slot 40 of {_p}'s current inventory to ("%{furnace1.%{_loc}%.contents.fuel}% %{furnace1.%{_loc}%.contents.fuelType}%" parsed as an item)
  212.  
  213. if {furnace1.%{_loc}%.contents.ingot} > 0:
  214. set slot 42 of {_p}'s current inventory to ("%{furnace1.%{_loc}%.contents.ingot}% %{furnace1.%{_loc}%.contents.ingotType}%" parsed as an item)
  215.  
  216. loop 5 times:
  217. set slot 19 + loop-value of {_p}'s current inventory to gray stained glass pane named "&f%20*loop-value%%%"
  218.  
  219. set {_progressBar} to "%{furnace1.%{_loc}%.smeltTime}/2.0%"
  220. if {_progressBar} contains ".":
  221. set {_progressBar::*} to {_progressBar} split at "."
  222. set {_progressBar} to {_progressBar::1}
  223.  
  224. loop ({_progressBar} parsed as an integer) times:
  225. set slot 20+loop-value -1 of {_p}'s current inventory to lime stained glass pane named "&f%20*loop-value%%%"
  226.  
  227. # U T I L I T I E S
  228.  
  229. function getNextNumber(base: number, addToDefault: number, max: number) :: number:
  230. set {_value} to {_base} + {_addToDefault}
  231. if {_value} > {_max}:
  232. set {_value} to {_addToDefault} - ({_max} - {_base})
  233.  
  234. return {_value}
  235.  
  236. function detectStair(facing: number, loc: Location, startValue: String) :: boolean:
  237. set {_list::*} to "westward red brick stair", "red brick stair", "eastward red brick stair" and "southward red brick stair"
  238. set {_dir} to {_facing}/2 + 1
  239.  
  240. if {_dir} > 4:
  241. remove 4 from {_dir}
  242.  
  243. if "%block at location of {_loc}%" is "%{_startValue}%%{_list::%{_dir}%}%":
  244. return true
  245. return false
  246.  
  247. function setItemInSlot(p: Player, type: String, slot: number, clickedItem: Item, item: Item, startLoop: Boolean):
  248. if {_type} is "ore" or "fuel" or "ingot":
  249. set {_p}'s cursor slot to {_clickedItem}
  250. set slot {_slot} of {_p}'s current inventory to {_item}
  251. set {_itemStack::*} to ("%{_item}%") split at " "
  252. if ({_itemStack::1} parsed as a number) is not set:
  253. set {_itemStack::3} to {_itemStack::2}
  254. set {_itemStack::2} to {_itemStack::1}
  255. set {_itemStack::1} to "1"
  256. set {furnace1.%{inventory.%{_p}%.current}%.contents.%{_type}%} to {_itemStack::1} parsed as a number
  257. set {furnace1.%{inventory.%{_p}%.current}%.contents.%{_type}%Type} to type of {_item}
  258.  
  259. if {_startLoop}:
  260. if {furnace.%{inventory.%{_p}%.current}%.isAddedToLoop} is not true:
  261. add {inventory.%{_p}%.current} to {furnace1.loopList::*}
  262. loop_furnace1()
  263. # ingots
  264.  
  265.  
  266. # F U R N A C E D E T E C T S
  267.  
  268. function isFurnace1(below: Location) :: boolean:
  269. if block at {_below} is campfire:
  270. set {_xAdjust::*} to 1, 1, 1, 0, 0, -1, -1 and -1
  271. set {_zAdjust::*} to 1, 0, -1, 1, -1, 1, 0 and -1
  272. loop 8 times:
  273. set {_checkLoc} to location at x-coordinate of {_below}+{_xAdjust::%loop-value%}, y-coordinate of {_below}, z-coordinate of {_below}+{_zAdjust::%loop-value%} in world of {_below}
  274. if block at {_checkLoc} is not red brick block:
  275. return false
  276. else:
  277. return false
  278. return true
  279.  
  280.  
  281. function isFurnace2(loc: Location) :: boolean:
  282. if block at {_loc} is not blast furnace:
  283. return false
  284.  
  285. set {_layer1::*} to air, brick slab, red brick block, air, red brick block, air, red brick block and brick slab
  286. set {_layer2::*} to air, red brick stair, eastward red brick stair and southward red brick stair
  287. set {_x::*} to 1, 1, 0, -1, -1, -1, 0 and 1
  288. set {_z::*} to 0, 1, 1, 1, 0, -1, -1 and -1
  289.  
  290. set {_base} to -2
  291. if block at location at x-coordinate of {_loc} + {_x::1}, y-coordinate of {_loc}, z-coordinate of {_loc} + {_z::1} in world of {_loc} is {_layer1::1}:
  292. set {_base} to 0
  293.  
  294. else if block at location at x-coordinate of {_loc} + {_x::3}, y-coordinate of {_loc}, z-coordinate of {_loc} + {_z::3} in world of {_loc} is {_layer1::1}:
  295. set {_base} to 2
  296.  
  297. else if block at location at x-coordinate of {_loc} + {_x::5}, y-coordinate of {_loc}, z-coordinate of {_loc} + {_z::5} in world of {_loc} is {_layer1::1}:
  298. set {_base} to 4
  299.  
  300. else if block at location at x-coordinate of {_loc} + {_x::7}, y-coordinate of {_loc}, z-coordinate of {_loc} + {_z::7} in world of {_loc} is {_layer1::1}:
  301. set {_base} to 6
  302.  
  303. set {_size} to size of {_x::*}
  304. if {_base} is not -2:
  305. loop 7 times:
  306. set {_value} to getNextNumber({_base}, loop-value, {_size})
  307. if block at location at x-coordinate of {_loc} + {_x::%{_value}%}, y-coordinate of {_loc}, z-coordinate of {_loc} + {_z::%{_value}%} in world of {_loc} is not {_layer1::%loop-value%}:
  308. return false
  309.  
  310.  
  311. set {_facingAdjust::*} to 0, 4, 6 and 8
  312. if detectStair({_base}, location 1 meters above {_loc}, "top "):
  313. loop 4 times:
  314. set {_value} to getNextNumber({_base}, loop-value*2, {_size}) - 1
  315. set {_check} to location at x-coordinate of {_loc} + {_x::%{_value}%}, y-coordinate of {_loc} + 1, z-coordinate of {_loc} + {_z::%{_value}%} in world of {_loc}
  316. set {_facing} to {_base}
  317. if {_facing} - {_facingAdjust::%loop-value%} >= 2:
  318. remove {_facingAdjust::%loop-value%} from {_facing}
  319. else:
  320. add {_facingAdjust::%loop-value%} to {_facing}
  321.  
  322. if loop-value is 1:
  323. if block at {_check} is not {_layer2::%loop-value%}:
  324. return false
  325. else if detectStair({_facing} - 2, {_check}, "") is false:
  326. return false
  327.  
  328. if block at location 2 meters above {_loc} is not red brick block:
  329. return false
  330. else:
  331. return false
  332. else:
  333. return false
  334. return true
  335.  
  336. # C L I C K E V E N T S
  337.  
  338. on rightclick on smooth stone:
  339. if player is not sneaking:
  340. if {anvil.%location of clicked block%} is true:
  341. #gui(player)
  342. cancel event
  343.  
  344. on rightclick on cauldron:
  345. if {furnace.%location of event-block%} is true:
  346. if isFurnace1(location 1 meters below clicked block):
  347. cancel event
  348. guiFurnace1(player, location of clicked block)
  349.  
  350. else:
  351. delete {furnace1.%location of clicked block%.contents.fuel}
  352. delete {furnace1.%location of clicked block%.contents.ore}
  353. delete {furnace1.%location of clicked block%.contents.ingot}
  354. delete {furnace.%location of event-block%}
  355.  
  356. on rightclick on blast furnace:
  357. if {furnace2.%location of event-block%} is true:
  358. if isFurnace2(location of clicked block):
  359. cancel event
  360. send "WIP"
  361. else:
  362. delete {furnace2.%location of event-block%}
  363.  
  364. on rightclick holding stone axe:
  365. if clicked block is smooth stone or iron block or diamond block:
  366. if {anvil.%location of event-block%} is not true:
  367. set {anvil.%location of event-block%} to true
  368. set {_tier} to "Tier I"
  369. if clicked block is smooth stone:
  370. set {anvil.%location of event-block%.tier} to 1
  371. else if clicked block is iron block:
  372. set {anvil.%location of event-block%.tier} to 2
  373. set {_tier} to "Tier II"
  374. else:
  375. set {anvil.%location of event-block%.tier} to 3
  376. set {_tier} to "Tier III"
  377.  
  378. set {_s} to 6
  379. loop all players in radius 6 around event-block:
  380. set {_v} to ({_s} - distance between loop-player and event-block)
  381. play sound "block.anvil.place" with volume {_v} and pitch 0 to loop-player
  382.  
  383. send "{@logo} Successfully created an anvil of %{_tier}%."
  384. summon armor stand at location 0.6 meters below event-block
  385. set name of last spawned armor stand to "&7Anvil"
  386. add "{Invisible:1b,NoGravity:1b,NoAI:1b,CustomNameVisible:1}" to NBT of last spawned armor stand
  387.  
  388. summon armor stand at location 0.9 meters below event-block
  389. set name of last spawned armor stand to "&7%{_tier}%"
  390. add "{Invisible:1b,NoGravity:1b,NoAI:1b,CustomNameVisible:1}" to NBT of last spawned armor stand
  391.  
  392. else if clicked block is cauldron:
  393. if {furnace.%location of event-block%} is not true:
  394. if isFurnace1(location 1 meters below clicked block):
  395. set {furnace.%location of event-block%} to true
  396. cancel event
  397.  
  398. else if clicked block is blast furnace:
  399. if {furnace.%location of event-block%} is not true:
  400. if isFurnace2(location of clicked block):
  401. set {furnace2.%location of event-block%} to true
  402. cancel event
  403. send "WIP"
  404.  
  405. on break of smooth stone or iron block or diamond block:
  406. if {anvil.%location of event-block%} is true:
  407. set {_s} to 6
  408. loop all players in radius 6 around event-block:
  409. set {_v} to ({_s} - distance between loop-player and event-block)
  410. play sound "block.anvil.place" with volume {_v} and pitch 0 to loop-player
  411. delete {anvil.%location of event-block%}
  412. delete {anvil.%location of event-block%.tier}
  413. loop entities in radius 1 around event-block:
  414. if type of loop-entity is armor stand:
  415. kill loop-entity
  416.  
  417.  
  418. on inventory click:
  419. if type of clicked inventory is chest inventory:
  420. if inventory name of player's current inventory is "&8Anvil":
  421. cancel event
  422.  
  423. else if inventory name of player's current inventory is "&8Furnace I":
  424. cancel event
  425. if clicked slot is set:
  426. if clicked item is not air:
  427. set {_item} to player's cursor slot
  428. if {_item} is not air:
  429. if name of clicked item is "&a&lOre":
  430. if canSmelt({_item}, 1):
  431. if canSmeltInFurnace(player, {_item}):
  432. setItemInSlot(player, "ore", clicked slot, clicked item, {_item}, true)
  433. set player's cursor to air
  434. else if name of clicked item is "&a&lFuel":
  435. if getFuelingTime({_item}) > 0:
  436. setItemInSlot(player, "fuel", clicked slot, clicked item, {_item}, true)
  437. set player's cursor to air
  438. else if getFuelingTime(clicked item) > 0:
  439. if getFuelingTime({_item}) > 0:
  440. setItemInSlot(player, "fuel", clicked slot, clicked item, {_item}, false)
  441. else if canSmelt(clicked item, 1) is true:
  442. if canSmelt({_item}, 1):
  443. if canSmeltInFurnace(player, {_item}):
  444. setItemInSlot(player, "ore", clicked slot, clicked item, {_item}, false)
  445. else if getFuelingTime(clicked item) > 0:
  446. updateItemAndRemoveFromLoop(player, clicked item, clicked slot, 1, " I", "Fuel")
  447. else if canSmelt(clicked item, 1) is true:
  448. updateItemAndRemoveFromLoop(player, clicked item, clicked slot, 1, " I", "Ore")
  449. else if "%type of clicked item%" ends with " ingot":
  450. updateItemAndRemoveFromLoop(player, clicked item, clicked slot, 1, " I", "Ingot")
  451. #updateItemInSlot({inventory.%player%.current}, "Ingot", clicked slot, " I", 1)
  452. #(loop-value, "Ore", 38, " I", 1)
  453. #ingot check
  454.  
  455. on inventory close:
  456. if {inventory.%player%.name} is set:
  457. remove player from {inventoryList.%{inventory.%player%.current}%.%{inventory.%player%.name}%::*}
  458. delete {inventory.%player%.name}
  459. delete {inventory.%player%.current}
  460.  
  461. on inventory drag:
  462. if {inventory.%player%.name} is "Anvil" or "Furnace I" or "Furnace II":
  463. cancel event
  464.  
  465.  
  466. on disable:
  467. if {furnace1.looping} is true:
  468. set {furnace1.looping} to false
  469. set {furnace1.loopStopped} to true
  470.  
  471. on enable:
  472. wait 1 second
  473. if {furnace1.loopStopped} is true:
  474. set {furnace1.looping} to true
  475. set {furnace1.loopStopped} to false
  476. #Cancel in crafting table or below
  477. #register new shaped recipe for air using iron ingot, air, iron ingot, iron ingot, chest, iron ingot, air, iron ingot, air
  478.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement