command /autofarm [] []: trigger: fGiveAutoFarm(arg 1, arg 2) on place: if player is holding player head: if name of player's tool is "&e&lᴡʜᴇᴀᴛ ᴀᴜᴛᴏғᴀʀᴍ" or "&6&lᴄᴀʀʀᴏᴛ ᴀᴜᴛᴏғᴀʀᴍ" or "&f&lᴘᴏᴛᴀᴛᴏ ᴀᴜᴛᴏғᴀʀᴍ" or "&5&lʙᴇᴇᴛʀᴏᴏᴛ ᴀᴜᴛᴏғᴀʀᴍ": fPlaceAutoFarm(player, event-location, event-block) set {_i} to a player head set {_n} to nbt compound of {_i} if {_t} is "wheat": set {_name} to "&e&lᴡʜᴇᴀᴛ ᴀᴜᴛᴏғᴀʀᴍ" add nbt compound of "{SkullOwner:{Id:[I;-1504850576,-331921807,-1631623817,-126124336],Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvM2IzYzg0ZTRiZGFmNWNjNWY4NTYzMmFjOTI4ZDA1OWZjMmYxZmYwY2M5ZTU5OThmMWZlOGIyMjc4ODFhZGE4NSJ9fX0==""}]}}}" to {_n} if {_t} is "carrot": set {_name} to "&6&lᴄᴀʀʀᴏᴛ ᴀᴜᴛᴏғᴀʀᴍ" add nbt compound of "{SkullOwner:{Id:[I;1614860007,-262520195,-1340003496,1902795156],Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYjJlMTBmODZmYzU2MDZlY2YzNGFkNDgwNzgxNjBiYmI3NzY4MjM2YTNkMjQxNTA3NTg2MmQzZDQ1MjYwNzJiZSJ9fX0==""}]}}}" to {_n} if {_t} is "potato": set {_name} to "&f&lᴘᴏᴛᴀᴛᴏ ᴀᴜᴛᴏғᴀʀᴍ" add nbt compound of "{SkullOwner:{Id:[I;-84685895,-1383251578,-1667352216,1863931608],Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvY2Y0NjI0ZWJmN2Q0MTlhMTFlNDNlZDBjMjAzOGQzMmNkMDlhZDFkN2E2YzZlMjBmNjMzOWNiY2ZlMzg2ZmQxYyJ9fX0==""}]}}}" to {_n} if {_t} is "beetroot": set {_name} to "&5&lʙᴇᴇᴛʀᴏᴏᴛ ᴀᴜᴛᴏғᴀʀᴍ" add nbt compound of "{SkullOwner:{Id:[I;-860087388,-1897116498,-1504804187,1139486691],Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZTgzN2Y2NGRhOGI3MzUxMzliNGIwMTczZTY2ZjZkODBiMjA4MWM4NjhjNjgxM2EyMDExMmI4YWVjYTVjN2Y2NiJ9fX0==""}]}}}" to {_n} remove {_i} from player's inventory function fGiveAutoFarm(t: text, p: player): set {_i} to a player head set {_n} to nbt compound of {_i} if {_t} is "wheat": set {_name} to "&e&lᴡʜᴇᴀᴛ ᴀᴜᴛᴏғᴀʀᴍ" add nbt compound of "{SkullOwner:{Id:[I;-1504850576,-331921807,-1631623817,-126124336],Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvM2IzYzg0ZTRiZGFmNWNjNWY4NTYzMmFjOTI4ZDA1OWZjMmYxZmYwY2M5ZTU5OThmMWZlOGIyMjc4ODFhZGE4NSJ9fX0==""}]}}}" to {_n} if {_t} is "carrot": set {_name} to "&6&lᴄᴀʀʀᴏᴛ ᴀᴜᴛᴏғᴀʀᴍ" add nbt compound of "{SkullOwner:{Id:[I;1614860007,-262520195,-1340003496,1902795156],Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYjJlMTBmODZmYzU2MDZlY2YzNGFkNDgwNzgxNjBiYmI3NzY4MjM2YTNkMjQxNTA3NTg2MmQzZDQ1MjYwNzJiZSJ9fX0==""}]}}}" to {_n} if {_t} is "potato": set {_name} to "&f&lᴘᴏᴛᴀᴛᴏ ᴀᴜᴛᴏғᴀʀᴍ" add nbt compound of "{SkullOwner:{Id:[I;-84685895,-1383251578,-1667352216,1863931608],Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvY2Y0NjI0ZWJmN2Q0MTlhMTFlNDNlZDBjMjAzOGQzMmNkMDlhZDFkN2E2YzZlMjBmNjMzOWNiY2ZlMzg2ZmQxYyJ9fX0==""}]}}}" to {_n} if {_t} is "beetroot": set {_name} to "&5&lʙᴇᴇᴛʀᴏᴏᴛ ᴀᴜᴛᴏғᴀʀᴍ" add nbt compound of "{SkullOwner:{Id:[I;-860087388,-1897116498,-1504804187,1139486691],Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZTgzN2Y2NGRhOGI3MzUxMzliNGIwMTczZTY2ZjZkODBiMjA4MWM4NjhjNjgxM2EyMDExMmI4YWVjYTVjN2Y2NiJ9fX0==""}]}}}" to {_n} set tag "autofarm;type" of {_i} to "%{_t}%" set tag "autofarm;level" of {_i} to 0 set tag "autofarm;drop" of {_i} to 0 set tag "autofarm;coal" of {_i} to 0 set tag "autofarm;seeds" of {_i} to 0 set tag "autofarm;owners" of {_i} to 1 set tag "autofarm;speed" of {_i} to 20 set tag "autofarm;%{_owners::*}%" of {_i} to "---" set tag "autofarm;creation" of {_i} to "---" set tag "autofarm;stats;mined" of {_i} to 0 set tag "autofarm;stats;placed" of {_i} to 0 set tag "autofarm;stats;withdrawed" of {_i} to 0 set tag "autofarm;stats;used;coal" of {_i} to 0 set tag "autofarm;stats;used;seeds" of {_i} to 0 give 1 of {_i} named "%{_name}%" with lore "&fᴘʟᴀᴄᴇ ɪᴛ ᴛᴏ sᴛᴀʀᴛ ᴀᴜᴛᴏ ғᴀʀᴍɪɴɢ" to {_p} function fPlaceAutoFarm(p: player, b: location, i: item): play sound "ITEM_TRIDENT_HIT_GROUND" at volume 0.7 at pitch 0.3 at location of {_l} set tag "autofarm;owner" of nbt of {_b} to "%{_p}%" set {_checker} to tag "autofarm;type" of {_i} set tag "autofarm;type" of nbt of {_b} to "%{_checker}%" set {_checker} to tag "autofarm;level" of {_i} set tag "autofarm;level" of nbt of {_b} to "%{_checker}%" set {_checker} to tag "autofarm;drop" of {_i} set tag "autofarm;drop" of nbt of {_b} to "%{_checker}%" set {_checker} to tag "autofarm;coal" of {_i} set tag "autofarm;coal" of nbt of {_b} to "%{_checker}%" set {_checker} to tag "autofarm;seeds" of {_i} set tag "autofarm;seeds" of nbt of {_b} to "%{_checker}%" set {_checker} to tag "autofarm;owners" of {_i} set tag "autofarm;owners" of nbt of {_b} to "%{_checker}%" set {_checker} to tag "autofarm;speed" of {_i} set tag "autofarm;speed" of nbt of {_b} to "%{_checker}%" set {_checker} to tag "autofarm;%{_owners::*}%" of {_i} set tag "autofarm;%{_owners::*}%" of nbt of {_b} to "%{_checker}%" set {_checker} to tag "autofarm;creation" of {_i} if {_checker} is "---": set tag "autofarm;creation" of nbt of {_b} to "%now%" else: set tag "autofarm;creation" of nbt of {_b} to "%{_checker}%" set {_checker} to tag "autofarm;stats;mined" of {_i} set tag "autofarm;stats;mined" of nbt of {_b} to "%{_checker}%" set {_checker} to tag "autofarm;stats;placed" of {_i} set tag "autofarm;stats;placed" of nbt of {_b} to "%{_checker}%" set {_checker} to tag "autofarm;stats;withdrawed" of {_i} set tag "autofarm;stats;withdrawed" of nbt of {_b} to "%{_checker}%" set {_checker} to tag "autofarm;stats;used;coal" of {_i} set tag "autofarm;stats;used;coal" of nbt of {_b} to "%{_checker}%" set {_checker} to tag "autofarm;stats;used;seeds" of {_i} set tag "autofarm;stats;used;seeds" of nbt of {_b} to "%{_checker}%" send "&d&lᴀᴜᴛᴏғᴀʀᴍ &8> &fᴘʟᴀᴄᴇᴅ ɴᴇᴡ ᴀᴜᴛᴏғᴀʀᴍ" to {_p} stop function fPickUpAutoFarm(p: player, b: block, i: item, l: location) :: item: set {_t} to tag "autofarm;type;%{_b}%" of nbt of {_b} set {_i} to a player head set {_n} to nbt compound of {_i} if {_t} is "wheat": set {_name} to "&e&lᴡʜᴇᴀᴛ ᴀᴜᴛᴏғᴀʀᴍ" add nbt compound of "{SkullOwner:{Id:[I;-1504850576,-331921807,-1631623817,-126124336],Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvM2IzYzg0ZTRiZGFmNWNjNWY4NTYzMmFjOTI4ZDA1OWZjMmYxZmYwY2M5ZTU5OThmMWZlOGIyMjc4ODFhZGE4NSJ9fX0==""}]}}}" to {_n} if {_t} is "carrot": set {_name} to "&6&lᴄᴀʀʀᴏᴛ ᴀᴜᴛᴏғᴀʀᴍ" add nbt compound of "{SkullOwner:{Id:[I;1614860007,-262520195,-1340003496,1902795156],Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYjJlMTBmODZmYzU2MDZlY2YzNGFkNDgwNzgxNjBiYmI3NzY4MjM2YTNkMjQxNTA3NTg2MmQzZDQ1MjYwNzJiZSJ9fX0==""}]}}}" to {_n} if {_t} is "potato": set {_name} to "&f&lᴘᴏᴛᴀᴛᴏ ᴀᴜᴛᴏғᴀʀᴍ" add nbt compound of "{SkullOwner:{Id:[I;-84685895,-1383251578,-1667352216,1863931608],Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvY2Y0NjI0ZWJmN2Q0MTlhMTFlNDNlZDBjMjAzOGQzMmNkMDlhZDFkN2E2YzZlMjBmNjMzOWNiY2ZlMzg2ZmQxYyJ9fX0==""}]}}}" to {_n} if {_t} is "beetroot": set {_name} to "&5&lʙᴇᴇᴛʀᴏᴏᴛ ᴀᴜᴛᴏғᴀʀᴍ" add nbt compound of "{SkullOwner:{Id:[I;-860087388,-1897116498,-1504804187,1139486691],Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZTgzN2Y2NGRhOGI3MzUxMzliNGIwMTczZTY2ZjZkODBiMjA4MWM4NjhjNjgxM2EyMDExMmI4YWVjYTVjN2Y2NiJ9fX0==""}]}}}" to {_n} if {_p}'s target-block is {_i}: set {_p}'s target-block to air play sound "ENTITY_VILLAGER_YES" at volume 0.7 at pitch 0.3 at location of {_p} delete holo "autoFarm.%{_l}%" set tag "autofarm;owner;%{_i}%" of nbt of {_i} to "%{_p}%" set {_checker} to tag "autofarm;type;%{_b}%" of {_b} set tag "autofarm;type;%{_i}%" of nbt of {_i} to "%{_checker}%" set {_checker} to tag "autofarm;level;%{_b}%" of {_b} set tag "autofarm;level;%{_i}%" of nbt of {_i} to "%{_checker}%" set {_checker} to tag "autofarm;drop;%{_b}%" of {_b} set tag "autofarm;drop;%{_i}%" of nbt of {_i} to "%{_checker}%" set {_checker} to tag "autofarm;coal;%{_b}%" of {_b} set tag "autofarm;coal;%{_i}%" of nbt of {_i} to "%{_checker}%" set {_checker} to tag "autofarm;seeds;%{_b}%" of {_b} set tag "autofarm;seeds;%{_i}%" of nbt of {_i} to "%{_checker}%" set {_checker} to tag "autofarm;owners;%{_b}%" of {_b} set tag "autofarm;owners;%{_i}%" of nbt of {_i} to "%{_checker}%" set {_checker} to tag "autofarm;speed;%{_b}%" of {_b} set tag "autofarm;speed;%{_i}%" of nbt of {_i} to "%{_checker}%" return {_i}