├── .gitattributes ├── README.md ├── libraries └── survival_unobtainables.scl ├── programs ├── botteam.sc ├── cartlog.sc ├── compdisplay.sc ├── emoticons.sc ├── fill_level.sc ├── getallitems.sc ├── getfullbox.sc ├── gradient.sc ├── itemlayout.sc ├── k.sc ├── period.sc ├── pulselength.sc ├── randomizer.sc ├── stat.sc ├── stx.sc └── update.sc └── resources ├── stat ├── combined │ ├── concrete_placed.txt │ ├── ores_mined.txt │ ├── slimestone.txt │ └── stones_mined.txt └── display_names │ ├── 16.json │ ├── 17.json │ ├── 18.json │ ├── 19.json │ ├── 20.json │ └── 21.json └── stx └── stx_modules.json /.gitattributes: -------------------------------------------------------------------------------- 1 | *.sc linguist-language=Python 2 | *.scl linguist-language=Python 3 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # CommandLeo's Scarpet Scripts 2 | 3 | Name|Script|Description 4 | ---|---|--- 5 | Statistic Display|[stat.sc](https://raw.githubusercontent.com/CommandLeo/scarpet/main/programs/stat.sc)|Easily display statistics on the scoreboard.
[How to install](https://github.com/CommandLeo/scarpet/wiki/Statistic-Display#how-to-install)
[Docs](https://github.com/CommandLeo/scarpet/wiki/Statistic-Display) 6 | StorageTechX|[stx.sc](https://raw.githubusercontent.com/CommandLeo/scarpet/main/programs/stx.sc)|A suite of tools for storage tech.
[Docs](https://github.com/CommandLeo/scarpet/wiki/StorageTechX) 7 | Item Randomizer|[randomizer.sc](https://raw.githubusercontent.com/CommandLeo/scarpet/main/programs/randomizer.sc)|Insert random items inside containers in a variety of ways.
[Docs](https://github.com/CommandLeo/scarpet/wiki/Item-Randomizer) 8 | Get All Items|[getallitems.sc](https://raw.githubusercontent.com/CommandLeo/scarpet/main/programs/getallitems.sc)|Get all (survival-obtainable) items inside shulker boxes.
[Docs](https://github.com/CommandLeo/scarpet/wiki/Get-All-Items) 9 | Item Layout|[itemlayout.sc](https://raw.githubusercontent.com/CommandLeo/scarpet/main/programs/itemlayout.sc)|Save a layout of items from a row of blocks and item frames to a file.
[Docs](https://github.com/CommandLeo/scarpet/wiki/Item-Layout) 10 | PulseLength|[pulselength.sc](https://raw.githubusercontent.com/CommandLeo/scarpet/main/programs/pulselength.sc)|Measure for how long a redstone component has been powered for.
[Docs](https://github.com/CommandLeo/scarpet/wiki/PulseLength) 11 | Period|[period.sc](https://raw.githubusercontent.com/CommandLeo/scarpet/main/programs/period.sc)|Measure how often a redstone component is activated.
Credits go to [Firigion](https://github.com/Firigion) for part of the main code.
[Docs](https://github.com/CommandLeo/scarpet/wiki/Period) 12 | Fill Level Utilities|[fill_level.sc](https://raw.githubusercontent.com/CommandLeo/scarpet/main/programs/fill_level.sc)|Get or set the fill level of a container.
[Docs](https://github.com/CommandLeo/scarpet/wiki/Fill-Level-Utilities) 13 | Gradient Generator|[gradient.sc](https://raw.githubusercontent.com/CommandLeo/scarpet/main/programs/gradient.sc)|Generate gradient texts.
[Docs](https://github.com/CommandLeo/scarpet/wiki/Gradient-Generator) 14 | Emoticons|[emoticons.sc](https://raw.githubusercontent.com/CommandLeo/scarpet/main/programs/emoticons.sc)|Get emoticon player heads. 15 | Block Updater|[update.sc](https://raw.githubusercontent.com/CommandLeo/scarpet/main/programs/update.sc)|Send block updates to one or more blocks.
[Docs](https://github.com/CommandLeo/scarpet/wiki/Block-Updater) 16 | Quick Killing|[k.sc](https://raw.githubusercontent.com/CommandLeo/scarpet/main/programs/k.sc)|Quickly kill items and xp orbs (within a certain distance).
[Docs](https://github.com/CommandLeo/scarpet/wiki/Quick-Killing) 17 | Cartlog|[cartlog.sc](https://raw.githubusercontent.com/CommandLeo/scarpet/main/programs/cartlog.sc)|Visualise data of minecarts, similarly to MendedMinecarts.
[Docs](https://github.com/CommandLeo/scarpet/wiki/Cartlog) 18 | Full Shulker Box Generator|[getfullbox.sc](https://raw.githubusercontent.com/CommandLeo/scarpet/main/programs/getfullbox.sc)|Get a shulker box full of a certain item.
[Docs](https://github.com/CommandLeo/scarpet/wiki/Full-Shulker-Box-Generator) 19 | Bot Team|[botteam.sc](https://raw.githubusercontent.com/CommandLeo/scarpet/main/programs/botteam.sc)|Makes fake players join a dedicated team while preserving the former team in case they ever join back as real players. 20 | Comparator Signal Strength Display|[compdisplay.sc](https://raw.githubusercontent.com/CommandLeo/scarpet/main/programs/compdisplay.sc)|Display the signal strength of a comparator above it. 21 | -------------------------------------------------------------------------------- /libraries/survival_unobtainables.scl: -------------------------------------------------------------------------------- 1 | game_version = system_info('game_major_target'); 2 | global_survival_unobtainables = [ 3 | 'bedrock', 4 | 'suspicious_sand', 5 | 'suspicious_gravel', 6 | 'budding_amethyst', 7 | 'petrified_oak_slab', 8 | 'chorus_plant', 9 | 'spawner', // for 1.19.2- 10 | 'monster_spawner', // for 1.19.3+ 11 | 'farmland', 12 | ...filter(item_list(), _~'infested' != null), 13 | 'reinforced_deepslate', 14 | 'end_portal_frame', 15 | 'command_block', 16 | 'barrier', 17 | 'light', 18 | 'grass_path', // for 1.16- 19 | 'dirt_path', // for 1.17+ 20 | 'repeating_command_block', 21 | 'chain_command_block', 22 | 'structure_void', 23 | 'structure_block', 24 | 'jigsaw', 25 | 'bundle', 26 | ...filter(item_list(), _~'spawn_egg' != null), 27 | 'player_head', 28 | 'command_block_minecart', 29 | 'knowledge_book', 30 | 'debug_stick', 31 | 'frogspawn' 32 | ]; 33 | if(game_version < 18, global_survival_unobtainables += 'spore_blossom'); 34 | if(game_version < 19, global_survival_unobtainables += 'sculk_sensor'); 35 | -------------------------------------------------------------------------------- /programs/botteam.sc: -------------------------------------------------------------------------------- 1 | // Bot Team by CommandLeo 2 | 3 | global_team_name = 'bots'; 4 | 5 | __on_start() -> ( 6 | if(team_list()~global_team_name == null, 7 | team_add(global_team_name); 8 | team_property(global_team_name, 'color', 'gray'); 9 | team_property(global_team_name, 'prefix', '[BOT] '); 10 | ); 11 | ); 12 | 13 | __on_player_connects(player) -> ( 14 | data = load_app_data() || {}; 15 | team = player~'team'; 16 | 17 | if(player~'player_type' == 'fake', 18 | if(team, 19 | if(team != global_team_name, data:str(player) = team), 20 | delete(data, str(player)) 21 | ); 22 | store_app_data(data); 23 | team_add(global_team_name, player), 24 | team == global_team_name, 25 | previous_team = data:str(player); 26 | if(previous_team && team_list()~previous_team != null, 27 | team_add(previous_team, player), 28 | team_leave(player) 29 | ); 30 | ); 31 | ); -------------------------------------------------------------------------------- /programs/cartlog.sc: -------------------------------------------------------------------------------- 1 | __config() -> { 2 | 'commands' -> { 3 | '' -> 'toggle_visibility', 4 | 'pos' -> ['toggle_setting', 'pos'], 5 | 'speed' -> ['toggle_setting', 'speed'], 6 | 'fall_distance' -> ['toggle_setting', 'fall_distance'], 7 | 'fill_level' -> ['toggle_setting', 'fill_level'], 8 | 'locked' -> ['toggle_setting', 'locked'], 9 | 'fuse' -> ['toggle_setting', 'fuse'], 10 | 'hitbox' -> ['toggle_setting', 'hitbox'], 11 | }, 12 | 'scope' -> 'player' 13 | }; 14 | 15 | toggle_visibility() -> global_on = !global_on; 16 | 17 | toggle_setting(setting) -> global_settings:setting = !global_settings:setting; 18 | 19 | __on_start() -> ( 20 | global_settings = { 21 | 'pos' -> true, 22 | 'speed' -> true, 23 | 'fall_distance' -> false, 24 | 'fill_level' -> true, 25 | 'locked' -> true, 26 | 'fuse' -> true, 27 | 'hitbox' -> true 28 | }; 29 | ); 30 | 31 | __on_tick() -> ( 32 | if(!global_on, return()); 33 | for(entity_list('minecarts'), 34 | i = 0; 35 | cart = _; 36 | 37 | if(global_settings:'fuse' && cart~'type' == 'tnt_minecart', 38 | fuse = query(cart, 'nbt', 'TNTFuse'); 39 | draw_shape('label', 1, {'player' -> player(), 'pos' -> [0, 1, 0], 'follow' -> _, 'height' -> i+=1, 'text' -> '', 'value' -> str('Fuse: %d', fuse)}) 40 | ); 41 | if(global_settings:'locked' && cart~'type' == 'hopper_minecart', 42 | locked = !query(cart, 'nbt', 'Enabled'); 43 | draw_shape('label', 1, {'player' -> player(), 'pos' -> [0, 1, 0], 'follow' -> _, 'height' -> i+=1, 'text' -> '', 'value' -> str('Locked: %b', locked)}) 44 | ); 45 | if(global_settings:'fill_level' && inventory_has_items(cart) != null, 46 | fill_level = if(inventory_has_items(cart), floor(1 + reduce(inventory_get(cart), _a + if(_ , _:1 / stack_limit(_:0), 0), 0) / inventory_size(cart) * 14), 0); 47 | draw_shape('label', 1, {'player' -> player(), 'pos' -> [0, 1, 0], 'follow' -> _, 'height' -> i+=1, 'text' -> '', 'value' -> str('Fill Level: %d', fill_level)}) 48 | ); 49 | 50 | if(global_settings:'fall_distance', 51 | fall_distance = query(cart, 'nbt', 'FallDistance'); 52 | draw_shape('label', 1, {'player' -> player(), 'pos' -> [0, 1, 0], 'follow' -> _, 'height' -> i+=1, 'text' -> '', 'value' -> str('Fall Distance: %.2f', fall_distance)}) 53 | ); 54 | if(global_settings:'speed', 55 | speed_x = max(-8, min(8, cart~'motion_z' * 20 + 1e-10)); 56 | speed_y = cart~'motion_y' * 20 + 1e-10; 57 | speed_z = max(-8, min(8, cart~'motion_x' * 20 + 1e-10)); 58 | draw_shape('label', 1, {'player' -> player(), 'pos' -> [0, 1, 0], 'follow' -> _, 'height' -> i+=1, 'text' -> '', 'value' -> str('Speed Z: %.2f bps', speed_x)}); 59 | draw_shape('label', 1, {'player' -> player(), 'pos' -> [0, 1, 0], 'follow' -> _, 'height' -> i+=1, 'text' -> '', 'value' -> str('Speed Y: %.2f bps', speed_y)}); 60 | draw_shape('label', 1, {'player' -> player(), 'pos' -> [0, 1, 0], 'follow' -> _, 'height' -> i+=1, 'text' -> '', 'value' -> str('Speed X: %.2f bps', speed_z)}); 61 | ); 62 | if(global_settings:'pos', 63 | x = cart~'x'; 64 | y = cart~'y'; 65 | z = cart~'z'; 66 | draw_shape('label', 1, {'player' -> player(), 'pos' -> [0, 1, 0], 'follow' -> _, 'height' -> i+=1, 'text' -> '', 'value' -> str('Z: %.2f', z)}); 67 | draw_shape('label', 1, {'player' -> player(), 'pos' -> [0, 1, 0], 'follow' -> _, 'height' -> i+=1, 'text' -> '', 'value' -> str('Y: %.2f', y)}); 68 | draw_shape('label', 1, {'player' -> player(), 'pos' -> [0, 1, 0], 'follow' -> _, 'height' -> i+=1, 'text' -> '', 'value' -> str('X: %.2f', x)}); 69 | ); 70 | 71 | if(global_settings:'hitbox', draw_shape('box', 1, {'player' -> player(), 'from' -> pos(cart) - [0.98/2, 0, 0.98/2], 'to' -> pos(cart) + [0.98/2, 0.7, 0.98/2], 'fill' -> 0x9b59b688})); 72 | ); 73 | ) -------------------------------------------------------------------------------- /programs/compdisplay.sc: -------------------------------------------------------------------------------- 1 | // Comparator Signal Strength Display by CommandLeo 2 | 3 | __config() -> { 4 | 'commands' -> { 5 | '' -> 'toggle' 6 | }, 7 | 'scope'-> 'player' 8 | }; 9 | 10 | toggle() -> ( 11 | print(player(), format('f »', 'g Comparator Signal Strength Display ', if(global_enabled = !global_enabled, 'l enabled', 'r disabled'))); 12 | ); 13 | 14 | displayComparatorSignalStrength() -> ( 15 | if(global_enabled, 16 | trace = player()~'trace'; 17 | if(trace == 'comparator', draw_shape('label', 2, {'pos' -> pos(trace) + 0.5, 'text' -> block_data(trace):'OutputSignal', 'player'-> player(), 'color' -> 0xff4757ff})); 18 | ); 19 | schedule(1, 'displayComparatorSignalStrength'); 20 | ); 21 | 22 | __on_start() -> displayComparatorSignalStrength(); -------------------------------------------------------------------------------- /programs/emoticons.sc: -------------------------------------------------------------------------------- 1 | // Emoticons by CommandLeo 2 | 3 | global_emoticons = { 4 | 'Raised Eyebrow' -> 'd12e74a1194e731ffcd4dff02570009f5b4a947de30df5cd220c04d326f0eb87', 5 | 'Neutral' -> 'cb80600254ae8a6b65e2c26dca71d1fea5cf01679232d26ae658e64d6c3a0212', 6 | 'Expressionless' -> '1b497d21df087f4092ae3ef9249452dfc126bf3e7f295583910b19381ae9eb85', 7 | 'No Mouth' -> 'bf1e03da7e1e1eb2a12a4f991b06dffb3be4a7fcc7ab33fe7dbe7ebf9283a65a', 8 | 'Smirking' -> 'b62bbc5f291b1968b86155444f4961e9b963506d7f25c9af3de7d871fdb50f0f', 9 | 'Unamused' -> '574aee6e8726947c4a9355e5897585f48ae8bf00e261d78e5769c975eddb9462', 10 | 'Rolling Eyes' -> 'd7255504f5d9a4aa26ce89b28428e72cc6d9459c100ba22fc4ccc3a1b169b8a0', 11 | 'Grimacing' -> '3ebc1c39e87166f4507459a61f2fba2c62ef03b8ecdfa30db09345525745f199', 12 | 'Exhaling' -> '40da627f52be9536c1ba7daf722bd51db585343689a4627f5fba95712a35693e', 13 | 'Lying' -> '82e2063d7470ab811cc9073d9d0cb270f0a760db01fcbb87b1908d5e395070ed', 14 | 'Relieved' -> 'bc8277af4e7f965b17c4369fe680d3fe88b94269b52496c09a1cf5016f7f516e', 15 | 'Pensive' -> '6910b22b5f29eef94ab4207484281bb69c5286c161753a154510342a114d718c', 16 | 'Sleepy' -> 'f8ce9f566b2431e19ce39f933e32b914d45cd9c5afeea254b0e4ea2afd869101', 17 | 'Drooling' -> 'd8e2d0d0c4f1191899edb2403959b5b60842ce39ba3664a9303205fdeacb34bd', 18 | 'Sleeping' -> '5c819a42c0b1c25b9e2e0bc1ebb574b4d6690777d3e831d82d3c932116c02bdc', 19 | 'Facemask' -> '7f2893e2621986135b4129ed01237b8327e75a56824c57d881c3d22071d2b074', 20 | 'Thermometer' -> '7fda21825065916df7cec47e54b9db9c91ae56404d7e274863acbac013042c7c', 21 | 'Bandaged' -> '44753c60cb0bb0c30ad2ff73a2329a7d9d9e4f209a833cfbe17dfcafec0cef3c', 22 | 'Sick' -> '23b14109b80edcc51c4f1081d765bbc48003159dce6cb6b7c9655687a5e3db87', 23 | 'Vomiting' -> '7b2818b6f378acb1cfabbb11cc4f9ac697af8faaf00c36a601b849fa2c1d9f5c', 24 | 'Sneezing' -> 'ab03827d1f029ddb4d0932508b375b72c04afac8c4ad60ad87b15c9dc60ba3b6', 25 | 'Woozy' -> '1fc76918a21955820153cae8aa1cf163890eca79be5276264f2321bfef4c1a3b', 26 | 'Dead' -> '326bd2c90a58da1068eeae185e190b72437dd361fd6d39943b23a29a72fdac8d', 27 | 'Spiral Eyes' -> 'e94c1a01bc1210f874c81efe756208fa2e69987838fa5e77f45db1eeddbaf172', 28 | 'Exploding Head' -> 'f4367b9220c7c0df371e4ea05b86e771c8be2643b39513513f5407146e16e2a3', 29 | 'Cowboy' -> 'ffd39646e24e6a4e62d0cc8a22b6a8f952bef8ce9bae274bf2d11a82c2e7cd3a', 30 | 'Sad Cowboy' -> '4476b4bead71e84d080cebd405dc31d8b4aea740feac1b7224814052f260dd4d', 31 | 'Partying' -> '525eed8fb447e481c011511062da8b77a228d8fc59a68213f84d63af10e7b53a', 32 | 'Disguised' -> 'b9c9e8d96f11220d5f30c91941317c0b22b566f823243af6f91b169d5ce7b4', 33 | 'Sunglasses' -> '71a11a03d6bc75b144be85848556a15f358ee6a65e0466f6c8b706e7f9bcf14', 34 | 'Nerd' -> '8d394fec5275b584ce6877a273600d04e06c4abbd480bbabb655c81a6ddb1723', 35 | 'Monocle' -> '858f5b1fbfe7395787fcf833b0b5832e74368fe539c9e59e494ede1536794fc2', 36 | 'Confused' -> '8c16b33a589f8881a65222e1c52f32dc7bca335a7c7305b41ae33cd5925f973d', 37 | 'Diagonal' -> 'e8eb9bf1de3e37b5fd9fd5f92dfaa0603de9f0bafcdee0348b2729be71cc0141', 38 | 'Worried' -> '4e3075b6e592e42e3007d4325a51aa593d91f46dc23f1059aa2c319cf385a605', 39 | 'Frowning' -> '72484eaa4b947825efe87c14d752aa64604a94c08b238f29d6f384ac5fc08186', 40 | 'Slightly Frowning' -> '3c26d4e12e8955339e719aebddd23b1d1cc7367426e7be8c1cd0f073f3eeb51d', 41 | 'Open Mouth' -> '35732e461f5e51c7b2b8ff1a853fdfdb833b3992d3985b0aade74d0c724a8596', 42 | 'Hushed' -> 'bcca0b9961e7806d0d3aa0d0a26b29952ca2638d9949b40df641d99eaf7eb66', 43 | 'Astonished' -> 'f40eb7298cd58a0e9edd8595ca3fcf9f0095c4c645d77d234f050c274f0ac4cf', 44 | 'Flushed' -> '679d722bf836318fd11eec260fa9fd32e28f19f503d669f2591877d8285eb6c3', 45 | 'Pleading' -> '7fe4be5ac79baaf26ef02af0ec84096271b807d5b04f139693455e1843ff60f0', 46 | 'Holding Back Tears' -> 'f4f5c69169f5d651abd27d624e0d02065a8d9e9a0dfffdaec323a3f2c6800327', 47 | 'Open Mouth Frowning' -> '93904f070fcf4a954f74fd3a1bc2ef8fa72aef00b2eee31dd0326bf9d4418de6', 48 | 'Anguished' -> 'f90ae4ea93ce6f81fc0920ebefc18d296b8137943a9a1fbbbe8c51c982425f0d', 49 | 'Fearful' -> 'd437661731132e87dbf5358920ea1925fa7f526e52c37ffc3090a183450826d6', 50 | 'Anxious' -> 'a81a2c7af057ee78544aa5a81657dfc05f20834eb8c76fd8b7f7a77a6a8b5bc6', 51 | 'Sad but Relieved' -> '9c140c1baabf29fb5de4a620d5dbf79fa877f584e3ef93919e91ff91b3642441', 52 | 'Crying' -> '150fc33f30791ec06a52f19869e051f32bab183787a34fdc1ff038b9946c9f7f', 53 | 'Sobbing' -> 'e8feeca56cc0aabaac46ad4036690cdc66da3c9f2c85c371b67952fe73898f04', 54 | 'Screaming' -> '8ac2472f011785092152071e82150269a16633b907bd100fc7fe30cd431c63a0', 55 | 'Confounded' -> '87ef8f9f9bcf8352127276eab45a050ea5850a9698c05f140cf57cbd60c5cc95', 56 | 'Persevering' -> '470a5739f9030a9b5657755c3ec121d636949113304d3974a45c6b9272c728ed', 57 | 'Disappointed' -> '63fb3a62ec6bf481aa35e7d2450afe9e7cf80a039854a97ac655e7a5ed76dd55', 58 | 'Downcast Sweat' -> '4ce58fe0e6aa494a202df3446f03d3b9c85febcb73ed4935949b15e1adf45363', 59 | 'Weary' -> 'fd60200a52687fc8af137c6b969cbf894abf240b942a2f4967155afa413afc6b', 60 | 'Tired' -> '5751e703b33e7d90a553e59011cf341ca71ad50bc35a4f9c5afe59ebebc77140', 61 | 'Triumph' -> '3a4bd22473a17eb832feaf8ace8f7461b56a597848b134c8af1b8d521dc3e4f0', 62 | 'Angry' -> 'a79812621484cd2f0b0158d83ca39fef48024f0be588a5a5d23238b3afe90d99', 63 | 'Grinning' -> '551c8e23ddf916cf15e69615dea1dce20e697b9bbf9f28840c42ab929745128e', 64 | 'Grinning Big Eyes' -> 'd1207ffe69f06f7b8173bf5b924c4d8f7976383c7e59dce538ffa63af84d7595', 65 | 'Smiling Closed Eyes' -> '408ffac078376cfd47de892904d014a8e0c56f4924575d400264a7c62607df65', 66 | 'Laughing' -> '72cdc8bc85e0bd034de2b0ebc4f207afd82c782665460412da98e6deeafc254f', 67 | 'Beaming' -> '2d0613b34b6bd90a7192eba424d38a55bfa6dbde44501c1fffe25c7ce3a2ba11', 68 | 'Sweating Smiling' -> '2274eec9cab2710eb225f53d6053a0913b143fa42dbec24e7c99ed0008124daf', 69 | 'ROFL' -> 'b003750d959cd5685ce4697ff6d3ff6b1d8f2f40afbf1ff625393fa071b4681a', 70 | 'Laughing Crying' -> 'f6f9ac4d15c7905e1f96d14e86d53dad89e690d1dcb1072f4e1d987c2d88bfd3', 71 | 'Laughing Crying (Open Eyes)' -> '67bf4532a532c2933d61dc02cc72386829716893441a47330d8258f3046a713a', 72 | 'Slight Smile' -> '3c5aca29950e5b05ea81932f90bc52e8d14757b7e0eeb3909ab79ad98151ba7e', 73 | 'Smile' -> 'a9d977c57ba7543990ed289aa2d0e0e9aca846056d52491079c63c5dc756d0b0', 74 | 'Upside Down' -> '39fee8acaee2e327c0077d6c0a44b4817575f370ea0c41844d04af213aba4916', 75 | 'Melting' -> 'ad88eb70318eb7fb8f486674014d4ccd1c27ffc37e804c0f6e23ead81a561dd7', 76 | 'Winking' -> 'bbdaf6d8469dd476db3c2a7e66e7bd511d852d4a242e3c9e5a2256b4498bf84b', 77 | 'Smiling Blush' -> 'dfeb3f8484e811d40b57e1463b14bde0ae5e1fcfc4153d61e1f7ee813252c7da', 78 | 'Angel' -> 'c48d16aaea9214641cc69a0d2d26367ac3ef75a47decfdfff7c7db5864e6c14f', 79 | 'Smiling Hearts' -> 'b0bd22c2f95b648fee0003241f4eb5f22b5779f99eefc847e984916a4be99ace', 80 | 'Heart Eyes' -> '1d0f2925df37fbd5f80829cafb3e9e9ac00f75a991b2131c26e0b2198e300018', 81 | 'Starstruck' -> 'e9e30866ea82f30b0c15691deacfc6311fdd4cb8740fc4aa8f4302ffe0e8dc5a', 82 | 'Blowing Kiss' -> '47b7a9c64f7aa04c46a596003b145113494877ecbf656ea97320e624d25680f', 83 | 'Kissing' -> 'fc16c51ef7bd2c1a558a941d46a19b8e2a91a53817603de382ac8462da46d13f', 84 | 'Smiling' -> '1d0018edadc58ee8dbd120a17f1e9a985bd52fb45998a6a6479eff8ff767b768', 85 | 'Kissing Blush' -> '4595e2302700452dc1ac990ba61bcdf89331998a896989dd659e3a6039aabae2', 86 | 'Kissing Closed Eyes' -> '3c4ef82732d8d8b1824436227fce10fbb57e6faa1ba976ad0cb8e369ef52ff74', 87 | 'Smiling Tear' -> '624711f6b9792b104d29992e93d1431d90e804026cdb52234d4463f05db0123b', 88 | 'Yummy' -> '7a63d49d8a9f0f03e6a6a2296ceb6f45c740dfcee71f236705b8b6409253a9f7', 89 | 'Tongue' -> 'b044971538922eff82349882517b334ffbefb86480e7f65a73c15d2738d998f9', 90 | 'Winking Tongue' -> '9cef234b3fe6b492ee9b8f1e26341e30036f8a51dd89cdc86e8173481eac8003', 91 | 'Tongue Closed Eyes' -> '79d064dfa577d2b0661b24499fb3b2d8f6cab50571fcc61c79ee5532f00e1e1e', 92 | 'Zany' -> 'ca5ed182bd9cec8ad7c0797cab7c3776d3d7f4fa800a89359fc6f3fffa9c1255', 93 | 'Money Mouth' -> '406ac74d3270e4813efc3d4bd235ce4daeb790d02b1e61a7c29768fcb96890ea', 94 | 'Shushing' -> 'cf78f252cec21eb4e6ae8d70b89faf617d1e9fc92eb6949050542c500028ffd', 95 | 'Thinking' -> 'd070b22e255702d3252ff57aadb7432c2f41fd516f500e3715567f8e0d6618af', 96 | 'Zipper' -> '92ebe9ade5c6640f84c38dba4690d21d05a169efce52792a4e97d2fdfb4f0bbc', 97 | }; 98 | global_emoticons = sort(pairs(global_emoticons)); 99 | 100 | __config() -> { 101 | 'commands' -> { 102 | '' -> 'emoticonMenu', 103 | '' -> 'equipEmoticon', 104 | 'random' -> 'randomEmoticon' 105 | }, 106 | 'arguments' -> { 107 | 'emoticon' -> { 108 | 'type' -> 'term', 109 | 'options' -> map(global_emoticons, lower(replace(replace(_:0, '\\(|\\)', ''), ' ', '_'))), 110 | 'case_sensitive' -> false 111 | } 112 | }, 113 | 'requires' -> { 114 | 'carpet' -> '>=1.4.57' 115 | }, 116 | 'scope' -> 'player' 117 | }; 118 | 119 | _getHeadNbt(name, hash) -> ( 120 | head_name = str('{"text":"%s","italic":false}', name); 121 | value = encode_b64(encode_json({'textures' -> {'SKIN' -> {'url' -> str('http://textures.minecraft.net/texture/%s', hash)}}})); 122 | return(if(system_info('game_pack_version') >= 33, 123 | { 124 | 'custom_name' -> head_name, 125 | 'profile' -> {'properties' -> [{'name' -> 'textures', 'value' -> value}]} 126 | }, 127 | { 128 | 'display' -> {'Name' -> head_name}, 129 | 'SkullOwner' -> {'Properties' -> {'textures' -> [{'Value' -> value}]}} 130 | } 131 | ); 132 | )); 133 | 134 | emoticonMenu() -> ( 135 | pages = map(range(length(global_emoticons) / 45), slice(global_emoticons, _i * 45, min(length(global_emoticons), (_i + 1) * 45))); 136 | 137 | _setMenuInfo(screen, pages_length) -> ( 138 | name = str('\'{"text":"Page %d/%d","color":"gold","italic":false}\'', global_page % pages_length + 1, pages_length); 139 | lore = [str('\'{"text":"%s entries","color":"gray","italic":false}\'', length(global_emoticons))]; 140 | inventory_set(screen, 49, 1, 'paper', if(system_info('game_pack_version') >= 33, {'components' -> {'custom_name' -> name, 'lore' -> lore}, 'id' -> 'paper'}, {'display' -> {'Name' -> name, 'Lore' -> lore}})); 141 | ); 142 | 143 | _setMenuItems(screen, page) -> ( 144 | loop(45, inventory_set(screen, _, , if(_ < length(page), 1, 0), 'player_head', if(system_info('game_pack_version') >= 33, {'components' -> encode_nbt(_getHeadNbt(...page:_)), 'id' -> 'player_head'}, encode_nbt(_getHeadNbt(...page:_))))); 145 | ); 146 | 147 | global_page = 0; 148 | screen = create_screen(player(), 'generic_9x6', 'Emoticons', _(screen, player, action, data, outer(pages)) -> ( 149 | if(length(pages) > 1 && action == 'pickup' && (data:'slot' == 48 || data:'slot' == 50), 150 | page = if(data:'slot' == 48, pages:(global_page += -1), data:'slot' == 50, pages:(global_page += 1)); 151 | _setMenuInfo(screen, length(pages)); 152 | _setMenuItems(screen, page); 153 | ); 154 | if(action == 'pickup' && data:'slot' == 53, randomEmoticon()); 155 | if(action == 'pickup' && 0 <= data:'slot' <= 45, 156 | i = inventory_get(screen, data:'slot'); 157 | if(i, 158 | inventory_set(player, 39, 1, 'player_head', i:2); 159 | run('playsound block.note_block.pling master @s'); 160 | ); 161 | ); 162 | if(action == 'pickup_all' || action == 'quick_move' || (action != 'clone' && data:'slot' != null && 0 <= data:'slot' <= 44) || (45 <= data:'slot' <= 53), return('cancel')); 163 | )); 164 | 165 | _setMenuItems(screen, pages:0); 166 | 167 | for(range(45, 54), inventory_set(screen, _, 1, 'gray_stained_glass_pane', if(system_info('game_pack_version') >= 33, {'components' -> {'hide_tooltip' -> {}}, 'id' -> 'gray_stained_glass_pane'}, {'display' -> {'Name' -> '\'{"text":""}\''}}))); 168 | _setMenuInfo(screen, length(pages)); 169 | random_emoticon_head_nbt = _getHeadNbt('Random Emoticon', 'da99b05b9a1db4d29b5e673d77ae54a77eab66818586035c8a2005aeb810602a'); 170 | inventory_set(screen, 53, 1, 'player_head', if(system_info('game_pack_version') >= 33, {'components' -> encode_nbt(random_emoticon_head_nbt), 'id' -> 'player_head'}, encode_nbt(random_emoticon_head_nbt))); 171 | if(length(pages) > 1, 172 | previous_page_name = '\'{"text":"Previous page","color":"gold","italic":false}\''; 173 | next_page_name = '\'{"text":"Next page","color":"gold","italic":false}\''; 174 | inventory_set(screen, 48, 1, 'arrow', if(system_info('game_pack_version') >= 33, {'components' -> {'custom_name' -> previous_page_name}, 'id' -> 'arrow'}, {'display' -> {'Name' -> previous_page_name}})); 175 | inventory_set(screen, 50, 1, 'arrow', if(system_info('game_pack_version') >= 33, {'components' -> {'custom_name' -> next_page_name}, 'id' -> 'arrow'}, {'display' -> {'Name' -> next_page_name}})); 176 | ); 177 | ); 178 | 179 | equipEmoticon(name) -> ( 180 | emoticon = first(global_emoticons, lower(replace(replace(_:0, '\\(|\\)', ''), ' ', '_')) == name); 181 | if(!emoticon, exit(print(format('r No emoticon found')))); 182 | inventory_set(player(), 39, 1, 'player_head', if(system_info('game_pack_version') >= 33, {'components' -> encode_nbt(_getHeadNbt(...emoticon)), 'id' -> 'player_head'}, encode_nbt(_getHeadNbt(...emoticon)))); 183 | run('playsound block.note_block.pling master @s'); 184 | ); 185 | 186 | randomEmoticon() -> ( 187 | head_nbt = _getHeadNbt(...rand(global_emoticons)); 188 | inventory_set(player(), 39, 1, 'player_head', if(system_info('game_pack_version') >= 33, {'components' -> encode_nbt(head_nbt), 'id' -> 'player_head'}, encode_nbt(head_nbt))); 189 | run('playsound block.note_block.pling master @s'); 190 | ); -------------------------------------------------------------------------------- /programs/fill_level.sc: -------------------------------------------------------------------------------- 1 | // Fill Level Utilities by CommandLeo 2 | 3 | global_color = '#E67E22'; 4 | 5 | global_stackable_dummy_item = global_default_stackable_dummy_item = ['structure_void', null]; 6 | global_unstackable_dummy_item = global_default_unstackable_dummy_item = ['shulker_box', null]; 7 | 8 | __config() -> { 9 | 'commands' -> { 10 | '' -> 'help', 11 | 12 | 'get' -> ['printFillLevel', null], 13 | 'get ' -> 'printFillLevel', 14 | 'set ' -> ['setFillLevel', null], 15 | 'set ' -> 'setFillLevel', 16 | 17 | 'dummy_item stackable' -> 'printStackableDummyItem', 18 | 'dummy_item stackable print' -> 'printStackableDummyItem', 19 | 'dummy_item stackable give' -> 'giveStackableDummyItem', 20 | 'dummy_item stackable set item ' -> 'setStackableDummyItem', 21 | 'dummy_item stackable set hand' -> 'setStackableDummyItemFromHand', 22 | 'dummy_item stackable reset' -> ['setStackableDummyItem', null], 23 | 'dummy_item unstackable' -> 'printUnstackableDummyItem', 24 | 'dummy_item unstackable print' -> 'printUnstackableDummyItem', 25 | 'dummy_item unstackable give' -> 'giveUnstackableDummyItem', 26 | 'dummy_item unstackable set item ' -> 'setUnstackableDummyItem', 27 | 'dummy_item unstackable set hand' -> 'setUnstackableDummyItemFromHand', 28 | 'dummy_item unstackable reset' -> ['setUnstackableDummyItem', null] 29 | }, 30 | 'arguments' -> { 31 | 'fill_level' -> { 32 | 'type' -> 'int', 33 | 'min' -> 0, 34 | 'max' -> if(system_info('game_pack_version') < 33, 897, 15), 35 | 'suggest' -> [] 36 | }, 37 | 'item' -> { 38 | 'type' -> 'item' 39 | } 40 | }, 41 | 'scope' -> 'global' 42 | }; 43 | 44 | // HELPER FUNCTIONS 45 | 46 | _error(error) -> exit(print(format(str('r %s', error)))); 47 | 48 | _checkVersion(version) -> ( 49 | regex = '(\\d+)\.(\\d+)\.(\\d+)'; 50 | target_version = map(version~regex, number(_)); 51 | scarpet_version = map(system_info('scarpet_version')~regex, number(_)); 52 | return(scarpet_version >= target_version); 53 | ); 54 | 55 | _giveCommand(item, nbt) -> ( 56 | return('give @s ' + item + if(nbt, if(system_info('game_pack_version') >= 33, '[' + join(',', map(nbt, _ + '=' + encode_nbt(nbt:_, true))) + ']', encode_nbt(nbt, true)), '')); 57 | ); 58 | 59 | _getReadingComparators(pos) -> ( 60 | comparators = []; 61 | map(['north', 'east', 'south', 'west'], 62 | block1 = block(pos_offset(pos, _, -1)); 63 | if(block1 == 'comparator' && block_state(block1, 'facing') == _, continue(comparators += block1)); 64 | if(solid(block1) && inventory_has_items(block1) == null, 65 | block2 = block(pos_offset(block1, _, -1)); 66 | if(block2 == 'comparator' && block_state(block2, 'facing') == _, comparators += block2); 67 | ); 68 | ); 69 | return(comparators); 70 | ); 71 | 72 | // MAIN 73 | 74 | help() -> ( 75 | texts = [ 76 | 'fs ' + ' ' * 80, ' \n', 77 | '%color%b Fill Level Utilities ', if(_checkVersion('1.4.57'), ...['@https://github.com/CommandLeo/scarpet/wiki/Fill-Level-Utilities', '^g Click to visit the wiki']), 'g by ', '%color%b CommandLeo', '^g https://github.com/CommandLeo', if(_checkVersion('1.4.57'), '@https://github.com/CommandLeo'), ' \n\n', 78 | '%color% /%app_name% get []', 'f |', 'g Gets the fill level of the block you are looking at or at the specified position', ' \n', 79 | '%color% /%app_name% set []', 'f |', 'g Sets the fill level of the block you are looking at or at the specified position', ' \n', 80 | '%color% /%app_name% dummy_item stackable [get|set|reset|give]', 'f |', 'g Gets, sets, resets or gives the stackable dummy item', ' \n', 81 | '%color% /%app_name% dummy_item unstackable [get|set|reset|give]', 'f |', 'g Gets, sets, resets or gives the unstackable dummy item', ' \n', 82 | 'fs ' + ' ' * 80 83 | ]; 84 | replacement_map = {'%app_name%' -> system_info('app_name'), '%color%' -> global_color}; 85 | print(format(map(texts, reduce(pairs(replacement_map), replace(_a, ..._), _)))); 86 | ); 87 | 88 | // FILL LEVEL 89 | 90 | getFillLevel(target) -> ( 91 | fill_level = if( 92 | target == 'composter' || target == 'cauldron' || target == 'water_cauldron' || target == 'powder_snow_cauldron', 93 | block_state(pos(target), 'level') || 0, 94 | inventory_has_items(target) != null, 95 | if( 96 | inventory_has_items(target), 97 | floor(1 + reduce(inventory_get(target), _a + if(_ , _:1 / stack_limit(_:0), 0), 0) / inventory_size(target) * 14), 98 | // else 99 | 0 100 | ) 101 | ); 102 | return(fill_level); 103 | ); 104 | 105 | printFillLevel(position) -> ( 106 | target = if(position, block(position), player()~'trace'); 107 | if(!target || target~'type' == 'player', _error('You are not looking at any block')); 108 | 109 | fill_level = getFillLevel(target); 110 | if(fill_level == null, _error('Invalid block')); 111 | print(format('f » ', str('gi %s', target), '^g ' + pos(target), 'g has a fill level of ', str('%s %d', global_color, fill_level))); 112 | ); 113 | 114 | setFillLevel(fill_level, position) -> ( 115 | target = if(position, block(position), player()~'trace'); 116 | if(!target || target~'type' == 'player', _error('You are not looking at any block')); 117 | 118 | if( 119 | target == 'composter', 120 | setComposterFillLevel(target, fill_level), 121 | target == 'cauldron' || target == 'water_cauldron', 122 | setCauldronFillLevel(target, fill_level), 123 | inventory_has_items(target) != null, 124 | setContainerFillLevel(target, fill_level), 125 | // else 126 | _error('Invalid block') 127 | ); 128 | 129 | for(_getReadingComparators(pos(target)), update(_)); 130 | 131 | actual_fill_level = getFillLevel(target); 132 | print(format('f » ', 'g Filled ', str('gi %s', target), '^g ' + pos(target), 'g with fill level ', str('%s %d', global_color, actual_fill_level), if(actual_fill_level != fill_level, str('g (instead of %s)', fill_level)))), 133 | ); 134 | 135 | setComposterFillLevel(composter, fill_level) -> ( 136 | if(fill_level > 8 || fill_level < 0, _error('Invalid fill level')); 137 | set(composter, 'composter', {'level' -> fill_level}); 138 | ); 139 | 140 | setCauldronFillLevel(cauldron, fill_level) -> ( 141 | if(fill_level > 3 || fill_level < 0, _error('Invalid fill level')); 142 | if(fill_level == 0, 143 | set(cauldron, 'cauldron'), 144 | set(cauldron, if(system_info('game_major_target') >= 17, 'water_cauldron', 'cauldron'), {'level' -> fill_level}) 145 | ); 146 | ); 147 | 148 | setContainerFillLevel(block, fill_level) -> ( 149 | slots = inventory_size(block); 150 | items = if(fill_level == 1, 1, ceil(slots * 64 / 14 * (fill_level - 1))); 151 | [dummy_item, dummy_nbt] = global_stackable_dummy_item; 152 | [unstackable_dummy_item, unstackable_dummy_nbt] = global_unstackable_dummy_item; 153 | if(fill_level <= 15, 154 | loop(slots, 155 | amount = min(items, 64); 156 | items += -amount; 157 | inventory_set(block, _, amount, dummy_item, if(system_info('game_pack_version') >= 33, {'components' -> dummy_nbt, 'id' -> dummy_item}, dummy_nbt)); 158 | ), 159 | loop(slots, 160 | amount = min(64, items / 64); 161 | items += -if(amount < 1, amount, floor(amount)) * 64; 162 | if(amount < 1, 163 | inventory_set(block, _, amount * 64, dummy_item, if(system_info('game_pack_version') >= 33, {'components' -> dummy_nbt, 'id' -> dummy_item}, dummy_nbt)), 164 | inventory_set(block, _, if(_ == slots - 1, ceil(amount), floor(amount)), unstackable_dummy_item, if(system_info('game_pack_version') >= 33, {'components' -> unstackable_dummy_nbt, 'id' -> unstackable_dummy_item}, unstackable_dummy_nbt)) 165 | ); 166 | ) 167 | ); 168 | ); 169 | 170 | // DUMMY ITEM 171 | 172 | printStackableDummyItem() -> ( 173 | [item, nbt] = global_stackable_dummy_item; 174 | print(format('f » ', 'g The current stackable dummy item is ', if(nbt, ...[str('%s %s*', global_color, item), str('^g %s', nbt)], str('%s %s', global_color, item)))), 175 | ); 176 | 177 | setStackableDummyItemFromHand() -> ( 178 | holds = player()~'holds'; 179 | if(!holds, _error('You are not holding any item')); 180 | 181 | setStackableDummyItem(holds); 182 | ); 183 | 184 | setStackableDummyItem(item_tuple) -> ( 185 | if( 186 | !item_tuple, 187 | global_stackable_dummy_item = global_default_stackable_dummy_item; 188 | print(format('f » ', 'g The stackable dummy item has been reset')), 189 | // else 190 | [item, count, nbt] = item_tuple; 191 | if(stack_limit(item) == 1, _error('You can use only stackable items')); 192 | if(system_info('game_pack_version') >= 33, nbt = nbt:'components'); 193 | global_stackable_dummy_item = [item, nbt]; 194 | print(format('f » ', 'g The stackable dummy item has been set to ', str('%s %s', global_color, item), if(nbt, str('^g %s', nbt)))), 195 | ); 196 | ); 197 | 198 | giveStackableDummyItem() -> ( 199 | [item, nbt] = global_stackable_dummy_item; 200 | run(_giveCommand(item, nbt)); 201 | ); 202 | 203 | printUnstackableDummyItem() -> ( 204 | [item, nbt] = global_unstackable_dummy_item; 205 | print(format('f » ', 'g The current unstackable dummy item is ', if(nbt, ...[str('%s %s*', global_color, item), str('^g %s', nbt)], str('%s %s', global_color, item)))), 206 | ); 207 | 208 | setUnstackableDummyItemFromHand() -> ( 209 | holds = player()~'holds'; 210 | if(!holds, _error('You are not holding any item')); 211 | 212 | setUnstackableDummyItem(holds); 213 | ); 214 | 215 | setUnstackableDummyItem(item_tuple) -> ( 216 | if( 217 | !item_tuple, 218 | global_unstackable_dummy_item = global_default_unstackable_dummy_item; 219 | print(format('f » ', 'g The unstackable dummy item has been reset')), 220 | // else 221 | [item, count, nbt] = item_tuple; 222 | if(stack_limit(item) != 1, _error('You can use only unstackable items')); 223 | if(system_info('game_pack_version') >= 33, nbt = nbt:'components'); 224 | global_unstackable_dummy_item = [item, nbt]; 225 | print(format('f » ', 'g The unstackable dummy item has been set to ', str('%s %s', global_color, item), if(nbt, str('^g %s', nbt)))), 226 | ); 227 | ); 228 | 229 | giveUnstackableDummyItem() -> ( 230 | [item, nbt] = global_unstackable_dummy_item; 231 | run(_giveCommand(item, nbt)); 232 | ); 233 | -------------------------------------------------------------------------------- /programs/getallitems.sc: -------------------------------------------------------------------------------- 1 | // Get All Items by CommandLeo 2 | 3 | global_color = '#E84393'; 4 | global_items = item_list(); 5 | global_sort_alphabetically = false; 6 | 7 | global_obtainabilities = {'everything' -> 'Everything', 'main_storage' -> 'Main Storage', 'survival_obtainables' -> 'Survival Obtainables'}; 8 | global_stackabilities = {'stackables' -> [16, 64], '64_stackables' -> [64], '16_stackables' -> [16], 'unstackables' -> [1]}; 9 | 10 | global_survival_unobtainable_items = [ 11 | 'bedrock', 12 | 'budding_amethyst', 13 | 'petrified_oak_slab', 14 | 'chorus_plant', 15 | 'spawner', // for 1.19.2- 16 | 'monster_spawner', // for 1.19.3+ 17 | 'farmland', 18 | ...filter(global_items, _~'infested' != null), 19 | 'reinforced_deepslate', 20 | 'end_portal_frame', 21 | 'command_block', 22 | 'barrier', 23 | 'light', 24 | 'grass_path', // for 1.16- 25 | 'dirt_path', // for 1.17+ 26 | 'repeating_command_block', 27 | 'chain_command_block', 28 | 'structure_void', 29 | 'structure_block', 30 | 'jigsaw', 31 | 'bundle', 32 | ...filter(global_items, _~'spawn_egg' != null), 33 | 'player_head', 34 | 'command_block_minecart', 35 | 'knowledge_book', 36 | 'debug_stick', 37 | 'frogspawn', 38 | 'trial_spawner', 39 | 'vault', 40 | 'test_block', 41 | 'test_instance_block' 42 | ]; 43 | if(system_info('game_data_version') < 2825, global_survival_unobtainable_items += 'spore_blossom'); // 1.18 Experimental 1 44 | if(system_info('game_data_version') < 3066, global_survival_unobtainable_items += 'sculk_sensor'); // Deep Dark Experimental Snapshot 1 45 | global_junk_items = ['filled_map', 'written_book', 'tipped_arrow', 'firework_star', 'firework_rocket']; 46 | system_variable_set('survival_unobtainable_items', global_survival_unobtainable_items); 47 | system_variable_set('junk_items', global_junk_items); 48 | 49 | _checkVersion(version) -> ( 50 | regex = '(\\d+)\.(\\d+)\.(\\d+)'; 51 | target_version = map(version~regex, number(_)); 52 | scarpet_version = map(system_info('scarpet_version')~regex, number(_)); 53 | return(scarpet_version >= target_version); 54 | ); 55 | 56 | __config() -> { 57 | 'commands' -> { 58 | '' -> 'menu', 59 | 'chests' -> ['giveChests', 'main_storage', 'stackables'], 60 | 'chests ' -> ['giveChests', null], 61 | 'chests ' -> 'giveChests', 62 | 63 | 'screen' -> ['showScreen', 'main_storage', 'stackables'], 64 | 'screen ' -> ['showScreen', null], 65 | 'screen ' -> 'showScreen' 66 | }, 67 | 'arguments' -> { 68 | 'obtainability' -> { 69 | 'type' -> 'term', 70 | 'options' -> keys(global_obtainabilities) 71 | }, 72 | 'stackability' -> { 73 | 'type' -> 'term', 74 | 'options' -> keys(global_stackabilities) 75 | } 76 | }, 77 | 'requires' -> { 78 | 'carpet' -> '>=1.4.57' 79 | }, 80 | 'scope' -> 'player' 81 | }; 82 | 83 | menu() -> ( 84 | texts = [ 85 | 'fs ' + ' ' * 80, ' \n', 86 | str('%sb Get All Items', global_color), if(_checkVersion('1.4.57'), ...['@https://github.com/CommandLeo/scarpet/wiki/Get-All-Items', '^g Click to visit the wiki']), 'g by ', str('%sb CommandLeo', global_color), '^g https://github.com/CommandLeo', if(_checkVersion('1.4.57'), '@https://github.com/CommandLeo'),' \n\n', 87 | 'g A script to get all items in the game inside shulker boxes.', ' \n', 88 | 'g Run ', str('%s /%s screen', global_color, system_info('app_name')), str('!/%s screen', system_info('app_name')), '^g Click to run the command', 'g to view the shulker boxes in a screen or ', str('%s /%s chests', global_color, system_info('app_name')), str('!/%s chests', system_info('app_name')), '^g Click to run the command', 'g to get them in chests.', ' \n', 89 | 'fs ' + ' ' * 80 90 | ]; 91 | print(format(texts)); 92 | ); 93 | 94 | getItems(category, stackability) -> ( 95 | items = map(global_items, [_, null]); 96 | firework_rockets = map(range(3), ['firework_rocket', if(system_info('game_pack_version') >= 33, {'fireworks' -> {'flight_duration' -> _ + 1}}, {'Fireworks' -> {'Flight' -> _ + 1}})]); 97 | if(category == 'main_storage', put(items, items~['firework_rocket', null], firework_rockets, 'extend')); 98 | items = filter(items, 99 | [item, nbt] = _; 100 | category_check = if( 101 | category == 'main_storage', 102 | global_survival_unobtainable_items~item == null && (global_junk_items~item == null || nbt != null) && item~'shulker_box' == null, 103 | category == 'survival_obtainables', 104 | global_survival_unobtainable_items~item == null, 105 | true 106 | ); 107 | stackability_check = !stackability || global_stackabilities:stackability~stack_limit(item) != null; 108 | item != 'air' && category_check && stackability_check; 109 | ); 110 | if(!_checkVersion('1.4.113') || global_sort_alphabetically, items = sort_key(items, _:0)); 111 | return(items); 112 | ); 113 | 114 | giveChests(category, stackability) -> ( 115 | items = getItems(category, stackability); 116 | shulker_boxes = map(range(ceil(length(items) / 27)), map(slice(items, _ * 27, min(length(items), (_ + 1) * 27)), [item, nbt] = _; if(system_info('game_pack_version') >= 33, {'slot' -> _i, 'item' -> {'id' -> item, 'components' -> nbt || {}}}, {'Slot' -> _i, 'id' -> item, 'Count' -> 1, ...if(nbt, {'tag' -> nbt}, {})}))); 117 | loop(ceil(length(items) / 27 / 27), 118 | chest_contents = map(slice(shulker_boxes, _ * 27, min(ceil(length(items) / 27), (_ + 1) * 27)), if(system_info('game_pack_version') >= 33, {'slot' -> _i, 'item' -> {'id' -> 'white_shulker_box', 'components' -> {'container' -> _}}}, {'Slot' -> _i, 'id' -> 'white_shulker_box', 'Count' -> 1, 'tag' -> {'BlockEntityTag' -> {'Items' -> _}}})); 119 | run('/give @s chest' + if(system_info('game_pack_version') >= 33, str('[container=%s]', encode_nbt(chest_contents)), encode_nbt({'BlockEntityTag' -> {'Items' -> chest_contents}}))); 120 | ); 121 | ); 122 | 123 | showScreen(category, stackability) -> ( 124 | items = getItems(category, stackability); 125 | screen = create_screen(player(), 'generic_9x6', str('%s | %d items', global_obtainabilities:category, length(items))); 126 | loop(ceil(length(items) / 27), 127 | shulker_box_items = slice(items, _ * 27, min(length(items), (_ + 1) * 27)); 128 | shulker_box_contents = map(shulker_box_items, [item, nbt] = _; if(system_info('game_pack_version') >= 33, {'slot' -> _i, 'item' -> {'id' -> item, 'components' -> nbt || {}}}, {'Slot' -> _i, 'id' -> item, 'Count' -> 1, ...if(nbt, {'tag' -> nbt}, {})})); 129 | inventory_set(screen, _, 1, 'white_shulker_box', if(system_info('game_pack_version') >= 33, {'components' -> {'container' -> shulker_box_contents}, 'id' -> 'white_shulker_box'}, {'BlockEntityTag' -> {'Items' -> shulker_box_contents}})); 130 | ); 131 | ); -------------------------------------------------------------------------------- /programs/getfullbox.sc: -------------------------------------------------------------------------------- 1 | // Full Shulker Box Generator by CommandLeo 2 | 3 | global_colors = ['white', 'orange', 'magenta', 'light_blue', 'yellow', 'lime', 'pink', 'gray', 'light_gray', 'cyan', 'purple', 'blue', 'brown', 'green', 'red', 'black']; 4 | 5 | __config() -> { 6 | 'commands' -> { 7 | '' -> ['getFullBox', null], 8 | ' ' -> 'getFullBox' 9 | }, 10 | 'arguments' -> { 11 | 'item' -> { 12 | 'type' -> 'item' 13 | }, 14 | 'box_color' -> { 15 | 'type' -> 'term', 16 | 'options' -> global_colors 17 | } 18 | } 19 | }; 20 | 21 | getFullBox(item_tuple, box_color) -> ( 22 | slot = inventory_find(player(), 'air'); 23 | if(slot < 0 || slot >= 36, exit(print(format('r No space left in your inventory')))); 24 | [item, count, nbt] = item_tuple; 25 | shulker_box = if(box_color, str('%s_shulker_box', box_color), 'shulker_box'); 26 | box_content = map(range(27), if(system_info('game_pack_version') >= 33, {'slot' -> _, 'item' -> {'id' -> item, 'count' -> stack_limit(item), 'components' -> nbt:'components' || {}}}, {'id' -> item, 'Count' -> stack_limit(item), 'Slot' -> _, 'tag' -> nbt})); 27 | inventory_set(player(), slot, 1, shulker_box, if(system_info('game_pack_version') >= 33, {'components' -> {'container' -> box_content}, 'id' -> shulker_box}, {'BlockEntityTag' -> {'Items' -> box_content}})); 28 | ); 29 | -------------------------------------------------------------------------------- /programs/gradient.sc: -------------------------------------------------------------------------------- 1 | // Gradient Generator by CommandLeo 2 | 3 | global_charset = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 'A', 'B', 'C', 'D', 'E', 'F']; 4 | 5 | __config() -> { 6 | 'commands' -> { 7 | '' -> 'help', 8 | 'print ' -> ['printGradient', false], 9 | 'print bold' -> ['printGradient', true], 10 | 'team ' -> ['teamGradient', false], 11 | 'team bold' -> ['teamGradient', true] 12 | }, 13 | 'arguments' -> { 14 | 'text' -> { 15 | 'type' -> 'string', 16 | 'suggest' -> [] 17 | }, 18 | 'start_color' -> { 19 | 'type' -> 'string', 20 | 'suggester' -> _(args) -> ( 21 | color = upper(args:'start_color' || ''); 22 | if(!color || (length(color) < 6 && all(split(color), global_charset~_ != null)), map(global_charset, color + _)); 23 | ), 24 | 'case_sensitive' -> false 25 | }, 26 | 'end_color' -> { 27 | 'type' -> 'string', 28 | 'suggester' -> _(args) -> ( 29 | color = upper(args:'end_color' || ''); 30 | if(!color || (length(color) < 6 && all(split(color), global_charset~_ != null)), map(global_charset, color + _)); 31 | ), 32 | 'case_sensitive' -> false 33 | } 34 | } 35 | }; 36 | 37 | // HELPER FUNCTIONS 38 | 39 | _error(error) -> exit(print(format(str('r %s', error)))); 40 | 41 | validateHex(string) -> ( 42 | hex = upper(string)~'^#?([0-9A-F]{6}|[0-9A-F]{3})$'; 43 | if(length(hex) == 3, hex = replace(hex, '(.)', '$1$1')); 44 | return(hex); 45 | ); 46 | 47 | rgbToHex(rgb) -> upper(str('#%02x%02x%02x', rgb)); 48 | 49 | hexToRgb(hex) -> ( 50 | values = map(split(hex), global_charset~_); 51 | r = values:0 * 16 + values:1; 52 | g = values:2 * 16 + values:3; 53 | b = values:4 * 16 + values:5; 54 | return([r, g, b]); 55 | ); 56 | 57 | generateGradient(text, start_color, end_color, bold) -> ( 58 | input = split(text); 59 | l = length(filter(input, _ != ' ')) - 1; 60 | 61 | start_color = validateHex(start_color); 62 | end_color = validateHex(end_color); 63 | if(!start_color, _error('The start color is not a valid hex color')); 64 | if(!end_color, _error('The end color is not a valid hex color')); 65 | 66 | start_rgb = hexToRgb(start_color); 67 | end_rgb = hexToRgb(end_color); 68 | increment = (end_rgb - start_rgb) / l; 69 | 70 | i = -1; 71 | output = map(input, if(_ == ' ', ' \ ', str('%s%s %s', if(bold, 'b', ''), rgbToHex(start_rgb + increment * (i += 1)), _))); 72 | return(output); 73 | ); 74 | 75 | // MAIN 76 | 77 | help() -> ( 78 | texts = [ 79 | 'fs ' + ' ' * 80, ' \n', 80 | ...generateGradient('Gradient Generator', '#6AB04C', '#22A6B3', true), 'g by ', '#1ABC9Cb CommandLeo', '^g https://github.com/CommandLeo', ' \n\n', 81 | '#1ABC9C /app_name print [bold] ', 'f | ', 'g Prints to chat a [bold] text colored with a gradient from to ', ' \n', 82 | '#1ABC9C /app_name team [bold] ', 'f | ', 'g Sets as the prefix of the team you belong to a [bold] text colored with a gradient from to ', ' \n', 83 | 'fs ' + ' ' * 80 84 | ]; 85 | print(format(map(texts, replace(_, 'app_name', system_info('app_name'))))); 86 | ); 87 | 88 | printGradient(text, start_color, end_color, bold) -> ( 89 | gradient = generateGradient(text, start_color, end_color, bold); 90 | print(format(gradient)); 91 | ); 92 | 93 | teamGradient(text, start_color, end_color, bold) -> ( 94 | team = player()~'team'; 95 | if(!team, _error('You must be in a team!')); 96 | team_property(team, 'prefix', format(generateGradient(text, start_color, end_color, bold)) + ' '); 97 | ); -------------------------------------------------------------------------------- /programs/itemlayout.sc: -------------------------------------------------------------------------------- 1 | // Item Layout by CommandLeo 2 | 3 | global_color = '#26DE81'; 4 | global_directions = ['down', 'up', 'north', 'south', 'west', 'east']; 5 | 6 | global_default_block = load_app_data():'default_block' || 'gray_concrete'; 7 | global_error_messages = { 8 | 'FILE_DELETION_ERROR' -> 'There was an error while deleting the file', 9 | 'FILE_WRITING_ERROR' -> 'There was an error while writing the file', 10 | 'ITEM_LAYOUT_ALREADY_EXISTS' -> 'A item layout with that name already exists', 11 | 'ITEM_LAYOUT_DOESNT_EXIST' -> 'The item layout %s doesn\'t exist', 12 | 'ITEM_LAYOUT_EMPTY' -> 'The %s item layout is empty', 13 | 'NOT_A_ROW_OF_BLOCKS' -> 'The area must be a row of blocks', 14 | 'NO_DEFAULT_BLOCK' -> 'There is no default block', 15 | 'NO_ITEM_LAYOUTS' -> 'There are no item layouts saved' 16 | }; 17 | 18 | global_current_page = {}; 19 | 20 | _checkVersion(version) -> ( 21 | regex = '(\\d+)\.(\\d+)\.(\\d+)'; 22 | target_version = map(version~regex, number(_)); 23 | scarpet_version = map(system_info('scarpet_version')~regex, number(_)); 24 | return(scarpet_version >= target_version); 25 | ); 26 | 27 | __config() -> { 28 | 'commands' -> { 29 | '' -> 'menu', 30 | 'help' -> 'help', 31 | 32 | 'save ' -> 'saveItemLayout', 33 | 'paste ' -> ['pasteItemLayout', false], 34 | 'paste ' -> 'pasteItemLayout', 35 | 'delete ' -> ['deleteItemLayout', false], 36 | 'delete confirm' -> ['deleteItemLayout', true], 37 | 'list' -> 'listItemLayouts', 38 | ...if(_checkVersion('1.4.57'), {'view ' -> 'viewItemLayout'}, {}), 39 | 'default_block' -> 'getDefaultBlock', 40 | 'default_block get' -> 'getDefaultBlock', 41 | 'default_block set ' -> 'setDefaultBlock', 42 | 'default_block reset' -> ['setDefaultBlock', null], 43 | }, 44 | 'arguments' -> { 45 | 'from_pos' -> { 46 | 'type' -> 'pos', 47 | 'loaded' -> true 48 | }, 49 | 'to_pos' -> { 50 | 'type' -> 'pos', 51 | 'loaded' -> true 52 | }, 53 | 'direction' -> { 54 | 'type' -> 'term', 55 | 'options' -> global_directions, 56 | 'case_sensitive' -> false 57 | }, 58 | 'facing' -> { 59 | 'type' -> 'term', 60 | 'options' -> global_directions, 61 | 'case_sensitive' -> false 62 | }, 63 | 'item_frames_only' -> { 64 | 'type' -> 'bool' 65 | }, 66 | 'name' -> { 67 | 'type' -> 'term', 68 | 'suggest' -> [], 69 | 'case_sensitive' -> false 70 | }, 71 | 'item_layout' -> { 72 | 'type' -> 'term', 73 | 'suggester' -> _(args) -> map(list_files('item_layouts', 'shared_text'), slice(_, length('item_layouts') + 1)), 74 | 'case_sensitive' -> false 75 | } 76 | }, 77 | 'requires' -> { 78 | 'carpet' -> '>=1.4.44' 79 | }, 80 | 'scope' -> 'global' 81 | }; 82 | 83 | // HELPER FUNCTIONS 84 | 85 | _error(error) -> ( 86 | print(format(str('r %s', error))); 87 | run(str('playsound block.note_block.didgeridoo master %s', player()~'command_name')); 88 | exit(); 89 | ); 90 | 91 | // UTILITY FUNCTIONS 92 | 93 | _scanStrip(from_pos, to_pos) -> ( 94 | [x1, y1, z1] = from_pos; 95 | [x2, y2, z2] = to_pos; 96 | [dx, dy, dz] = map(to_pos - from_pos, if(_ < 0, -1, 1)); 97 | 98 | if( 99 | x1 != x2, 100 | return(map(range(x1, x2 + dx, dx), block([_, y1, z1]))), 101 | y1 != y2, 102 | return(map(range(y1, y2 + dy, dy), block([x1, _, z1]))), 103 | z1 != z2, 104 | return(map(range(z1, z2 + dz, dz), block([x1, y1, _]))) 105 | ); 106 | return([block(from_pos)]); 107 | ); 108 | 109 | _getItemAtPos(pos, direction) -> ( 110 | pos1 = pos_offset(pos, direction); 111 | if(!air(pos1), return(_getItemFromBlock(block(pos1)))); 112 | 113 | item_frame = entity_area('item_frame', pos1 + [0.5, 0.5, 0.5], [0.5, 0.5, 0.5]):0 || entity_area('glow_item_frame', pos1 + [0.5, 0.5, 0.5], [0.5, 0.5, 0.5]):0; 114 | if(item_frame, return(query(item_frame, 'item'):0 || replace(query(item_frame, 'nbt', 'Item.id'), '.+:', ''))); 115 | 116 | return(_getItemFromBlock(block(pos))); 117 | ); 118 | 119 | _getItemFromBlock(block) -> ( 120 | if(!block || block == global_default_block, return('air')); 121 | if(item_list()~block != null, return(str(block))); 122 | 123 | return( 124 | if( 125 | block == 'bamboo_sapling', 'bamboo', 126 | block == 'beetroots', 'beetroot', 127 | block == 'big_dripleaf_stem', 'big_dripleaf', 128 | block == 'carrots', 'carrot', 129 | block == 'cocoa', 'cocoa_beans', 130 | block == 'pitcher_crop', 'pitcher_plant', 131 | block == 'potatoes', 'potato', 132 | block == 'powder_snow', 'powder_snow_bucket', 133 | block == 'redstone_wire', 'redstone', 134 | block == 'sweet_berry_bush', 'sweet_berries', 135 | block == 'tall_seagrass', 'seagrass', 136 | block == 'torchflower_crop', 'torchflower', 137 | block == 'tripwire', 'string', 138 | block~'cake', 'cake', 139 | block~'cauldron', 'cauldron', 140 | block~'cave_vine', 'glow_berries', 141 | block~'melon', 'melon_seeds', 142 | block~'pumpkin', 'pumpkin_seeds', 143 | block~'azalea_bush', replace(replace(block, '_bush', ''), 'potted_', ''), 144 | block~'plant', replace(block, '_plant', ''), 145 | block~'potted', replace(block, 'potted_', ''), 146 | block~'wall', replace(block, 'wall_', ''), 147 | 'air' 148 | ) 149 | ); 150 | ); 151 | 152 | // MAIN 153 | 154 | menu() -> ( 155 | texts = [ 156 | 'fs ' + ' ' * 80, ' \n', 157 | str('%sb Item Layout', global_color), if(_checkVersion('1.4.57'), ...['@https://github.com/CommandLeo/scarpet/wiki/Item-Layout', '^g Click to visit the wiki']), 'g by ', str('%sb CommandLeo', global_color), '^g https://github.com/CommandLeo', if(_checkVersion('1.4.57'), '@https://github.com/CommandLeo'),' \n\n', 158 | 'g A tool to save a layout of items from a row of blocks and item frames to a file.', ' \n', 159 | 'g Run ', str('%s /%s help', global_color, system_info('app_name')), str('!/%s help', system_info('app_name')), '^g Click to run the command', 'g to see a list of all the commands.', ' \n', 160 | 'fs ' + ' ' * 80 161 | ]; 162 | print(format(texts)); 163 | ); 164 | 165 | help() -> ( 166 | texts = [ 167 | 'fs ' + ' ' * 80, ' \n', 168 | '%color% /%app_name% save ', 'f |', 'g Saves an item layout from a row of blocks, looking for extra blocks or item frames in the specified direction', ' \n', 169 | '%color% /%app_name% paste []', 'f |', 'g Pastes an item layout starting from your current position toward the specified direction, with the item frames facing the specified direction', ' \n', 170 | '%color% /%app_name% delete ', 'f |', 'g Deletes an item layout', ' \n', 171 | '%color% /%app_name% list', 'f |', 'g Lists all item layouts', ' \n', 172 | if(_checkVersion('1.4.57'), ...['%color% /%app_name% view ', 'f |', 'g Displays the contents of an item layout inside a fancy menu', ' \n']), 173 | '%color% /%app_name% default_block [get|set|reset]', 'f |', 'g Gets, sets or resets the default block, the block type that will be ignored when saving an item layout', ' \n', 174 | 'fs ' + ' ' * 80 175 | ]; 176 | replacement_map = {'%app_name%' -> system_info('app_name'), '%color%' -> global_color}; 177 | print(format(map(texts, reduce(pairs(replacement_map), replace(_a, ..._), _)))); 178 | ); 179 | 180 | saveItemLayout(from_pos, to_pos, direction, name) -> ( 181 | item_layout_path = str('item_layouts/%s', name); 182 | if(list_files('item_layouts', 'shared_text')~item_layout_path != null, _error(global_error_messages:'ITEM_LAYOUT_ALREADY_EXISTS')); 183 | if(length(filter(to_pos - from_pos, _ == 0)) != 2, _error(global_error_messages:'NOT_A_ROW_OF_BLOCKS')); 184 | 185 | items = map(_scanStrip(from_pos, to_pos), _getItemAtPos(_, direction)); 186 | success = write_file(item_layout_path, 'shared_text', items); 187 | 188 | if(!success, _error(global_error_messages:'FILE_WRITING_ERROR')); 189 | print(format('f » ', 'g Successfully saved the ', str('%s %s', global_color, name), str('^g /%s view %s', system_info('app_name'), name), str('!/%s view %s', system_info('app_name'), name), 'g item layout')); 190 | run(str('playsound block.note_block.pling master %s', player()~'command_name')); 191 | ); 192 | 193 | deleteItemLayout(item_layout, confirmation) -> ( 194 | item_layout_path = str('item_layouts/%s', item_layout); 195 | if(list_files('item_layouts', 'shared_text')~item_layout_path == null, _error(str(global_error_messages:'ITEM_LAYOUT_DOESNT_EXIST', item_layout))); 196 | 197 | if(!confirmation, exit(print(format('f » ', 'g Click ', str('%sbu here', global_color), str('^g /%s delete %s confirm', system_info('app_name'), item_layout), str('!/%s delete %s confirm', system_info('app_name'), item_layout),'g to confirm the deletion of the ', str('%s %s', global_color, item_layout), 'g item layout')))); 198 | 199 | success = delete_file(item_layout_path, 'shared_text'); 200 | 201 | if(!success, _error(global_error_messages:'FILE_DELETION_ERROR')); 202 | print(format('f » ', 'g Successfully deleted the ', str('%s %s', global_color, item_layout), 'g item layout')); 203 | run(str('playsound item.shield.break master %s', player()~'command_name')); 204 | ); 205 | 206 | listItemLayouts() -> ( 207 | files = list_files('item_layouts', 'shared_text'); 208 | if(!files, _error(global_error_messages:'NO_ITEM_LAYOUTS')); 209 | 210 | item_layouts = map(files, slice(_, length('item_layouts') + 1)); 211 | 212 | texts = reduce(item_layouts, 213 | [..._a, if(_i == 0, '', 'g , '), str('%s %s', global_color, _), if(_checkVersion('1.4.57'), ...[str('^g /%s view %s', system_info('app_name'), _), str('?/%s view %s', system_info('app_name'), _)])], 214 | ['f » ', 'g Saved item layouts: '] 215 | ); 216 | print(format(texts)); 217 | ); 218 | 219 | viewItemLayout(item_layout) -> ( 220 | item_layout_path = str('item_layouts/%s', item_layout); 221 | if(list_files('item_layouts', 'shared_text')~item_layout_path == null, _error(str(global_error_messages:'ITEM_LAYOUT_DOESNT_EXIST', item_layout))); 222 | 223 | entries = read_file(item_layout_path, 'shared_text'); 224 | items = filter(entries, _ != 'air' && item_list()~_ != null); 225 | if(!items, _error(str(global_error_messages:'ITEM_LAYOUT_EMPTY', item_layout))); 226 | 227 | pages = map(range(length(items) / 45), slice(items, _i * 45, min(length(items), (_i + 1) * 45))); 228 | 229 | _setMenuInfo(screen, page_count, pages_length, items_length) -> ( 230 | name = str('\'{"text":"Page %d/%d","color":"%s","italic":false}\'', page_count % pages_length + 1, pages_length, global_color); 231 | lore = [str('\'{"text":"%s entries","color":"gray","italic":false}\'', items_length)]; 232 | nbt = if(system_info('game_pack_version') >= 33, {'components' -> {'custom_name' -> name, 'lore' -> lore}, 'id' -> 'paper'}, {'display' -> {'Name' -> name, 'Lore' -> lore}}); 233 | inventory_set(screen, 49, 1, 'paper', nbt); 234 | ); 235 | 236 | _setMenuItems(screen, page) -> ( 237 | loop(45, inventory_set(screen, _, if(_ < length(page), 1, 0), page:_)); 238 | ); 239 | 240 | global_current_page:player() = 0; 241 | 242 | screen = create_screen(player(), 'generic_9x6', item_layout, _(screen, player, action, data, outer(pages), outer(items)) -> ( 243 | if(length(pages) > 1 && action == 'pickup' && (data:'slot' == 48 || data:'slot' == 50), 244 | page = if(data:'slot' == 48, pages:(global_current_page:player += -1), data:'slot' == 50, pages:(global_current_page:player += 1)); 245 | _setMenuInfo(screen, global_current_page:player, length(pages), length(items)); 246 | _setMenuItems(screen, page); 247 | ); 248 | if(action == 'pickup_all' || action == 'quick_move' || (action != 'clone' && data:'slot' != null && 0 <= data:'slot' <= 44) || (45 <= data:'slot' <= 53), return('cancel')); 249 | )); 250 | 251 | _setMenuItems(screen, pages:0); 252 | 253 | for(range(45, 54), inventory_set(screen, _, 1, 'gray_stained_glass_pane', if(system_info('game_pack_version') >= 33, {'components' -> {'hide_tooltip' -> {}}, 'id' -> 'gray_stained_glass_pane'}, {'display' -> {'Name' -> '\'{"text":""}\''}}))); 254 | _setMenuInfo(screen, global_current_page:player(), length(pages), length(items)); 255 | if(length(pages) > 1, 256 | inventory_set(screen, 48, 1, 'arrow', if(system_info('game_pack_version') >= 33, {'components' -> {'custom_name' -> str('\'{"text":"Previous page","color":"%s","italic":false}\'', global_color)}, 'id' -> 'arrow'}, {'display' -> {'Name' -> str('\'{"text":"Previous page","color":"%s","italic":false}\'', global_color)}})); 257 | inventory_set(screen, 50, 1, 'arrow', if(system_info('game_pack_version') >= 33, {'components' -> {'custom_name' -> str('\'{"text":"Next page","color":"%s","italic":false}\'', global_color)}, 'id' -> 'arrow'}, {'display' -> {'Name' -> str('\'{"text":"Next page","color":"%s","italic":false}\'', global_color)}})); 258 | ); 259 | ); 260 | 261 | pasteItemLayout(item_layout, direction, item_frame_direction, item_frames_only) -> ( 262 | item_layout_path = str('item_layouts/%s', item_layout); 263 | if(list_files('item_layouts', 'shared_text')~item_layout_path == null, _error(str(global_error_messages:'ITEM_LAYOUT_DOESNT_EXIST', item_layout))); 264 | 265 | items = read_file(item_layout_path, 'shared_text'); 266 | if(!items, _error(global_error_messages:'ITEM_LAYOUT_EMPTY')); 267 | 268 | origin_pos = player()~'pos'; 269 | for(items, 270 | pos = pos_offset(origin_pos, direction, _i); 271 | set(pos, 'air'); 272 | print(_); 273 | if(item_list()~_ == null, continue()); 274 | if(!item_frames_only, 275 | if(block_list()~_ != null, continue(set(pos, _))); 276 | if(place_item(_, pos), continue()); 277 | ); 278 | if(global_default_block, set(pos, global_default_block)); 279 | spawn('item_frame', pos_offset(pos, item_frame_direction), {'Facing' -> global_directions~item_frame_direction, 'Fixed' -> true, 'Item' -> {'id' -> _, 'Count' -> 1}}); 280 | ); 281 | 282 | print(format('f » ', 'g The ', str('%s %s', global_color, item_layout), 'g item layout has been pasted')); 283 | ); 284 | 285 | // DEFAULT BLOCK 286 | 287 | getDefaultBlock() -> ( 288 | if(global_default_block, 289 | print(format('f » ', 'g The default block is currently set to ', str('%s %s', global_color, global_default_block))), 290 | _error(global_error_messages:'NO_DEFAULT_BLOCK') 291 | ); 292 | ); 293 | 294 | setDefaultBlock(block) -> ( 295 | global_default_block = block; 296 | if(block, 297 | print(format('f » ', 'g The default block has been set to ', str('%s %s', global_color, block))), 298 | print(format('f » ', 'g The default block has been reset')) 299 | ); 300 | ); 301 | 302 | // EVENTS 303 | 304 | __on_close() -> ( 305 | if(global_default_block, store_app_data({'default_block' -> global_default_block})); 306 | ); -------------------------------------------------------------------------------- /programs/k.sc: -------------------------------------------------------------------------------- 1 | // Quick Killing by CommandLeo 2 | 3 | __config() -> { 4 | 'commands' -> { 5 | '' -> ['kill', 0], 6 | '' -> 'kill' 7 | }, 8 | 'arguments' -> { 9 | 'distance' -> { 10 | 'type' -> 'int', 11 | 'suggest' -> [] 12 | } 13 | }, 14 | 'requires' -> { 15 | 'carpet' -> '>=1.4.57' 16 | }, 17 | 'scope' -> 'global' 18 | }; 19 | 20 | kill(distance) -> ( 21 | killed_count = 0; 22 | for(['item', 'experience_orb'], 23 | entities = if(distance > 0, entity_area(_, system_info('source_position'), [distance, distance, distance]), entity_list(_)); 24 | for(entities, 25 | modify(_, 'kill'); 26 | killed_count += 1; 27 | ); 28 | ); 29 | print(format('f » ', 'g Killed ', str('d %d', killed_count), str('g entit%s', if(killed_count != 1, 'ies', 'y')))); 30 | ); 31 | -------------------------------------------------------------------------------- /programs/period.sc: -------------------------------------------------------------------------------- 1 | // Period by CommandLeo & Firigion 2 | 3 | global_color = '#3498DB'; 4 | global_valid_blockstates = {'powered', 'power', 'extended', 'triggered', 'enabled'}; 5 | global_littables = {'redstone_torch', 'redstone_wall_torch', 'redstone_lamp', 'redstone_ore'}; 6 | global_highlight_color = 0x3498DB88; 7 | 8 | global_monitored = {}; 9 | global_data = {}; 10 | 11 | _checkVersion(version) -> ( 12 | regex = '(\\d+)\.(\\d+)\.(\\d+)'; 13 | target_version = map(version~regex, number(_)); 14 | scarpet_version = map(system_info('scarpet_version')~regex, number(_)); 15 | return(scarpet_version >= target_version); 16 | ); 17 | 18 | __config() -> { 19 | 'commands' -> { 20 | '' -> 'help', 21 | 'monitor' -> ['monitor', null], 22 | 'monitor ' -> 'monitor', 23 | 'unmonitor' -> ['unmonitor', null], 24 | 'unmonitor ' -> 'unmonitor', 25 | 'clear' -> 'clear', 26 | 'list' -> 'list', 27 | 'highlight' -> 'highlightAll', 28 | 'highlight ' -> 'highlight', 29 | }, 30 | 'arguments' -> { 31 | 'position' -> { 32 | 'type' -> 'pos', 33 | 'loaded' -> true 34 | } 35 | }, 36 | 'scope' -> 'player' 37 | }; 38 | 39 | _error(error) -> ( 40 | print(format(str('r %s', error))); 41 | run(str('playsound block.note_block.didgeridoo master %s', player())); 42 | exit(); 43 | ); 44 | 45 | help() -> ( 46 | texts = [ 47 | 'fs ' + ' ' * 80, ' \n', 48 | '#2980B9b Period', if(_checkVersion('1.4.57'), '@https://github.com/CommandLeo/scarpet/wiki/Period'), 'g by ', '#%color%b CommandLeo', '^g https://github.com/CommandLeo', if(_checkVersion('1.4.57'), '@https://github.com/CommandLeo'), ' \n\n', 49 | '%color% /%app_name% monitor []', 'f |', 'g Starts monitoring the block you are looking at or at the specified position', ' \n', 50 | '%color% /%app_name% unmonitor []', 'f |', 'g Unmonitors the block you are looking at or at the specified position', ' \n', 51 | '%color% /%app_name% clear', 'f |', 'g Unmonitors all blocks', ' \n', 52 | '%color% /%app_name% list', 'f |', 'g Lists all monitored blocks', ' \n', 53 | '%color% /%app_name% highlight', 'f |', 'g Highlights all monitored blocks', ' \n', 54 | 'fs ' + ' ' * 80 55 | ]; 56 | replacement_map = {'%app_name%' -> system_info('app_name'), '%color%' -> global_color}; 57 | print(format(map(texts, reduce(pairs(replacement_map), replace(_a, ..._), _)))); 58 | ); 59 | 60 | isValid(block) -> ( 61 | return( 62 | block~'command_block' != null // isCommandBlock 63 | || has(global_littables, str(block)) // isLittable 64 | || first(global_valid_blockstates, block_state(block, _)) != null // isRedstoneComponent 65 | ); 66 | ); 67 | 68 | isActive(block) -> ( 69 | return( 70 | bool(block_state(block, 'extended')) // isExtendedPiston 71 | || bool(block_state(block, 'triggered')) // isTriggered 72 | || block == 'hopper' && !bool(block_state(block, 'enabled')) // isDisabledHopper 73 | || block_state(str(block), 'lit') != block_state(block, 'lit') // isLit 74 | || bool(block_state(block, 'powered')) || block_state(block, 'power') > 0 || bool(block_data(block):'powered') // isPowered 75 | ); 76 | ); 77 | 78 | monitor(position) -> ( 79 | target = if(position, block(position), query(player(), 'trace', 5, 'blocks')); 80 | if(!target, _error('You must be looking at a block')); 81 | if(!isValid(target), _error('Invalid block')); 82 | 83 | dimension = current_dimension(); 84 | data = {'position' -> pos(target), 'dimension' -> dimension}; 85 | if(has(global_monitored, data), _error('That block is already being monitored')); 86 | global_monitored += data; 87 | 88 | run(str('playsound minecraft:block.note_block.pling master %s', player())); 89 | print(format('f » ', 'g Started monitoring ', str('gi %s', target), 'g at ', str('%s %s', global_color, str(pos(target))), str('^g %s', dimension), str('!/%s highlight %d %d %d %s', system_info('app_name'), ...pos(target), dimension))); 90 | ); 91 | 92 | unmonitor(position) -> ( 93 | target = if(position, block(position), query(player(), 'trace', 5, 'blocks')); 94 | if(!target, _error('You must be looking at a block')); 95 | 96 | dimension = current_dimension(); 97 | data = {'position' -> pos(target), 'dimension' -> dimension}; 98 | if(!has(global_monitored, data), _error('That block is not being monitored')); 99 | delete(global_monitored, data); 100 | delete(global_data, data); 101 | 102 | run(str('playsound minecraft:item.shield.break master %s', player())); 103 | print(format('f » ', 'g Successfully unmonitored ', str('gi %s', target), 'g at ', str('%s %s', global_color, str(pos(target))), str('^g %s', dimension))); 104 | ); 105 | 106 | clear() -> ( 107 | l = length(global_monitored); 108 | if(!l, _error('No blocks are being monitored')); 109 | 110 | global_monitored = {}; 111 | global_data = {}; 112 | print(format('f » ', 'g Unmonitored ', str('%s %s ', global_color, l), str('g block%s', if(l == 1, '', 's')))); 113 | ); 114 | 115 | list() -> ( 116 | l = length(global_monitored); 117 | if(!l, _error('No blocks are being monitored')); 118 | run(str('playsound minecraft:block.note_block.pling master %s', player())); 119 | texts = reduce(global_monitored, dimension = _:'dimension'; 120 | position = _:'position'; 121 | block = in_dimension(dimension, block(position)); 122 | [..._a, ' \n', str('%s %s', global_color, str(position)), str('^g %s', dimension), str('!/execute in %s run tp @s %d %d %d', dimension, ...position), str('g %s ', block), '#EB4D4Bb ❌', '^g Click to unmonitor', str('!/execute in %s run %s unmonitor %d %d %d', dimension, system_info('app_name'), ...position), 'f |', '#8E44ADb ⚜', '^g Click to teleport', str('!/execute in %s run tp @s %d %d %d', dimension, ...position), 'f |', '#FBC531b ☀', '^g Click to highlight', str('!/%s highlight %d %d %d %s', system_info('app_name'), ...position, dimension)], 123 | ['f » ', 'g Monitoring ', str('%s %s ', global_color, l), str('g block%s:', if(l == 1, '', 's'))] 124 | ); 125 | print(format(texts)); 126 | ); 127 | 128 | highlightAll() -> ( 129 | l = length(global_monitored); 130 | if(l < 1, _error('There are no blocks to highlight')); 131 | 132 | for(global_monitored, in_dimension(_:'dimension', draw_shape('box', 100, {'player' -> player(), 'from' -> _:'position', 'to' -> _:'position' + 1, 'fill' -> global_highlight_color, 'color' -> 0}))); 133 | 134 | run(str('playsound minecraft:entity.evoker.cast_spell master %s', player())); 135 | print(format('f » ', 'g Highlighted ', str('%s %s ', global_color, l), str('g blocks%s', if(l == 1, '', 's')))); 136 | ); 137 | 138 | highlight(position, dimension) -> ( 139 | if(!has(global_monitored, {'position' -> position, 'dimension' -> dimension}), _error('That block is not being monitored')); 140 | 141 | in_dimension(dimension, draw_shape('box', 100, {'player' -> player(), 'from' -> position, 'to' -> position + 1, 'fill' -> global_highlight_color, 'color' -> 0})); 142 | run(str('playsound minecraft:entity.evoker.cast_spell master %s', player())); 143 | ); 144 | 145 | period() -> ( 146 | for(global_monitored, 147 | dimension = _:'dimension'; 148 | position = _:'position'; 149 | block = in_dimension(dimension, block(position)); 150 | if(!isValid(block) && block != 'moving_piston', 151 | delete(global_monitored, _); 152 | delete(global_data, _), 153 | 154 | if(isActive(block), 155 | if(!global_data:_:'was_active', ( 156 | global_data:_ = global_data:_ || {}; 157 | global_data:_:'was_active' = true; 158 | global_data:_:'on_tick' = tick_time() - 1 159 | ), 160 | 161 | global_data:_:'was_inactive', 162 | period_and_durations = [ 163 | tick_time() - global_data:_:'on_tick', 164 | global_data:_:'off_tick'-global_data:_:'on_tick', 165 | tick_time() - global_data:_:'off_tick' 166 | ]; 167 | if(global_data:_:'period' != period_and_durations, 168 | global_data:_:'period' = period_and_durations; 169 | if(player(), print(player(), format('#2980B9b Period', 'f » ', str('gi %s', block), 'g at ', str('%s %s', global_color, str(position)), str('^g %s', dimension), str('!/%s highlight %d %d %d %s', system_info('app_name'), ...position, dimension), 'f » ', str('%s %dgt', global_color, period_and_durations:0), str('^g Frequency: §3%.2fHz§7|On time: §3%dgt§7|Off time: §3%dgt', 20 / period_and_durations:0, period_and_durations:1, period_and_durations:2)))); 170 | ); 171 | global_data:_:'was_active' = false; 172 | global_data:_:'was_inactive' = false 173 | ), 174 | global_data:_:'was_active' && !global_data:_:'was_inactive', 175 | global_data:_:'off_tick' = tick_time(); 176 | global_data:_:'was_inactive' = true 177 | ) 178 | ) 179 | ); 180 | schedule(1, 'period'); 181 | ); 182 | 183 | __on_start() -> period(); -------------------------------------------------------------------------------- /programs/pulselength.sc: -------------------------------------------------------------------------------- 1 | // PulseLength by CommandLeo 2 | 3 | global_color = '#E74C3C'; 4 | global_valid_blockstates = {'powered', 'power', 'extended', 'triggered', 'enabled'}; 5 | global_littables = {'redstone_torch', 'redstone_wall_torch', 'redstone_lamp', 'redstone_ore'}; 6 | global_highlight_color = 0xE74C3C88; 7 | 8 | global_monitored = {}; 9 | 10 | _checkVersion(version) -> ( 11 | regex = '(\\d+)\.(\\d+)\.(\\d+)'; 12 | target_version = map(version~regex, number(_)); 13 | scarpet_version = map(system_info('scarpet_version')~regex, number(_)); 14 | return(scarpet_version >= target_version); 15 | ); 16 | 17 | __config() -> { 18 | 'commands' -> { 19 | '' -> 'help', 20 | 'monitor' -> ['monitor', null], 21 | 'monitor ' -> 'monitor', 22 | 'unmonitor' -> ['unmonitor', null], 23 | 'unmonitor ' -> 'unmonitor', 24 | 'clear' -> 'clear', 25 | 'list' -> 'list', 26 | 'highlight' -> 'highlightAll', 27 | 'highlight ' -> 'highlight', 28 | }, 29 | 'arguments' -> { 30 | 'position' -> { 31 | 'type' -> 'pos', 32 | 'loaded' -> true 33 | } 34 | }, 35 | 'scope' -> 'player' 36 | }; 37 | 38 | _error(error) -> ( 39 | print(format(str('r %s', error))); 40 | run(str('playsound block.note_block.didgeridoo master %s', player())); 41 | exit(); 42 | ); 43 | 44 | help() -> ( 45 | texts = [ 46 | 'fs ' + ' ' * 80, ' \n', 47 | '#C0392Bb PulseLength', if(_checkVersion('1.4.57'), '@https://github.com/CommandLeo/scarpet/wiki/PulseLength'), 'g by ', '#%color%b CommandLeo', '^g https://github.com/CommandLeo', if(_checkVersion('1.4.57'), '@https://github.com/CommandLeo'), ' \n\n', 48 | '%color% /%app_name% monitor []', 'f |', 'g Starts monitoring the block you are looking at or at the specified position', ' \n', 49 | '%color% /%app_name% unmonitor []', 'f |', 'g Unmonitors the block you are looking at or at the specified position', ' \n', 50 | '%color% /%app_name% clear', 'f |', 'g Unmonitors all blocks', ' \n', 51 | '%color% /%app_name% list', 'f |', 'g Lists all monitored blocks', ' \n', 52 | '%color% /%app_name% highlight', 'f |', 'g Highlights all monitored blocks', ' \n', 53 | 'fs ' + ' ' * 80 54 | ]; 55 | replacement_map = {'%app_name%' -> system_info('app_name'), '%color%' -> global_color}; 56 | print(format(map(texts, reduce(pairs(replacement_map), replace(_a, ..._), _)))); 57 | ); 58 | 59 | isValid(block) -> ( 60 | return( 61 | block~'command_block' != null // isCommandBlock 62 | || has(global_littables, str(block)) // isLittable 63 | || first(global_valid_blockstates, block_state(block, _)) != null // isRedstoneComponent 64 | ); 65 | ); 66 | 67 | isActive(block) -> ( 68 | return( 69 | bool(block_state(block, 'extended')) // isExtendedPiston 70 | || bool(block_state(block, 'triggered')) // isTriggered 71 | || block == 'hopper' && !bool(block_state(block, 'enabled')) // isDisabledHopper 72 | || block_state(str(block), 'lit') != block_state(block, 'lit') // isLit 73 | || bool(block_state(block, 'powered')) || block_state(block, 'power') > 0 || bool(block_data(block):'powered') // isPowered 74 | ); 75 | ); 76 | 77 | monitor(position) -> ( 78 | target = if(position, block(position), query(player(), 'trace', 5, 'blocks')); 79 | if(!target, _error('You must be looking at a block')); 80 | if(!isValid(target), _error('Invalid block')); 81 | 82 | dimension = current_dimension(); 83 | data = {'position' -> pos(target), 'dimension' -> dimension}; 84 | if(has(global_monitored, data), _error('That block is already being monitored')); 85 | global_monitored += data; 86 | 87 | run(str('playsound minecraft:block.note_block.pling master %s', player())); 88 | print(format('f » ', 'g Started monitoring ', str('gi %s', target), 'g at ', str('%s %s', global_color, str(pos(target))), str('^g %s', dimension), str('!/%s highlight %d %d %d %s', system_info('app_name'), ...pos(target), dimension))); 89 | ); 90 | 91 | unmonitor(position) -> ( 92 | target = if(position, block(position), query(player(), 'trace', 5, 'blocks')); 93 | if(!target, _error('You must be looking at a block')); 94 | 95 | dimension = current_dimension(); 96 | data = {'position' -> pos(target), 'dimension' -> dimension}; 97 | if(!has(global_monitored, data), _error('That block is not being monitored')); 98 | delete(global_monitored, data); 99 | 100 | run(str('playsound minecraft:item.shield.break master %s', player())); 101 | print(format('f » ', 'g Successfully unmonitored ', str('gi %s', target), 'g at ', str('%s %s', global_color, str(pos(target))), str('^g %s', dimension))); 102 | ); 103 | 104 | clear() -> ( 105 | l = length(global_monitored); 106 | if(!l, _error('No blocks are being monitored')); 107 | 108 | global_monitored = {}; 109 | print(format('f » ', 'g Unmonitored ', str('%s %s ', global_color, l), str('g block%s', if(l == 1, '', 's')))); 110 | ); 111 | 112 | list() -> ( 113 | l = length(global_monitored); 114 | if(!l, _error('No blocks are being monitored')); 115 | run(str('playsound minecraft:block.note_block.pling master %s', player())); 116 | texts = reduce(global_monitored, dimension = _:'dimension'; 117 | position = _:'position'; 118 | block = in_dimension(dimension, block(position)); 119 | [..._a, ' \n', str('%s %s', global_color, str(position)), str('^g %s', dimension), str('!/execute in %s run tp @s %d %d %d', dimension, ...position), str('g %s ', block), '#EB4D4Bb ❌', '^g Click to unmonitor', str('!/execute in %s run %s unmonitor %d %d %d', dimension, system_info('app_name'), ...position), 'f |', '#8E44ADb ⚜', '^g Click to teleport', str('!/execute in %s run tp @s %d %d %d', dimension, ...position), 'f |', '#FBC531b ☀', '^g Click to highlight', str('!/%s highlight %d %d %d %s', system_info('app_name'), ...position, dimension)], 120 | ['f » ', 'g Monitoring ', str('%s %s ', global_color, l), str('g block%s:', if(l == 1, '', 's'))] 121 | ); 122 | print(format(texts)); 123 | ); 124 | 125 | highlightAll() -> ( 126 | l = length(global_monitored); 127 | if(l < 1, _error('There are no blocks to highlight')); 128 | 129 | for(global_monitored, in_dimension(_:'dimension', draw_shape('box', 100, {'player' -> player(), 'from' -> _:'position', 'to' -> _:'position' + 1, 'fill' -> global_highlight_color, 'color' -> 0}))); 130 | 131 | run(str('playsound minecraft:entity.evoker.cast_spell master %s', player())); 132 | print(format('f » ', 'g Highlighted ', str('%s %s ', global_color, l), str('g blocks%s', if(l == 1, '', 's')))); 133 | ); 134 | 135 | highlight(position, dimension) -> ( 136 | if(!has(global_monitored, {'position' -> position, 'dimension' -> dimension}), _error('That block is not being monitored')); 137 | 138 | in_dimension(dimension, draw_shape('box', 100, {'player' -> player(), 'from' -> position, 'to' -> position + 1, 'fill' -> global_highlight_color, 'color' -> 0})); 139 | run(str('playsound minecraft:entity.evoker.cast_spell master %s', player())); 140 | ); 141 | 142 | pulselength() -> ( 143 | for(global_monitored, 144 | dimension = _:'dimension'; 145 | position = _:'position'; 146 | block = in_dimension(dimension, block(position)); 147 | if(!(isValid(block) || block == 'moving_piston'), delete(global_monitored, _), 148 | isActive(block), global_monitored:_ += 1, 149 | global_monitored:_ > 0, ( 150 | if(player(), print(player(), format('#C0392Bb PulseLength', 'f » ', str('gi %s', block), 'g at ', str('%s %s', global_color, str(position)), str('^g %s', dimension), str('!/%s highlight %d %d %d %s', system_info('app_name'), ...position, dimension), 'f » ', str('%s %dgt', global_color, global_monitored:_)))); 151 | global_monitored:_ = 0 152 | ) 153 | ); 154 | ); 155 | schedule(1, 'pulselength'); 156 | ); 157 | 158 | __on_start() -> pulselength(); -------------------------------------------------------------------------------- /programs/randomizer.sc: -------------------------------------------------------------------------------- 1 | // Item Randomizer by CommandLeo 2 | 3 | global_color = '#9B59B6'; 4 | global_containers = [...filter(item_list(), _~'shulker_box' != null), 'chest', 'barrel', 'hopper', 'dropper', 'dispenser']; 5 | global_modes = { 6 | 'single', 7 | 'single_random', 8 | 'single_stack', 9 | 'random', 10 | 'random_stacks', 11 | 'full', 12 | 'box_single', 13 | 'box_single_random', 14 | 'box_single_stack', 15 | 'box_random', 16 | 'box_random_stacks', 17 | 'box_full' 18 | }; 19 | global_obtainabilities = { 20 | 'everything' -> 'Everything', 21 | 'main_storage' -> 'Main Storage', 22 | 'survival_obtainables' -> 'Survival Obtainables' 23 | }; 24 | global_stackabilities = { 25 | 'stackables' -> [16, 64], 26 | '64_stackables' -> [64], 27 | '16_stackables' -> [16], 28 | 'unstackables' -> [1] 29 | }; 30 | global_error_messages = { 31 | 'ALLITEMS_NOT_INSTALLED' -> 'You must install the allitems script to use this feature', 32 | 'FILE_DELETION_ERROR' -> 'There was an error while deleting the file', 33 | 'FILE_WRITING_ERROR' -> 'There was an error while writing the file', 34 | 'INVALID_INDEX' -> 'Invalid index', 35 | 'INVALID_ITEMS' -> 'Invalid items: %s', 36 | 'ITEM_LIST_DOESNT_EXIST' -> 'The item list %s doesn\'t exist', 37 | 'ITEM_LIST_EMPTY' -> 'The %s item list is empty', 38 | 'NOT_A_CONTAINER' -> 'That block is not a container', 39 | 'NOT_LOOKING_AT_ANY_BLOCK' -> 'You are not looking at any block', 40 | 'NO_CONTAINER_FOUND' -> 'No container was found', 41 | 'NO_ENTRIES_TO_REMOVE' -> 'No entries to remove from the table', 42 | 'NO_ITEMS_FOUND' -> 'No items were found', 43 | 'NO_ITEMS_PROVIDED' -> 'No items were provided', 44 | 'NO_ITEMS_TO_ADD' -> 'No items to add to the item list', 45 | 'NO_TABLES' -> 'There are no tables saved', 46 | 'SELECTED_AREA_EMPTY' -> 'The selected area is empty', 47 | 'TABLE_ALREADY_EXISTS' -> 'A table with that name already exists', 48 | 'TABLE_DOESNT_EXIST' -> 'The table %s doesn\'t exist', 49 | 'TABLE_EMPTY' -> 'The %s table is empty' 50 | }; 51 | 52 | global_current_page = {}; 53 | 54 | _checkVersion(version) -> ( 55 | regex = '(\\d+)\.(\\d+)\.(\\d+)'; 56 | target_version = map(version~regex, number(_)); 57 | scarpet_version = map(system_info('scarpet_version')~regex, number(_)); 58 | return(scarpet_version >= target_version); 59 | ); 60 | 61 | __config() -> { 62 | 'strict' -> true, 63 | 'commands' -> { 64 | '' -> 'menu', 65 | 'help' -> 'help', 66 | 67 | 'create items ' -> 'createTableFromItems', 68 | 'create item_list ' -> 'createTableFromItemList', 69 | 'create all_items ' -> ['createTableFromAllItems', null], 70 | 'create all_items ' -> 'createTableFromAllItems', 71 | 'create containers' -> ['createTableFromContainers', null, null], 72 | 'create containers ' -> ['createTableFromContainers', null], 73 | 'create containers ' -> 'createTableFromContainers', 74 | 'create area ' -> 'createTableFromArea', 75 | 'rename ' -> 'renameTable', 76 | 'clone
' -> 'cloneTable', 77 | 'delete
' -> ['deleteTable', false], 78 | 'delete
confirm' -> ['deleteTable', true], 79 | 'edit
' -> 'editTable', 80 | 'edit
add items ' -> 'addEntriesToTableFromItems', 81 | 'edit
add table ' -> 'addEntriesToTableFromTable', 82 | 'edit
add containers' -> ['addEntriesToTableFromContainers', null, null], 83 | 'edit
add containers ' -> ['addEntriesToTableFromContainers', null], 84 | 'edit
add containers ' -> 'addEntriesToTableFromContainers', 85 | 'edit
add area ' -> 'addEntriesToTableFromArea', 86 | 'edit
remove items ' -> 'removeEntriesFromTableFromItems', 87 | 'edit
remove table ' -> 'removeEntriesFromTableFromTable', 88 | 'edit
remove index ' -> 'removeEntriesFromTableWithIndex', 89 | 'list' -> 'listTables', 90 | 'info
' -> 'infoTable', 91 | ...if(_checkVersion('1.4.57'), {'view
' -> 'viewTable'}, {}), 92 | 93 | 'insert
' -> ['insert', null, null], 94 | 'insert
' -> ['insert', null], 95 | 'insert
' -> 'insert', 96 | 97 | 'give
' -> 'giveContainer' 98 | }, 99 | 'arguments' -> { 100 | 'name' -> { 101 | 'type' -> 'term', 102 | 'suggest' -> [], 103 | 'case_sensitive' -> false 104 | }, 105 | 'table' -> { 106 | 'type' -> 'term', 107 | 'suggester' -> _(args) -> list_files('', 'text'), 108 | 'case_sensitive' -> false 109 | }, 110 | 'other_table' -> { 111 | 'type' -> 'term', 112 | 'suggester' -> _(args) -> list_files('', 'text'), 113 | 'case_sensitive' -> false 114 | }, 115 | 'index' -> { 116 | 'type' -> 'int', 117 | 'min' -> 0, 118 | 'suggester' -> _(args) -> ( 119 | table = args:'table'; 120 | items = _readTable(table); 121 | if(items, return([range(length(items))])); 122 | ) 123 | }, 124 | 'entries' -> { 125 | 'type' -> 'text', 126 | 'suggester' -> _(args) -> ( 127 | table = args:'table'; 128 | input = args:'entries'; 129 | entries = split(' ', input); 130 | items = filter(map(_readTable(table), _:0), entries~_ == null); 131 | if(entries && slice(input, -1) != ' ', delete(entries, -1)); 132 | return(if(entries, map(items, str('%s %s', join(' ', entries), _)), items)); 133 | ), 134 | 'case_sensitive' -> false 135 | }, 136 | 'items' -> { 137 | 'type' -> 'text', 138 | 'suggester' -> _(args) -> ( 139 | input = args:'items'; 140 | items = split(' ', input); 141 | if(items && slice(input, -1) != ' ', delete(items, -1)); 142 | return(if(items, map(item_list(), str('%s %s', join(' ', items), _)), item_list())); 143 | ), 144 | 'case_sensitive' -> false 145 | }, 146 | 'mode' -> { 147 | 'type' -> 'term', 148 | 'options' -> keys(global_modes), 149 | 'case_sensitive' -> false 150 | }, 151 | 'container' -> { 152 | 'type' -> 'term', 153 | 'options' -> global_containers, 154 | 'case_sensitive' -> false 155 | }, 156 | 'from_pos' -> { 157 | 'type' -> 'pos', 158 | 'loaded' -> true 159 | }, 160 | 'to_pos' -> { 161 | 'type' -> 'pos', 162 | 'loaded' -> true 163 | }, 164 | 'item_list' -> { 165 | 'type' -> 'term', 166 | 'suggester' -> _(args) -> map(list_files('item_lists', 'shared_text'), slice(_, length('item_lists') + 1)), 167 | 'case_sensitive' -> false 168 | }, 169 | 'obtainability' -> { 170 | 'type' -> 'term', 171 | 'options' -> keys(global_obtainabilities) 172 | }, 173 | 'stackability' -> { 174 | 'type' -> 'term', 175 | 'options' -> keys(global_stackabilities) 176 | } 177 | }, 178 | 'requires' -> { 179 | 'carpet' -> '>=1.4.44' 180 | }, 181 | 'scope' -> 'global' 182 | }; 183 | 184 | // HELPER FUNCTIONS 185 | 186 | _error(error) -> ( 187 | print(format(str('r %s', error))); 188 | run('playsound block.note_block.didgeridoo master @s'); 189 | exit(); 190 | ); 191 | 192 | _removeDuplicates(list) -> filter(list, list~_ == _i); 193 | 194 | // UTILITY FUNCTIONS 195 | 196 | _readTable(table) -> ( 197 | regex = '(\\w+)(\\{.+\\})?'; 198 | entries = map(read_file(table, 'text'), results = _~regex; [lower(results:0), results:1 || null]); 199 | return(filter(entries, _ && _:0 != 'air' && item_list()~(_:0) != null)); 200 | ); 201 | 202 | _readItemList(item_list) -> ( 203 | item_list_path = str('item_lists/%s', item_list); 204 | regex = '(\\w+)(\\{.+\\})?'; 205 | entries = map(filter(read_file(item_list_path, 'shared_text'), _), results = _~regex; [lower(results:0), results:1 || null]); 206 | return(entries); 207 | ); 208 | 209 | _itemToString(item_duple) -> ( 210 | [item, nbt] = item_duple; 211 | return(item + (nbt || '')); 212 | ); 213 | 214 | _itemToMap(slot, item, count, nbt) -> ( 215 | if( 216 | system_info('game_pack_version') >= 33, 217 | {'slot' -> slot, 'item' -> {'id' -> item, 'count' -> count, 'components' -> if(nbt, parse_nbt(nbt), {})}}, 218 | // else 219 | {'Slot' -> slot, 'id' -> item, 'Count' -> count, ...if(nbt, {'tag' -> parse_nbt(nbt)}, {})} 220 | ); 221 | ); 222 | 223 | _giveCommand(item, nbt) -> ( 224 | return('give @s ' + item + if(nbt, if(system_info('game_pack_version') >= 33, '[' + join(',', map(nbt, _ + '=' + encode_nbt(nbt:_, true))) + ']', encode_nbt(nbt, true)), '')); 225 | ); 226 | 227 | _getItemFromBlock(block) -> ( 228 | if(item_list()~block != null, return(str(block))); 229 | 230 | return( 231 | if( 232 | block == 'bamboo_sapling', 'bamboo', 233 | block == 'beetroots', 'beetroot', 234 | block == 'big_dripleaf_stem', 'big_dripleaf', 235 | block == 'carrots', 'carrot', 236 | block == 'cocoa', 'cocoa_beans', 237 | block == 'pitcher_crop', 'pitcher_plant', 238 | block == 'potatoes', 'potato', 239 | block == 'powder_snow', 'powder_snow_bucket', 240 | block == 'redstone_wire', 'redstone', 241 | block == 'sweet_berry_bush', 'sweet_berries', 242 | block == 'tall_seagrass', 'seagrass', 243 | block == 'torchflower_crop', 'torchflower', 244 | block == 'tripwire', 'string', 245 | block~'cake', 'cake', 246 | block~'cauldron', 'cauldron', 247 | block~'cave_vine', 'glow_berries', 248 | block~'melon', 'melon_seeds', 249 | block~'pumpkin', 'pumpkin_seeds', 250 | block~'azalea_bush', replace(replace(block, '_bush', ''), 'potted_', ''), 251 | block~'plant', replace(block, '_plant', ''), 252 | block~'potted', replace(block, 'potted_', ''), 253 | block~'wall', replace(block, 'wall_', '') 254 | ) 255 | ); 256 | ); 257 | 258 | _getReadingComparators(pos) -> ( 259 | comparators = []; 260 | map(['north', 'east', 'south', 'west'], 261 | block1 = block(pos_offset(pos, _, -1)); 262 | if( 263 | block1 == 'comparator' && block_state(block1, 'facing') == _, 264 | comparators += block1, 265 | solid(block1) && inventory_has_items(block1) == null, 266 | block2 = block(pos_offset(block1, _, -1)); 267 | if(block2 == 'comparator' && block_state(block2, 'facing') == _, comparators += block2); 268 | ); 269 | ); 270 | return(comparators); 271 | ); 272 | 273 | _updateComparators(block) -> ( 274 | for(_getReadingComparators(block), update(_)); 275 | ); 276 | 277 | _getRandomContents(mode, items, size) -> ( 278 | if(!items, return([])); 279 | [item, nbt] = rand(items); 280 | 281 | return(if( 282 | mode == 'single', 283 | [[item, 1, nbt]], 284 | mode == 'single_random', 285 | [[item, ceil(rand(stack_limit(item))), nbt]], 286 | mode == 'single_stack', 287 | [[item, stack_limit(item), nbt]], 288 | mode == 'random', 289 | map(range(size), [item, nbt] = rand(items); [item, ceil(rand(stack_limit(item))), nbt]), 290 | mode == 'random_stacks', 291 | map(range(size), [item, nbt] = rand(items); [item, stack_limit(item), nbt]), 292 | mode == 'full', 293 | map(range(size), [item, stack_limit(item), nbt]), 294 | mode~'box', 295 | map(range(size), item_maps = map(_getRandomContents(mode~'box_(.+)', items, 27), [item, count, nbt] = _; _itemToMap(_i, item, count, nbt)); ['white_shulker_box', 1, encode_nbt(if(system_info('game_pack_version') >= 33, {'container' -> item_maps}, {'BlockEntityTag' -> {'Items' -> item_maps}}), true)]) 296 | )); 297 | ); 298 | 299 | // MAIN 300 | 301 | menu() -> ( 302 | texts = [ 303 | 'fs ' + ' ' * 80, ' \n', 304 | str('%sb Item Randomizer', global_color), if(_checkVersion('1.4.57'), ...['@https://github.com/CommandLeo/scarpet/wiki/Item-Randomizer', '^g Click to visit the wiki']), 'g by ', str('%sb CommandLeo', global_color), '^g https://github.com/CommandLeo', if(_checkVersion('1.4.57'), '@https://github.com/CommandLeo'),' \n\n', 305 | 'g A tool to easily insert random items inside containers.', ' \n', 306 | 'g Run ', str('%s /%s help', global_color, system_info('app_name')), str('!/%s help', system_info('app_name')), '^g Click to run the command', 'g to see a list of all the commands.', ' \n', 307 | 'fs ' + ' ' * 80 308 | ]; 309 | print(format(texts)); 310 | ); 311 | 312 | help() -> ( 313 | texts = [ 314 | 'fs ' + ' ' * 80, ' \n', 315 | '%color% /%app_name% create items ', 'f |', 'g Creates a table from a list of items', ' \n', 316 | '%color% /%app_name% create item_list ', 'f |', 'g Creates a table from an item list', ' \n', 317 | '%color% /%app_name% create container []', 'f |', 'g Creates a table from the items inside the container you are looking at or at the specified coords', ' \n', 318 | '%color% /%app_name% create area ', 'f |', 'g Creates a table from the blocks within the specified coordinates', ' \n', 319 | '%color% /%app_name% delete
', 'f |', 'g Deletes a table', ' \n', 320 | '%color% /%app_name% clone
', 'f |', 'g Creates a new table with the content of another table', ' \n', 321 | '%color% /%app_name% list', 'f |', 'g Lists all existing tables', ' \n', 322 | '%color% /%app_name% info
', 'f |', 'g Displays information about a table', ' \n', 323 | if(_checkVersion('1.4.57'), ...['%color% /%app_name% view
', 'f |', 'g Displays the content of a table inside a fancy GUI', ' \n']), 324 | '%color% /%app_name% edit
', 'f |', 'g Prints a menu to edit a table', ' \n', 325 | '%color% /%app_name% edit
add items ', 'f |', 'g Adds items to a table', ' \n', 326 | '%color% /%app_name% edit
add table
', 'f |', 'g Adds items to a table from another table', ' \n', 327 | '%color% /%app_name% edit
remove items ', 'f |', 'g Removes items from a table', ' \n', 328 | '%color% /%app_name% edit
remove index ', 'f |', 'g Removes a specific item from a table', ' \n', 329 | '%color% /%app_name% edit
remove table
', 'f |', 'g Remove from a table the items contained in another table', ' \n', 330 | '%color% /%app_name% insert
[]', 'f |', 'g Inserts the table in the container you are looking at or at the specified coords', ' \n', 331 | '%color% /%app_name% export
', 'f |', 'g Exports the table as a loot table in a datapack', ' \n', 332 | 'fs ' + ' ' * 80 333 | ]; 334 | replacement_map = {'%app_name%' -> system_info('app_name'), '%color%' -> global_color}; 335 | print(format(map(texts, reduce(pairs(replacement_map), replace(_a, ..._), _)))); 336 | ); 337 | 338 | // TABLES 339 | 340 | createTableFromItems(name, item_string) -> ( 341 | items = map(split(' ', item_string), [lower(_), null]); 342 | 343 | createTable(name, items); 344 | ); 345 | 346 | createTableFromItemList(name, item_list) -> ( 347 | item_list_path = str('item_lists/%s', item_list); 348 | if(list_files('item_lists', 'shared_text')~item_list_path == null, _error(str(global_error_messages:'ITEM_LIST_DOESNT_EXIST', item_list))); 349 | 350 | items = _readItemList(item_list); 351 | if(!items, _error(str(global_error_messages:'ITEM_LIST_EMPTY', item_list))); 352 | 353 | createTable(name, items); 354 | ); 355 | 356 | createTableFromAllItems(name, category, stackability) -> ( 357 | items = map(item_list(), [_, null]); 358 | survival_unobtainable_items = system_variable_get('survival_unobtainable_items'); 359 | junk_items = system_variable_get('junk_items'); 360 | firework_rockets = map(range(3), ['firework_rocket', if(system_info('game_pack_version') >= 33, {'fireworks' -> {'flight_duration' -> _ + 1}}, {'Fireworks' -> {'Flight' -> _ + 1}})]); 361 | if((category == 'main_storage' || category == 'survival_obtainables') && (!survival_unobtainable_items || !junk_items), _error(global_error_messages:'ALLITEMS_NOT_INSTALLED')); 362 | if(category == 'main_storage', put(items, items~['firework_rocket', null], firework_rockets, 'extend')); 363 | items = filter(items, 364 | [item, nbt] = _; 365 | category_check = if( 366 | category == 'main_storage', 367 | survival_unobtainable_items~item == null && (junk_items~item == null || nbt != null) && item~'shulker_box' == null, 368 | category == 'survival_obtainables', 369 | survival_unobtainable_items~item == null, 370 | true 371 | ); 372 | stackability_check = !stackability || global_stackabilities:stackability~stack_limit(item) != null; 373 | item != 'air' && category_check && stackability_check; 374 | ); 375 | 376 | createTable(name, items); 377 | ); 378 | 379 | createTableFromContainers(name, from_pos, to_pos) -> ( 380 | trace = query(player(), 'trace', 5, 'blocks'); 381 | if(!from_pos, 382 | if(!trace, _error(global_error_messages:'NOT_LOOKING_AT_ANY_BLOCK')); 383 | from_pos = trace; 384 | ); 385 | if(!to_pos, 386 | if(inventory_has_items(from_pos) == null, _error(global_error_messages:'NOT_A_CONTAINER')); 387 | to_pos = from_pos; 388 | ); 389 | 390 | items = []; 391 | container_found = false; 392 | 393 | volume(from_pos, to_pos, 394 | block = _; 395 | 396 | if(inventory_has_items(from_pos), 397 | container_found = true; 398 | loop(inventory_size(block), item_tuple = inventory_get(block, _); if(item_tuple, [item, count, nbt] = item_tuple; items += [item, if(system_info('game_pack_version') >= 33, nbt:'components', nbt)])); 399 | ); 400 | ); 401 | 402 | if(!container_found, _error(global_error_messages:'NO_CONTAINER_FOUND')); 403 | if(!items, _error(global_error_messages:'NO_ITEMS_FOUND')); 404 | 405 | createTable(name, _removeDuplicates(items)); 406 | ); 407 | 408 | createTableFromArea(name, from_pos, to_pos) -> ( 409 | items = {}; 410 | ignored_blocks = {}; 411 | volume(from_pos, to_pos, item = _getItemFromBlock(_); if(item, items += [item, null], ignored_blocks += str(_))); 412 | 413 | if(ignored_blocks, print(format('f » ', str('g The following blocks were ignored: %s', join(', ', keys(ignored_blocks)))))); 414 | if(!items, _error(global_error_messages:'SELECTED_AREA_EMPTY')); 415 | 416 | createTable(name, keys(items)); 417 | ); 418 | 419 | createTable(name, items) -> ( 420 | if(list_files('', 'text')~name != null, _error(global_error_messages:'TABLE_ALREADY_EXISTS')); 421 | if(!items, _error(global_error_messages:'NO_ITEMS_PROVIDED')); 422 | 423 | invalid_items = filter(map(items, _:0), item_list()~_ == null); 424 | if(invalid_items, _error(str(global_error_messages:'INVALID_ITEMS', join(', ', sort(_removeDuplicates(invalid_items)))))); 425 | 426 | success = write_file(name, 'text', map(items, _itemToString(_))); 427 | 428 | if(!success, _error(global_error_messages:'FILE_WRITING_ERROR')); 429 | print(format('f » ', 'g Successfully created the ', str('%s %s', global_color, name), str('^g /%s %s %s', system_info('app_name'), if(_checkVersion('1.4.57'), 'view', 'info'), name), str('!/%s %s %s', system_info('app_name'), if(_checkVersion('1.4.57'), 'view', 'info'), name), 'g table')); 430 | run('playsound block.note_block.pling master @s'); 431 | ); 432 | 433 | renameTable(table, name) -> ( 434 | if(list_files('', 'text')~table == null, _error(str(global_error_messages:'TABLE_DOESNT_EXIST', table))); 435 | if(list_files('', 'text')~name != null, _error(global_error_messages:'TABLE_ALREADY_EXISTS')); 436 | 437 | success1 = write_file(name, 'text', read_file(table, 'text')); 438 | if(!success1, _error(global_error_messages:'FILE_WRITING_ERROR')); 439 | success2 = delete_file(table, 'text'); 440 | if(!success2, _error(global_error_messages:'FILE_DELETION_ERROR')); 441 | 442 | print(format('f » ', 'g Successfully renamed the ', str('%s %s', global_color, table), 'g table to ', str('%s %s', global_color, name))); 443 | run('playsound block.note_block.pling master @s'); 444 | ); 445 | 446 | cloneTable(table, name) -> ( 447 | if(list_files('', 'text')~table == null, _error(str(global_error_messages:'TABLE_DOESNT_EXIST', table))); 448 | if(list_files('', 'text')~name != null, _error(global_error_messages:'TABLE_ALREADY_EXISTS')); 449 | 450 | success = write_file(name, 'text', read_file(table, 'text')); 451 | if(!success, _error(global_error_messages:'FILE_WRITING_ERROR')); 452 | print(format('f » ', 'g Successfully cloned the ', str('%s %s', global_color, table), 'g table')); 453 | run('playsound block.note_block.pling master @s'); 454 | ); 455 | 456 | deleteTable(table, confirmation) -> ( 457 | if(list_files('', 'text')~table == null, _error(str(global_error_messages:'TABLE_DOESNT_EXIST', table))); 458 | 459 | if(!confirmation, exit(print(format('f » ', 'g Click ', str('%sbu here', global_color), str('^g /%s delete %s confirm', system_info('app_name'), table), str('!/%s delete %s confirm', system_info('app_name'), table),'g to confirm the deletion of the ', str('%s %s', global_color, table), 'g table')))); 460 | success = delete_file(table, 'text'); 461 | 462 | if(!success, _error(global_error_messages:'FILE_DELETION_ERROR')); 463 | print(format('f » ', 'g Successfully deleted the ', str('%s %s', global_color, table), 'g table')); 464 | run('playsound minecraft:item.shield.break master @s'); 465 | ); 466 | 467 | editTable(table) -> ( 468 | if(list_files('', 'text')~table == null, _error(str(global_error_messages:'TABLE_DOESNT_EXIST', table))); 469 | 470 | items = _readTable(table); 471 | if(!items, _error(str(global_error_messages:'TABLE_EMPTY', table))); 472 | 473 | print(format(reduce(items, [item, nbt] = _; [..._a, ' \n ', '#EB4D4Bb ❌', '^r Remove the item', str('?/%s edit %s remove index %d', system_info('app_name'), table, _i), ' ', str('g%s %s%s', if(item_list()~item == null, 's', ''), item, if(nbt, '*', '')), str('!/%s', _giveCommand(item, nbt)), if(item_list()~item == null, '^g Invalid item', nbt, str('^g %s', nbt), ''), str('!/%s', _giveCommand(item, nbt))], ['f » ', 'g Edit the ', str('%s %s', global_color, table), 'g item list: ', '#26DE81b (+)', '^#26DE81 Add more items', str('?/%s edit %s add', system_info('app_name'), table)]))); 474 | ); 475 | 476 | addEntriesToTableFromItems(table, item_string) -> ( 477 | items = map(split(' ', item_string), [lower(_), null]); 478 | 479 | addEntriesToTable(table, items); 480 | ); 481 | 482 | addEntriesToTableFromTable(table, other_table) -> ( 483 | if(list_files('', 'text')~table == null, _error(str(global_error_messages:'TABLE_DOESNT_EXIST', table))); 484 | if(list_files('', 'text')~other_table == null, _error(str(global_error_messages:'TABLE_DOESNT_EXIST', other_table))); 485 | 486 | addEntriesToTable(table, _readTable(other_table)); 487 | ); 488 | 489 | addEntriesToTableFromContainers(table, from_pos, to_pos) -> ( 490 | trace = query(player(), 'trace', 5, 'blocks'); 491 | if(!from_pos, 492 | if(!trace, _error(global_error_messages:'NOT_LOOKING_AT_ANY_BLOCK')); 493 | from_pos = trace; 494 | ); 495 | if(!to_pos, 496 | if(inventory_has_items(from_pos) == null, _error(global_error_messages:'NOT_A_CONTAINER')); 497 | to_pos = from_pos; 498 | ); 499 | 500 | items = []; 501 | container_found = false; 502 | 503 | volume(from_pos, to_pos, 504 | block = _; 505 | 506 | if(inventory_has_items(from_pos), 507 | container_found = true; 508 | loop(inventory_size(block), item_tuple = inventory_get(block, _); if(item_tuple, [item, count, nbt] = item_tuple; items += [item, if(system_info('game_pack_version') >= 33, nbt:'components', nbt)])); 509 | ); 510 | ); 511 | 512 | if(!container_found, _error(global_error_messages:'NO_CONTAINER_FOUND')); 513 | if(!items, _error(global_error_messages:'NO_ITEMS_FOUND')); 514 | 515 | addEntriesToTable(table, _removeDuplicates(items)); 516 | ); 517 | 518 | addEntriesToTableFromArea(table, from_pos, to_pos) -> ( 519 | items = {}; 520 | ignored_blocks = {}; 521 | volume(from_pos, to_pos, item = _getItemFromBlock(_); if(item, items += [item, null], ignored_blocks += str(_))); 522 | 523 | if(ignored_blocks, print(format('f » ', str('g The following blocks were ignored: %s', join(', ', keys(ignored_blocks)))))); 524 | if(!items, _error(global_error_messages:'SELECTED_AREA_EMPTY')); 525 | 526 | addEntriesToTable(table, keys(items)); 527 | ); 528 | 529 | addEntriesToTable(table, entries) -> ( 530 | if(list_files('', 'text')~table == null, _error(str(global_error_messages:'TABLE_DOESNT_EXIST', table))); 531 | 532 | items = _readTable(table); 533 | if(!items, _error(global_error_messages:'NO_ITEMS_TO_ADD')); 534 | 535 | invalid_items = filter(map(items, _:0), item_list()~_ == null); 536 | if(invalid_items, _error(str(global_error_messages:'INVALID_ITEMS', join(', ', sort(_removeDuplicates(invalid_items)))))); 537 | 538 | success = write_file(table, 'text', map(entries, _itemToString(_))); 539 | 540 | if(!success, _error(global_error_messages:'FILE_WRITING_ERROR')); 541 | print(format('f » ', 'g Successfully added the items to the ', str('%s %s', global_color, table), 'g table')); 542 | run('playsound block.note_block.pling master @s'); 543 | ); 544 | 545 | removeEntriesFromTableFromItems(table, item_string) -> ( 546 | items = map(split(' ', item_string), [lower(_), null]); 547 | 548 | removeEntriesFromTable(table, items); 549 | ); 550 | 551 | removeEntriesFromTableFromTable(table, other_table) -> ( 552 | if(list_files('', 'text')~table == null, _error(str(global_error_messages:'TABLE_DOESNT_EXIST', table))); 553 | if(list_files('', 'text')~other_table == null, _error(str(global_error_messages:'TABLE_DOESNT_EXIST', other_table))); 554 | 555 | removeEntriesFromTable(table, _readTable(other_table)); 556 | ); 557 | 558 | removeEntriesFromTable(table, entries) -> ( 559 | if(list_files('', 'text')~table == null, _error(str(global_error_messages:'TABLE_DOESNT_EXIST', table))); 560 | 561 | items = _readTable(table); 562 | 563 | l1 = length(items); 564 | items = filter(items, [item, nbt] = _; entries~[item, nbt] == null && entries~[item, null] == null); 565 | l2 = length(items); 566 | if(l2 == l1, _error(global_error_messages:'NO_ENTRIES_TO_REMOVE')); 567 | 568 | delete_file(table, 'text'); 569 | success = write_file(table, 'text', map(items, _itemToString(_))); 570 | 571 | if(!success, _error(global_error_messages:'FILE_WRITING_ERROR')); 572 | print(format('f » ', 'g Successfully removed the items from the ', str('%s %s', global_color, table), 'g table')); 573 | run('playsound block.note_block.pling master @s'); 574 | ); 575 | 576 | removeEntriesFromTableWithIndex(table, index) -> ( 577 | if(list_files('', 'text')~table == null, _error(str(global_error_messages:'TABLE_DOESNT_EXIST', table))); 578 | 579 | items = _readTable(table); 580 | if(index < 0 || index >= length(items), _error(global_error_messages:'INVALID_INDEX')); 581 | 582 | delete(items:index); 583 | 584 | delete_file(table, 'text'); 585 | success = write_file(table, 'text', map(items, _itemToString(_))); 586 | 587 | if(!success, _error(global_error_messages:'FILE_WRITING_ERROR')); 588 | print(format('f » ', 'g Successfully removed the item from the ', str('%s %s', global_color, table), 'g table')); 589 | run('playsound block.note_block.pling master @s'); 590 | ); 591 | 592 | listTables() -> ( 593 | tables = list_files('', 'text'); 594 | if(!tables, _error(global_error_messages:'NO_TABLES')); 595 | 596 | texts = reduce(tables, 597 | [..._a, if(_i == 0, '', 'g , '), str('%s %s', global_color, _), str('^g /%s %s %s', system_info('app_name'), if(_checkVersion('1.4.57'), 'view', 'info'), _), str('?/%s %s %s', system_info('app_name'), if(_checkVersion('1.4.57'), 'view', 'info'), _)], 598 | ['f » ', 'g Saved tables: '] 599 | ); 600 | print(format(texts)); 601 | ); 602 | 603 | infoTable(table) -> ( 604 | if(list_files('', 'text')~table == null, _error(str(global_error_messages:'TABLE_DOESNT_EXIST', table))); 605 | 606 | items = _readTable(table); 607 | if(!items, _error(str(global_error_messages:'TABLE_EMPTY', table))); 608 | 609 | texts = reduce(items, [item, nbt] = _; [..._a, if(length(items) < 12, ' \n', if(_i == 0, '', 'g , ')), str('g %s', if(length(items) < 12, ' ', '')), str('g%s %s%s', if(item_list()~item == null, 's', ''), item, if(nbt, '*', '')), str('!/%s', _giveCommand(item, nbt)), if(item_list()~item == null, '^g Invalid item', nbt, str('^g %s', nbt), '')], ['f » ', 'g The ', str('%s %s', global_color, table), 'g table contains the following items: ']); 610 | print(format(texts)); 611 | ); 612 | 613 | viewTable(table) -> ( 614 | if(list_files('', 'text')~table == null, _error(str(global_error_messages:'TABLE_DOESNT_EXIST', table))); 615 | 616 | entries = _readTable(table); 617 | items = filter(entries, [item, nbt] = _; item != 'air' && item_list()~item != null); 618 | if(!items, _error(str(global_error_messages:'TABLE_EMPTY', table))); 619 | 620 | pages = map(range(length(items) / 45), slice(items, _i * 45, min(length(items), (_i + 1) * 45))); 621 | 622 | _setMenuInfo(screen, page_count, pages_length, items_length) -> ( 623 | name = str('\'{"text":"Page %d/%d","color":"%s","italic":false}\'', page_count % pages_length + 1, pages_length, global_color); 624 | lore = [str('\'{"text":"%s entries","color":"gray","italic":false}\'', items_length)]; 625 | nbt = if(system_info('game_pack_version') >= 33, {'components' -> {'custom_name' -> name, 'lore' -> lore}, 'id' -> 'paper'}, {'display' -> {'Name' -> name, 'Lore' -> lore}}); 626 | inventory_set(screen, 49, 1, 'paper', nbt); 627 | ); 628 | 629 | _setMenuItems(screen, page) -> ( 630 | loop(45, [item, nbt] = page:_; inventory_set(screen, _, if(_ < length(page), 1, 0), item, if(system_info('game_pack_version') >= 33, {'components' -> nbt, 'id' -> item}, nbt))); 631 | ); 632 | 633 | global_current_page:player() = 0; 634 | 635 | screen = create_screen(player(), 'generic_9x6', table, _(screen, player, action, data, outer(pages), outer(items)) -> ( 636 | if(length(pages) > 1 && action == 'pickup' && (data:'slot' == 48 || data:'slot' == 50), 637 | page = if(data:'slot' == 48, pages:(global_current_page:player += -1), data:'slot' == 50, pages:(global_current_page:player += 1)); 638 | _setMenuInfo(screen, global_current_page:player, length(pages), length(items)); 639 | _setMenuItems(screen, page); 640 | ); 641 | if(action == 'pickup_all' || action == 'quick_move' || (action != 'clone' && data:'slot' != null && 0 <= data:'slot' <= 44) || (45 <= data:'slot' <= 53), return('cancel')); 642 | )); 643 | 644 | _setMenuItems(screen, pages:0); 645 | 646 | for(range(45, 54), inventory_set(screen, _, 1, 'gray_stained_glass_pane', if(system_info('game_pack_version') >= 33, {'components' -> {'hide_tooltip' -> {}}, 'id' -> 'gray_stained_glass_pane'}, {'display' -> {'Name' -> '\'{"text":""}\''}}))); 647 | _setMenuInfo(screen, global_current_page:player(), length(pages), length(items)); 648 | if(length(pages) > 1, 649 | inventory_set(screen, 48, 1, 'arrow', if(system_info('game_pack_version') >= 33, {'components' -> {'custom_name' -> str('\'{"text":"Previous page","color":"%s","italic":false}\'', global_color)}, 'id' -> 'arrow'}, {'display' -> {'Name' -> str('\'{"text":"Previous page","color":"%s","italic":false}\'', global_color)}})); 650 | inventory_set(screen, 50, 1, 'arrow', if(system_info('game_pack_version') >= 33, {'components' -> {'custom_name' -> str('\'{"text":"Next page","color":"%s","italic":false}\'', global_color)}, 'id' -> 'arrow'}, {'display' -> {'Name' -> str('\'{"text":"Next page","color":"%s","italic":false}\'', global_color)}})); 651 | ); 652 | ); 653 | 654 | // INSERTION 655 | 656 | insert(mode, table, from_pos, to_pos) -> ( 657 | trace = query(player(), 'trace', 5, 'blocks'); 658 | if(!from_pos, 659 | if(!trace, _error(global_error_messages:'NOT_LOOKING_AT_ANY_BLOCK')); 660 | from_pos = trace; 661 | ); 662 | if(!to_pos, 663 | if(inventory_has_items(from_pos) == null, _error(global_error_messages:'NOT_A_CONTAINER')); 664 | to_pos = from_pos; 665 | ); 666 | 667 | if(list_files('', 'text')~table == null, _error(str(global_error_messages:'TABLE_DOESNT_EXIST', table))); 668 | 669 | items = _readTable(table); 670 | if(!items, _error(str(global_error_messages:'TABLE_EMPTY', table))); 671 | 672 | last_block = null; 673 | affected_blocks = volume(from_pos, to_pos, 674 | block = _; 675 | 676 | if(inventory_has_items(block) != null, 677 | size = inventory_size(block); 678 | loop(size, inventory_set(block, _, 0)); 679 | for(_getRandomContents(mode, items, size), [item, count, nbt] = _; inventory_set(block, _i, count, item, if(system_info('game_pack_version') >= 33, {'components' -> nbt, 'id' -> item}, nbt))); 680 | _updateComparators(block); 681 | last_block = block; 682 | ); 683 | ); 684 | 685 | if( 686 | affected_blocks == 0, 687 | _error(global_error_messages:'NO_CONTAINER_FOUND'), 688 | affected_blocks == 1, 689 | print(format('f » ', 'g Inserted the ', str('%s %s', global_color, table), 'g table in ', str('gi %s', last_block), 'g at ' + pos(last_block))), 690 | // else 691 | print(format('f » ', 'g Inserted the ', str('%s %s', global_color, table), 'g table in ', str('%s %s', global_color, affected_blocks), str('g container%s', if(affected_blocks == 1, '', 's')))); 692 | ); 693 | run('playsound block.note_block.pling master @s'); 694 | ); 695 | 696 | giveContainer(container, mode, table) -> ( 697 | if(list_files('', 'text')~table == null, _error(str(global_error_messages:'TABLE_DOESNT_EXIST', table))); 698 | 699 | items = _readTable(table); 700 | if(!items, _error(str(global_error_messages:'TABLE_EMPTY', table))); 701 | 702 | 703 | item_maps = map(_getRandomContents(mode, items, 27), _itemToMap(_i, ..._)); 704 | run(_giveCommand(container, if(system_info('game_pack_version') >= 33, {'container' -> item_maps}, {'BlockEntityTag' -> {'Items' -> item_maps}}))); 705 | ); -------------------------------------------------------------------------------- /programs/stat.sc: -------------------------------------------------------------------------------- 1 | // Statistic Display by CommandLeo 2 | 3 | global_total_text = ' §lTotal'; 4 | global_block_list = block_list(); 5 | global_item_list = item_list(); 6 | global_entity_list = entity_types('*'); 7 | global_server_whitelisted = system_info('server_whitelisted') || length(system_info('server_whitelist')) > 0; 8 | global_app_name = system_info('app_name'); 9 | global_hex_charset = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'}; 10 | 11 | pickaxes = filter(global_item_list, _~'_pickaxe'); 12 | axes = filter(global_item_list, _~'_axe'); 13 | shovels = filter(global_item_list, _~'_shovel'); 14 | hoes = filter(global_item_list, _~'_hoe'); 15 | 16 | display_names = read_file('display_names', 'json'); 17 | global_misc_stats = display_names:'misc'; 18 | global_block_names = display_names:'blocks'; 19 | global_item_names = display_names:'items'; 20 | global_entity_names = display_names:'entities'; 21 | global_categories = {'mined' -> '%s Mined', 'crafted' -> '%s Crafted', 'used' -> '%s Used', 'broken' -> '%s Broken', 'picked_up' -> '%s Picked Up', 'dropped' -> '%s Dropped', 'killed' -> '%s Killed', 'killed_by' -> 'Killed by %s', 'custom' -> '%s', 'extra' -> '%s', 'digs' -> 'Digs [%s]'}; 22 | global_extra_stats = {'bedrock_removed' -> 'Bedrock Removed', 'ping' -> 'Ping', 'health' -> 'Health', 'xp_level' -> 'Levels of Experience', 'hunger' -> 'Hunger', 'saturation' -> 'Saturation', 'air' -> 'Remaining Air'}; 23 | global_dig_data = {'combined_blocks' -> ['Combined Blocks', null], 'total' -> ['Total', [...pickaxes, ...shovels, ...axes, ...hoes, 'shears']], 'pick' -> ['Pickaxe', pickaxes], 'shovel' -> ['Shovel', shovels], 'pickshovel' -> ['Pickaxe & Shovel', [...pickaxes, ...shovels]], 'axe' -> ['Axe', axes], 'hoe' -> ['Hoe', hoes]}; 24 | 25 | global_bedrock_removed = read_file('bedrock_removed', 'json') || {}; 26 | global_digs = {}; 27 | for(list_files('digs', 'json'), global_digs:slice(_, length('digs') + 1) = read_file(_, 'json')); 28 | global_carousel_data = read_file('carousel', 'json') || {'interval' -> 200, 'entries' -> []}; 29 | 30 | settings = read_file('settings', 'json'); 31 | global_stat = settings:'stat' || []; 32 | global_bots_included = settings:'bots_included'; 33 | global_offline_digs = if(settings:'offline_digs' != null, settings:'offline_digs', true); 34 | global_total_enabled = if(settings:'total_enabled' != null, settings:'total_enabled', true); 35 | global_dig_display = settings:'dig_display' || {}; 36 | global_dig_display_color = settings:'dig_display_color' || {}; 37 | global_stat_color = settings:'stat_color' || 'FFEE44'; 38 | global_default_dig = settings:'default_dig' || 'combined_blocks'; 39 | 40 | global_help_pages = [ 41 | [ 42 | '%color% /%app_name% mined ', 'f | ', 'g Amount of mined', ' \n', 43 | '%color% /%app_name% used ', 'f | ', 'g Amount of used or placed', ' \n', 44 | '%color% /%app_name% crafted ', 'f | ', 'g Amount of crafted', ' \n', 45 | '%color% /%app_name% dropped ', 'f | ', 'g Amount of dropped', ' \n', 46 | '%color% /%app_name% picked_up ', 'f | ', 'g Amount of picked up', ' \n', 47 | '%color% /%app_name% broken ', 'f | ', 'g Amount of broken', '^g (that ran out of durability)', ' \n', 48 | '%color% /%app_name% killed ', 'f | ', 'g Amount of killed', ' \n', 49 | '%color% /%app_name% killed_by ', 'f | ', 'g Amount of times killed you', ' \n', 50 | '%color% /%app_name% misc ', 'f | ', 'g Misc statistics, e.g. play_time, deaths, mob_kills, aviate_one_cm', ' \n', 51 | '%color% /%app_name% extra ', 'f | ', 'g Extra statistics that are not normally in the game, e.g. xp_level, ping, health, hunger', ' \n', 52 | '%color% /%app_name% bedrock_removed ', 'f | ', 'g Amount of bedrock removed by hand using pistons and tnt', ' \n', 53 | '%color% /%app_name% digs ', 'f | ', 'g Amount of digs (%default_dig% by default)', ' \n', 54 | '%color% /%app_name% combined ', 'f | ', 'g Multiple statistics combined together', ' \n' 55 | ], 56 | [ 57 | '%color% /%app_name% print [] ', 'f | ', 'g Prints the value of a stat of a player', ' \n', 58 | '%color% /%app_name% hide ', 'f | ', 'g Hides the scoreboard', ' \n', 59 | '%color% /%app_name% show ', 'f | ', 'g Shows the scoreboard', ' \n', 60 | '%color% /%app_name% settings bots_included [on|off|toggle] ', 'f | ', 'g Includes or excludes bots in the scoreboard', ' \n', 61 | '%color% /%app_name% bots [on|off|toggle] ', 'f | ', 'g Shortcut for the command above', ' \n', 62 | '%color% /%app_name% settings default_dig ', 'f | ', 'g Sets the default dig type ', 'f *', '^g For server operators only', ' \n', 63 | '%color% /%app_name% settings offline_digs [on|off|toggle] ', 'f | ', 'g Includes or excludes digs of offline whitelisted players in the scoreboard', ' \n', 64 | '%color% /%app_name% settings total [on|off|toggle] ', 'f | ', 'g Enables or disables the total in the scoreboard', ' \n', 65 | '%color% /%app_name% settings dig_display [on|off|toggle] ', 'f | ', 'g Shows or hides digs in the player list footer', ' \n', 66 | '%color% /%app_name% settings dig_display_color ', 'f | ', 'g Changes the color of digs display for yourself; leave empty to reset', ' \n', 67 | '%color% /%app_name% settings stat_color ', 'f | ', 'g Changes the color of the scoreboard name for everyone; leave empty to reset ', 'f *', '^g For server operators only', ' \n' 68 | ], 69 | [ 70 | '%color% /%app_name% settings combined_stats list ', 'f | ', 'g Lists combined statistics ', ' \n', 71 | '%color% /%app_name% settings combined_stats info ', 'f | ', 'g Prints the entries of a combined statistic ', ' \n', 72 | '%color% /%app_name% settings combined_stats create ', 'f | ', 'g Creates a combined statistic ', 'f *', '^g For server operators only', ' \n', 73 | '%color% /%app_name% settings combined_stats delete ', 'f | ', 'g Deletes a combined statistic ', 'f *', '^g For server operators only', ' \n\n', 74 | '%color% /%app_name% carousel start ', 'f | ', 'g Starts a carousel of statistics', ' \n', 75 | '%color% /%app_name% carousel stop ', 'f | ', 'g Stops the carousel', ' \n', 76 | '%color% /%app_name% carousel interval [] ', 'f | ', 'g Gets or sets the interval of the carousel', ' \n', 77 | '%color% /%app_name% carousel list ', 'f | ', 'g Lists carousel entries', ' \n', 78 | '%color% /%app_name% carousel add ', 'f | ', 'g Adds an entry to the carousel', ' \n', 79 | '%color% /%app_name% carousel remove ', 'f | ', 'g Removes an entry from the carousel', ' \n', 80 | ] 81 | ]; 82 | 83 | __config() -> { 84 | 'resources' -> [ 85 | { 86 | 'source' -> str('https://raw.githubusercontent.com/CommandLeo/scarpet/main/resources/stat/display_names/%d.json', system_info('game_major_target')), 87 | 'target' -> 'display_names.json' 88 | } 89 | ], 90 | 'commands' -> { 91 | '' -> 'menu', 92 | 'hide' -> 'hide', 93 | 'show' -> 'show', 94 | 'help' -> ['help', 1], 95 | 'help ' -> 'help', 96 | 97 | 'bots' -> ['toggleBots', null], 98 | 'bots on' -> ['toggleBots', true], 99 | 'bots off' -> ['toggleBots', false], 100 | 'bots toggle' -> ['toggleBots', null], 101 | 'settings bots_included' -> ['toggleBots', null], 102 | 'settings bots_included on' -> ['toggleBots', true], 103 | 'settings bots_included off' -> ['toggleBots', false], 104 | 'settings bots_included toggle' -> ['toggleBots', null], 105 | 'settings offline_digs' -> ['toggleOfflineDigs', null], 106 | 'settings offline_digs on' -> ['toggleOfflineDigs', true], 107 | 'settings offline_digs off' -> ['toggleOfflineDigs', false], 108 | 'settings offline_digs toggle' -> ['toggleOfflineDigs', null], 109 | 'settings total' -> ['toggleTotal', null], 110 | 'settings total on' -> ['toggleTotal', true], 111 | 'settings total off' -> ['toggleTotal', false], 112 | 'settings total toggle' -> ['toggleTotal', null], 113 | 'settings dig_display' -> ['toggleDigDisplay', null], 114 | 'settings dig_display on' -> ['toggleDigDisplay', true], 115 | 'settings dig_display off' -> ['toggleDigDisplay', false], 116 | 'settings dig_display toggle' -> ['toggleDigDisplay', null], 117 | 'settings dig_display_color' -> ['setDigDisplayColor', null], 118 | 'settings dig_display_color ' -> 'setDigDisplayColor', 119 | 'settings stat_color' -> ['setStatColor', null], 120 | 'settings stat_color ' -> 'setStatColor', 121 | 'settings default_dig ' -> 'setDefaultDig', 122 | 123 | 'settings combined_stats list' -> 'listCombinedStats', 124 | 'settings combined_stats info ' -> 'combinedStatInfo', 125 | 'settings combined_stats create mined blocks ' -> ['createCombinedStatFromBlocks', 'mined'], 126 | 'settings combined_stats create mined tag ' -> ['createCombinedStatFromBlockTag', 'mined'], 127 | 'settings combined_stats create crafted items ' -> ['createCombinedStatFromItems', 'crafted'], 128 | 'settings combined_stats create crafted tag ' -> ['createCombinedStatFromItemTag', 'crafted'], 129 | 'settings combined_stats create used items ' -> ['createCombinedStatFromItems', 'used'], 130 | 'settings combined_stats create used tag ' -> ['createCombinedStatFromItemTag', 'used'], 131 | 'settings combined_stats create broken items ' -> ['createCombinedStatFromItems', 'broken'], 132 | 'settings combined_stats create broken tag ' -> ['createCombinedStatFromItemTag', 'broken'], 133 | 'settings combined_stats create picked_up items ' -> ['createCombinedStatFromItems', 'picked_up'], 134 | 'settings combined_stats create picked_up tag ' -> ['createCombinedStatFromItemTag', 'picked_up'], 135 | 'settings combined_stats create dropped items ' -> ['createCombinedStatFromItems', 'dropped'], 136 | 'settings combined_stats create dropped tag ' -> ['createCombinedStatFromItemTag', 'dropped'], 137 | 'settings combined_stats create killed entities ' -> ['createCombinedStatFromEntities', 'killed'], 138 | 'settings combined_stats create killed_by entities ' -> ['createCombinedStatFromEntities', 'killed_by'], 139 | 'settings combined_stats create misc misc_entries ' -> 'createCombinedStatFromMiscEntries', 140 | 'settings combined_stats delete ' -> ['deleteCombinedStat', false], 141 | 'settings combined_stats delete confirm' -> ['deleteCombinedStat', true], 142 | 143 | 'mined ' -> ['changeStat', 'mined'], 144 | 'crafted ' -> ['changeStat', 'crafted'], 145 | 'used ' -> ['changeStat', 'used'], 146 | 'broken ' -> ['changeStat', 'broken'], 147 | 'picked_up ' -> ['changeStat', 'picked_up'], 148 | 'dropped ' -> ['changeStat', 'dropped'], 149 | 'killed ' -> ['changeStat', 'killed'], 150 | 'killed_by ' -> ['changeStat', 'killed_by'], 151 | 'misc ' -> ['changeStat', 'custom'], 152 | 'extra ' -> ['changeStat', 'extra'], 153 | 'bedrock_removed' -> ['changeStat', 'bedrock_removed', 'extra'], 154 | 'digs ' -> ['changeStat', 'digs'], 155 | 'digs' -> ['changeStat', null, 'digs'], 156 | 'combined ' -> ['changeStat', 'combined'], 157 | 158 | 'print mined ' -> ['printStatValue', null, 'mined'], 159 | 'print crafted ' -> ['printStatValue', null, 'crafted'], 160 | 'print used ' -> ['printStatValue', null, 'used'], 161 | 'print broken ' -> ['printStatValue', null, 'broken'], 162 | 'print picked_up ' -> ['printStatValue', null, 'picked_up'], 163 | 'print dropped ' -> ['printStatValue', null, 'dropped'], 164 | 'print killed ' -> ['printStatValue', null, 'killed'], 165 | 'print killed_by ' -> ['printStatValue', null, 'killed_by'], 166 | 'print misc ' -> ['printStatValue', null, 'custom'], 167 | 'print extra ' -> ['printStatValue', null, 'extra'], 168 | 'print digs ' -> ['printStatValue', null, 'digs'], 169 | 'print combined ' -> ['printStatValue', 'combined', null], 170 | 'print mined ' -> ['printStatValue', 'mined'], 171 | 'print crafted ' -> ['printStatValue', 'crafted'], 172 | 'print used ' -> ['printStatValue', 'used'], 173 | 'print broken ' -> ['printStatValue', 'broken'], 174 | 'print picked_up ' -> ['printStatValue', 'picked_up'], 175 | 'print dropped ' -> ['printStatValue', 'dropped'], 176 | 'print killed ' -> ['printStatValue', 'killed'], 177 | 'print killed_by ' -> ['printStatValue', 'killed_by'], 178 | 'print misc ' -> ['printStatValue', 'custom'], 179 | 'print extra ' -> ['printStatValue', 'extra'], 180 | 'print digs ' -> ['printStatValue', 'digs'], 181 | 'print combined ' -> ['printStatValue', 'combined'], 182 | 183 | 'carousel start' -> 'startCarousel', 184 | 'carousel stop' -> 'stopCarousel', 185 | 'carousel interval' -> ['carouselInterval', null], 186 | 'carousel interval ' -> 'carouselInterval', 187 | 'carousel remove ' -> 'removeCarouselEntry', 188 | 'carousel add mined ' -> ['addCarouselEntry', 'mined'], 189 | 'carousel add crafted ' -> ['addCarouselEntry', 'crafted'], 190 | 'carousel add used ' -> ['addCarouselEntry', 'used'], 191 | 'carousel add broken ' -> ['addCarouselEntry', 'broken'], 192 | 'carousel add picked_up ' -> ['addCarouselEntry', 'picked_up'], 193 | 'carousel add dropped ' -> ['addCarouselEntry', 'dropped'], 194 | 'carousel add killed ' -> ['addCarouselEntry', 'killed'], 195 | 'carousel add killed_by ' -> ['addCarouselEntry', 'killed_by'], 196 | 'carousel add misc ' -> ['addCarouselEntry', 'custom'], 197 | 'carousel add extra ' -> ['addCarouselEntry', 'extra'], 198 | 'carousel add digs ' -> ['addCarouselEntry', 'digs'], 199 | 'carousel add combined ' -> ['addCarouselEntry', 'combined'], 200 | 'carousel list' -> 'listCarouselEntries' 201 | }, 202 | 'arguments' -> { 203 | 'block' -> { 204 | 'type' -> 'term', 205 | 'options' -> global_block_list, 206 | 'case_sensitive' -> false 207 | }, 208 | 'block_tag' -> { 209 | 'type' -> 'identifier', 210 | 'suggest' -> block_tags(), 211 | 'options' -> block_tags(), 212 | 'case_sensitive' -> false 213 | }, 214 | 'item' -> { 215 | 'type' -> 'term', 216 | 'options' -> global_item_list, 217 | 'case_sensitive' -> false 218 | }, 219 | 'item_tag' -> { 220 | 'type' -> 'identifier', 221 | 'suggest' -> item_tags(), 222 | 'options' -> item_tags(), 223 | 'case_sensitive' -> false 224 | }, 225 | 'entity' -> { 226 | 'type' -> 'term', 227 | 'options' -> global_entity_list, 228 | 'case_sensitive' -> false 229 | }, 230 | 'misc_stat' -> { 231 | 'type' -> 'term', 232 | 'options' -> keys(global_misc_stats), 233 | 'case_sensitive' -> false 234 | }, 235 | 'extra_stat' -> { 236 | 'type' -> 'term', 237 | 'options' -> keys(global_extra_stats), 238 | 'case_sensitive' -> false 239 | }, 240 | 'dig' -> { 241 | 'type' -> 'term', 242 | 'options' -> keys(global_dig_data), 243 | 'case_sensitive' -> false 244 | }, 245 | 'combined_stat' -> { 246 | 'type' -> 'term', 247 | 'suggester' -> _(args) -> map(list_files('combined', 'text'), slice(_, length('combined') + 1)), 248 | 'case_sensitive' -> false 249 | }, 250 | 'category' -> { 251 | 'type' -> 'term', 252 | 'options' -> keys(global_categories), 253 | 'case_sensitive' -> false 254 | }, 255 | 'player' -> { 256 | 'type' -> 'players', 257 | 'single' -> true 258 | }, 259 | 'items' -> { 260 | 'type' -> 'text', 261 | 'suggester' -> _(args) -> ( 262 | i = args:'items'; 263 | items = split(' ', i); 264 | if(length(items) && slice(i, -1) != ' ', delete(items, -1)); 265 | items_string = join(' ', items); 266 | return(if(items, map(global_item_list, str('%s %s', items_string, _)), global_item_list)); 267 | ), 268 | 'case_sensitive' -> false 269 | }, 270 | 'blocks' -> { 271 | 'type' -> 'text', 272 | 'suggester' -> _(args) -> ( 273 | b = args:'blocks'; 274 | blocks = split(' ', b); 275 | if(length(blocks) && slice(b, -1) != ' ', delete(blocks, -1)); 276 | blocks_string = join(' ', blocks); 277 | return(if(blocks, map(global_block_list, str('%s %s', blocks_string, _)), global_block_list)); 278 | ), 279 | 'case_sensitive' -> false 280 | }, 281 | 'entities' -> { 282 | 'type' -> 'text', 283 | 'suggester' -> _(args) -> ( 284 | e = args:'entities'; 285 | entities = split(' ', e); 286 | if(length(entities) && slice(e, -1) != ' ', delete(entities, -1)); 287 | entities_string = join(' ', entities); 288 | return(if(entities, map(global_entity_list, str('%s %s', entities_string, _)), global_entity_list)); 289 | ), 290 | 'case_sensitive' -> false 291 | }, 292 | 'misc_entries' -> { 293 | 'type' -> 'text', 294 | 'suggester' -> _(args) -> ( 295 | m = args:'misc_entries'; 296 | misc_entries = split(' ', m); 297 | if(length(misc_entries) && slice(m, -1) != ' ', delete(misc_entries, -1)); 298 | misc_entries_string = join(' ', misc_entries); 299 | return(if(misc_entries, map(global_misc_stats, str('%s %s', misc_entries_string, _)), keys(global_misc_stats))); 300 | ), 301 | 'case_sensitive' -> false 302 | }, 303 | 'hex_color' -> { 304 | 'type' -> 'string', 305 | 'suggester' -> _(args) -> ( 306 | color = upper(args:'hex_color' || ''); 307 | return(if(!color || (length(color) < 6 && all(split(color), has(global_hex_charset, _))), map(global_hex_charset, color + _))); 308 | ), 309 | 'case_sensitive' -> false 310 | }, 311 | 'name' -> { 312 | 'type' -> 'term', 313 | 'suggest' -> [] 314 | }, 315 | 'display_name' -> { 316 | 'type' -> 'string', 317 | 'suggest' -> [] 318 | }, 319 | 'page' -> { 320 | 'type' -> 'int', 321 | 'min' -> 1, 322 | 'max' -> length(global_help_pages), 323 | 'suggest' -> [range(length(global_help_pages))] + 1 324 | }, 325 | 'seconds' -> { 326 | 'type' -> 'int', 327 | 'min' -> 1, 328 | 'max' -> 3600, 329 | 'suggest' -> [] 330 | }, 331 | 'index' -> { 332 | 'type' -> 'int', 333 | 'suggest' -> [] 334 | } 335 | }, 336 | 'requires' -> { 337 | 'carpet' -> '>=1.4.44' 338 | }, 339 | 'scope' -> 'global' 340 | }; 341 | 342 | // HELPER FUNCTIONS 343 | 344 | _error(error) -> exit(print(format(str('r %s', error)))); 345 | 346 | _validateHex(string) -> ( 347 | hex = upper(string)~'^#?([0-9A-F]{6}|[0-9A-F]{3})$'; 348 | if(length(hex) == 3, hex = replace(hex, '(.)', '$1$1')); 349 | return(hex); 350 | ); 351 | 352 | _parseCombinedStatFile(name) -> ( 353 | file = read_file('combined/' + name, 'text'); 354 | display_name = file:0; 355 | category = if(length(file) > 1, file:1); 356 | loop(2, delete(file, 0)); 357 | return([display_name, category, file]); 358 | ); 359 | 360 | _isInvalidEntry(entry) -> ( 361 | if(entry == global_total_text, return(false)); 362 | if(global_stat:0 == 'digs' && global_server_whitelisted && global_offline_digs, return(!has(system_info('server_whitelist'), str(entry)))); 363 | return(!player(entry) || (!global_bots_included && player(entry)~'player_type' == 'fake')); 364 | ); 365 | 366 | removeInvalidEntries() -> ( 367 | for(scoreboard('stats'), if(_isInvalidEntry(_), scoreboard_remove('stats', _))); 368 | ); 369 | 370 | calculateTotal() -> ( 371 | if(!global_stat || !global_total_enabled, return()); 372 | for(scoreboard('stats'), if(_ != global_total_text, total += scoreboard('stats', _))); 373 | scoreboard('stats', global_total_text, total); 374 | ); 375 | 376 | getDisplayName(category, event) -> ( 377 | return(str(global_categories:category, if( 378 | category == 'used' || category == 'broken' || category == 'crafted' || category == 'dropped' || category == 'picked_up', global_item_names, 379 | category == 'mined', global_block_names, 380 | category == 'killed' || category == 'killed_by', global_entity_names, 381 | category == 'custom', global_misc_stats, 382 | category == 'extra', global_extra_stats, 383 | category == 'digs', global_dig_data 384 | ):event || event)); 385 | ); 386 | 387 | getStat(player, category, event) -> ( 388 | if(category == 'digs', 389 | if(!player(player), return(global_digs:event:str(player))); 390 | if(event == 'combined_blocks', 391 | return(reduce(global_block_list, _a + statistic(player, 'mined', _), 0)), 392 | tools = global_dig_data:event:1; 393 | return(if(tools, reduce(tools, _a + statistic(player, 'used', _), 0))); 394 | ); 395 | ); 396 | if(category == 'combined', 397 | if(event == global_stat:1 && global_combined, [category, entries] = global_combined, [display_name, category, entries] = _parseCombinedStatFile(event)); 398 | return(if(entries, reduce(entries, _a + statistic(player, category, _), 0))); 399 | ); 400 | if(category == 'extra', 401 | if(event == 'bedrock_removed', return(global_bedrock_removed:(player(player)~'uuid'))); 402 | return(player(player)~event); 403 | ); 404 | return(statistic(player, category, event)); 405 | ); 406 | 407 | displayDigs(player) -> ( 408 | uuid = player~'uuid'; 409 | if(!global_dig_display:uuid || !player(player), return()); 410 | color = global_dig_display_color:uuid || global_stat_color; 411 | display_title(player, 'player_list_footer', format(str('#%s ⬛ %s', color, getStat(player, 'digs', 'combined_blocks')), '#343A40 | ', str('#%s ⚒ %s', color, getStat(player, 'digs', 'total')), '#343A40 | ', str('#%s ⛏ %s', color, getStat(player, 'digs', 'pick')))); 412 | ); 413 | 414 | // MAIN FUNCTIONS 415 | 416 | menu() -> ( 417 | texts = [ 418 | 'fs ' + ' ' * 80, ' \n', 419 | '#FED330b Statistic Display ', 'g by ', '%color%b CommandLeo', '^g https://github.com/CommandLeo', ' \n\n', 420 | 'g An app to easily display statistics on the scoreboard.', ' \n', 421 | 'g Run ', '%color% /%app_name% help', '!/%app_name% help', '^g Click to run the command', 'g to see a list of all the commands.', ' \n', 422 | 'fs ' + ' ' * 80 423 | ]; 424 | replacement_map = {'%app_name%' -> global_app_name, '%color%' -> '#FFEE44'}; 425 | print(format(map(texts, reduce(pairs(replacement_map), replace(_a, ..._), _)))); 426 | ); 427 | 428 | help(page) -> ( 429 | length = length(global_help_pages); 430 | if(page < 1 || page > length, _error('Invalid page number')); 431 | page = page - 1; 432 | previous_page = (page - 1) % length + 1; 433 | next_page = ((page + 1) % length + 1); 434 | texts = ['fs ' + ' ' * 80, ' \n', ...global_help_pages:page, 'fs ' + ' ' * 31, ' ', 'fb «', '^g Previous page', '!/%app_name% help ' + previous_page, str('g \ Page %d/%d ', page + 1, length), 'fb »', '^g Next page', '!/%app_name% help ' + next_page, ' ', 'fs ' + ' ' * 31]; 435 | replacement_map = {'%app_name%' -> global_app_name, '%color%' -> '#FFEE44', '%default_dig%' -> global_default_dig}; 436 | print(format(map(texts, reduce(pairs(replacement_map), replace(_a, ..._), _)))); 437 | ); 438 | 439 | hide() -> ( 440 | if(scoreboard_property('stats', 'display_slot')~'sidebar' != null, scoreboard_display('sidebar', null)); 441 | ); 442 | 443 | show() -> ( 444 | scoreboard_display('sidebar', 'stats'); 445 | ); 446 | 447 | toggleBots(value) -> ( 448 | global_bots_included = if(value == null, !global_bots_included, value); 449 | print(format('f » ', 'g Bots are now ', ...if(global_bots_included, ['l included', 'g in '], ['r excluded', 'g from ']), 'g the scoreboard')); 450 | bots = filter(player('all'), _~'player_type' == 'fake'); 451 | for(bots, updateStat(_)); 452 | calculateTotal(); 453 | ); 454 | 455 | toggleOfflineDigs(value) -> ( 456 | global_offline_digs = if(value == null, !global_offline_digs, value); 457 | print(format('f » ', 'g Offline digs are now ', if(global_offline_digs, 'l enabled', 'r disabled'))); 458 | if(global_stat:0 != 'digs' || !global_server_whitelisted, exit()); 459 | for(if(global_offline_digs, system_info('server_whitelist'), player('all')), updateStat(_)); 460 | removeInvalidEntries(); 461 | calculateTotal(); 462 | ); 463 | 464 | toggleDigDisplay(value) -> ( 465 | uuid = player()~'uuid'; 466 | global_dig_display:uuid = if(value == null, !global_dig_display:uuid, value); 467 | print(format('f » ', 'g Digs are now ', if(global_dig_display:uuid, 'l displayed', 'r hidden'), 'g in the player list footer')); 468 | if(global_dig_display:uuid, displayDigs(player()), display_title(player(), 'player_list_footer')); 469 | ); 470 | 471 | toggleTotal(value) -> ( 472 | global_total_enabled = if(value == null, !global_total_enabled, value); 473 | print(format('f » ', 'g Total is now ', if(global_total_enabled, 'l enabled', 'r disabled'))); 474 | if(global_total_enabled, calculateTotal(), scoreboard_remove('stats', global_total_text)); 475 | ); 476 | 477 | setDigDisplayColor(color) -> ( 478 | uuid = player()~'uuid'; 479 | if(!color, 480 | delete(global_dig_display_color:uuid); 481 | print(format('f » ', 'g Dig display color has been ', 'r reset')), 482 | color = _validateHex(color); 483 | if(!color, _error('Invalid hex color')); 484 | global_dig_display_color:uuid = color; 485 | print(format('f » ', 'g Dig display color has been set to ', str('#%s #%s', global_dig_display_color:uuid, global_dig_display_color:uuid))); 486 | ); 487 | if(global_dig_display:uuid, displayDigs(player())); 488 | ); 489 | 490 | setStatColor(color) -> ( 491 | if(player()~'permission_level' == 0, _error('You must be an operator to run this command')); 492 | if(!color, 493 | global_stat_color = 'FFEE44'; 494 | print(format('f » ', 'g Stat color has been ', 'r reset')), 495 | color = _validateHex(color); 496 | if(!color, _error('Invalid hex color')); 497 | global_stat_color = color; 498 | print(format('f » ', 'g Stat color has been set to ', str('#%s #%s', global_stat_color, global_stat_color))); 499 | ); 500 | scoreboard_property('stats', 'display_name', format(str('#%s %s', global_stat_color, scoreboard_property('stats', 'display_name')))); 501 | for(player('all'), displayDigs(_)); 502 | ); 503 | 504 | setDefaultDig(dig) -> ( 505 | if(player()~'permission_level' == 0, _error('You must be an operator to run this command')); 506 | if(!has(global_dig_data, dig), _error('Invalid dig type')); 507 | global_default_dig = dig; 508 | for(player('all'), updateDigs(_)); 509 | print(format('f » ', 'g The default dig type is now ', str('#%s %s', 'FFEE44', global_default_dig))); 510 | ); 511 | 512 | printStatValue(event, player, category) -> ( 513 | player = player || player(); 514 | value = getStat(player, category, event); 515 | if(!value, _error('No value was found')); 516 | print(format('f » ', str('g Value of \'%s\' for %s is ', getDisplayName(category, event), player), '#FFEE44 ' + value)); 517 | ); 518 | 519 | changeStat(event, category) -> ( 520 | if(global_carousel_active, _error('Couldn\'t change the displayed statistic, a carousel is currently active')); 521 | if(category == 'combined' && list_files('combined', 'text')~str('combined/%s', event) == null, _error('Combined statistic not found')); 522 | showStat(category, if(category == 'digs' && !event, global_default_dig, event)); 523 | show(); 524 | logger(str('[Stat] Stat Change | %s -> %s.%s', player(), category, event)); 525 | ); 526 | 527 | showStat(category, event) -> ( 528 | if(category == 'combined', 529 | [display_name, combined_category, entries] = _parseCombinedStatFile(event); 530 | global_combined = [combined_category, entries]; 531 | ); 532 | global_stat = [category, event]; 533 | scoreboard_property('stats', 'display_name', format(str('#%s %s', global_stat_color, display_name || getDisplayName(category, event)))); 534 | for(if(category == 'digs' && global_server_whitelisted && global_offline_digs, system_info('server_whitelist'), player('all')), updateStat(_)); 535 | removeInvalidEntries(); 536 | calculateTotal(); 537 | ); 538 | 539 | updateStat(player) -> ( 540 | if(!global_stat, return()); 541 | if(_isInvalidEntry(str(player)), return(scoreboard_remove('stats', player))); 542 | value = getStat(player, ...global_stat); 543 | if(value, scoreboard('stats', player, value), scoreboard_remove('stats', player)); 544 | ); 545 | 546 | updateDigs(player) -> ( 547 | if(!player(player), return()); 548 | if(!global_server_whitelisted || has(system_info('server_whitelist'), str(player)), 549 | for(global_dig_data, 550 | global_digs:_ = global_digs:_ || {}; 551 | amount = getStat(player, 'digs', _); 552 | if(amount > 0, global_digs:_:str(player) = amount); 553 | ); 554 | ); 555 | displayDigs(player(player)); 556 | scoreboard('digs', player, getStat(player, 'digs', global_default_dig)); 557 | ); 558 | 559 | // COMBINED STATS MANAGING 560 | 561 | listCombinedStats() -> ( 562 | files = list_files('combined', 'text'); 563 | if(!files, _error('There are no combined stats available')); 564 | 565 | combined_stats = map(files, slice(_, length('combined') + 1)); 566 | texts = reduce(combined_stats, [..._a, if(_i == 0, '', 'g , '), str('#FFEE44 %s', _), str('?/%s settings combined_stats info %s', global_app_name, _)], ['f » ', 'g Available combined stats: ']); 567 | print(format(texts)); 568 | ); 569 | 570 | combinedStatInfo(combined_stat) -> ( 571 | if(list_files('combined', 'text')~str('combined/%s', combined_stat) == null, _error(str('The combined stat %s doesn\'t exist', combined_stat))); 572 | [display_name, category, entries] = _parseCombinedStatFile(combined_stat); 573 | texts = reduce(entries, [..._a, ' \n ', str('g %s.%s', category, _), str('?/%s %s %s', global_app_name, if(category == 'custom', 'misc', category), _)], ['f » ', str('#FFEE44 %s', display_name), str('^g %s', combined_stat), 'f |', 'g Entries:']); 574 | print(format(texts)); 575 | ); 576 | 577 | createCombinedStatFromBlockTag(name, display_name, block_tag, category) -> ( 578 | if(block_tags()~block_tag == null, _error('Invalid block tag')); 579 | blocks = block_list(block_tag); 580 | createCombinedStat(name, display_name, category, blocks); 581 | ); 582 | 583 | createCombinedStatFromItemTag(name, display_name, item_tag, category) -> ( 584 | if(item_tags()~item_tag == null, _error('Invalid item tag')); 585 | items = item_list(item_tag); 586 | createCombinedStat(name, display_name, category, items); 587 | ); 588 | 589 | createCombinedStatFromItems(name, display_name, items_string, category) -> ( 590 | items = split(' ', items_string); 591 | if(!items, _error('No items provided')); 592 | invalid_items = {}; 593 | for(items, if(global_item_list~_ == null, invalid_items += _)); 594 | if(invalid_items, _error(str('Invalid items: %s', join(', ', keys(invalid_items))))); 595 | createCombinedStat(name, display_name, category, items); 596 | ); 597 | 598 | createCombinedStatFromBlocks(name, display_name, blocks_string, category) -> ( 599 | blocks = split(' ', blocks_string); 600 | if(!blocks, _error('No blocks provided')); 601 | invalid_blocks = {}; 602 | for(blocks, if(global_block_list~_ == null, invalid_blocks += _)); 603 | if(invalid_blocks, _error(str('Invalid blocks: %s', join(', ', keys(invalid_blocks))))); 604 | createCombinedStat(name, display_name, category, blocks); 605 | ); 606 | 607 | createCombinedStatFromEntities(name, display_name, entities_string, category) -> ( 608 | entities = split(' ', entities_string); 609 | if(!entities, _error('No entities provided')); 610 | invalid_entities = {}; 611 | for(entities, if(global_entity_list~_ == null, invalid_entities += _)); 612 | if(invalid_entities, _error(str('Invalid entities: %s', join(', ', keys(invalid_entities))))); 613 | createCombinedStat(name, display_name, category, entities); 614 | ); 615 | 616 | createCombinedStatFromMiscEntries(name, display_name, misc_entries_string) -> ( 617 | misc_entries = split(' ', misc_entries_string); 618 | if(!misc_entries, _error('No misc entries provided')); 619 | invalid_misc_entries = {}; 620 | for(misc_entries, if(global_misc_stats~_ == null, invalid_misc_entries += _)); 621 | if(invalid_misc_entries, _error(str('Invalid misc entries: %s', join(', ', keys(invalid_misc_entries))))); 622 | createCombinedStat(name, display_name, 'custom', misc_entries); 623 | ); 624 | 625 | createCombinedStat(name, display_name, category, entries) -> ( 626 | if(player()~'permission_level' == 0, _error('You must be an operator to run this command')); 627 | filename = str('combined/%s', name); 628 | if(list_files('combined', 'text')~filename != null, _error('There\'s already a combined statistic with that name')); 629 | write_file(filename, 'text', display_name, category, ...entries); 630 | print(format('f » ', 'g Successfully created the ', str('#FFEE44 %s', name), 'g combined stat')); 631 | ); 632 | 633 | deleteCombinedStat(combined_stat, confirmation) -> ( 634 | if(player()~'permission_level' == 0, _error('You must be an operator to run this command')); 635 | filename = str('combined/%s', combined_stat); 636 | if(list_files('combined', 'text')~filename == null, _error(str('The combined stat %s doesn\'t exist', combined_stat))); 637 | if(!confirmation, exit(print(format('f » ', 'g Do you really want to delete the ', str('#FFEE44 %s', combined_stat), 'g combined stat? ', 'lb YES', '^l Click to confirm', str('!/%s settings combined_stats delete %s confirm', global_app_name, combined_stat))))); 638 | delete_file(filename, 'text'); 639 | print(format('f » ', 'g Successfully deleted the ', str('#FFEE44 %s', combined_stat), 'g combined stat')); 640 | ); 641 | 642 | // CAROUSEL 643 | 644 | startCarousel() -> ( 645 | if(global_carousel_active, _error('There\'s already a carousel active')); 646 | interval = global_carousel_data:'interval'; 647 | entries = global_carousel_data:'entries'; 648 | if(!entries, _error('No entries were found')); 649 | if(!interval, _error('No interval was provided')); 650 | print(format('f » ', 'g You ', 'l started ', 'g the carousel')); 651 | logger(str('[Stat] Carousel Start | %s', player())); 652 | global_carousel_active = true; 653 | show(); 654 | carousel(entries, 0); 655 | ); 656 | 657 | stopCarousel() -> ( 658 | if(!global_carousel_active, _error('There is no carousel active')); 659 | print(format('f » ', 'g You ', 'r stopped ', 'g the carousel')); 660 | logger(str('[Stat] Carousel Stop | %s', player())); 661 | global_carousel_active = false; 662 | ); 663 | 664 | carouselInterval(seconds) -> ( 665 | if(!seconds, exit(print(format('f » ', 'g Carousel interval is currently set to ', str('d %d ', global_carousel_data:'interval' / 20), 'g seconds')))); 666 | if(type(seconds) != 'number', _error('The interval provided is not a number')); 667 | global_carousel_data:'interval' = seconds * 20; 668 | print(format('f » ', 'g Carousel interval was set to ', str('d %d ', seconds), 'g seconds')); 669 | logger(str('[Stat] Carousel Interval Change | %s -> %d', player(), seconds)); 670 | ); 671 | 672 | addCarouselEntry(entry, category) -> ( 673 | global_carousel_data:'entries' += [category, entry]; 674 | print(format('f » ', 'g Successfully added an entry to the carousel')); 675 | ); 676 | 677 | removeCarouselEntry(index) -> ( 678 | entries = global_carousel_data:'entries'; 679 | if(index >= length(entries), _error('Invalid index')); 680 | delete(entries, index); 681 | print(format('f » ', 'g The entry was removed from the carousel')); 682 | ); 683 | 684 | listCarouselEntries() -> ( 685 | entries = global_carousel_data:'entries'; 686 | if(!entries, _error('No entries to show, the carousel is empty')); 687 | print(format(reduce(entries, [..._a, ' \n ', '#EB4D4Bb ❌', '^r Remove entry', str('?/%s carousel remove %d', global_app_name, _i), ' ', str('g %s.%s', _)], ['f » ', 'g Carousel entries: ', '#26DE81b (+)', '^l Add more entries', str('?/%s carousel add ', global_app_name)]))); 688 | ); 689 | 690 | carousel(entries, i) -> ( 691 | if(global_carousel_active, 692 | stat = entries:i; 693 | showStat(...stat); 694 | schedule(global_carousel_data:'interval', 'carousel', entries, (i + 1) % length(entries)); 695 | ); 696 | ); 697 | 698 | // EVENTS 699 | 700 | __on_statistic(player, category, event, value) -> ( 701 | if(category == 'mined' || (category == 'used' && global_dig_data:'total':1~event != null), schedule(0, 'updateDigs', player)); 702 | if(!global_stat || global_stat:0 == 'extra', exit()); 703 | if(global_stat == [category, event] || (global_stat == ['digs', 'combined_blocks'] && category == 'mined') || (category == 'used' && global_stat:0 == 'digs' && global_dig_data:'total':1~event != null) || (global_stat:0 == 'combined' && global_combined:0 == category && global_combined:1~event != null), schedule(0, 'updateStat', player); schedule(0, 'calculateTotal')); 704 | ); 705 | 706 | // Bedrock breaking detection 707 | __on_player_places_block(player, item_tuple, hand, block) -> ( 708 | if(!block~'piston', exit()); 709 | facing_pos = pos_offset(block, block_state(block, 'facing')); 710 | facing_block = block(facing_pos); 711 | if(facing_block != 'bedrock', exit()); 712 | schedule(2, _(outer(facing_pos), outer(player)) -> 713 | if(block(facing_pos) != 'bedrock', 714 | global_bedrock_removed:(player~'uuid') += 1; 715 | scoreboard('bedrock_removed', player, global_bedrock_removed:(player~'uuid')); 716 | if(global_stat == ['extra', 'bedrock_removed'], updateStat(player); calculateTotal()); 717 | ); 718 | ); 719 | ); 720 | 721 | __on_tick() -> ( 722 | if((global_stat:0 == 'extra' && global_stat:1 != 'bedrock_removed') || (global_stat:0 == 'custom' && has({'play_one_minute', 'play_time', 'time_since_death', 'time_since_rest', 'total_world_time'}, global_stat:1)), for(player('all'), updateStat(_)); calculateTotal()); 723 | ); 724 | 725 | __on_player_connects(player) -> ( 726 | schedule(0, 'updateDigs', player); 727 | schedule(0, 'updateStat', player); 728 | schedule(0, 'calculateTotal'); 729 | ); 730 | 731 | __on_player_disconnects(player, reason) -> ( 732 | schedule(0, 'updateStat', player); 733 | schedule(0, 'calculateTotal'); 734 | ); 735 | 736 | __on_close() -> ( 737 | write_file('bedrock_removed', 'json', global_bedrock_removed); 738 | write_file('carousel', 'json', global_carousel_data); 739 | settings = { 740 | 'stat' -> global_stat, 741 | 'bots_included' -> global_bots_included, 742 | 'offline_digs' -> global_offline_digs, 743 | 'total_enabled' -> global_total_enabled, 744 | 'dig_display' -> global_dig_display, 745 | 'dig_display_color' -> global_dig_display_color, 746 | 'stat_color' -> global_stat_color, 747 | 'default_dig' -> global_default_dig 748 | }; 749 | write_file('settings', 'json', settings); 750 | for(global_digs, write_file(str('digs/%s', _), 'json', global_digs:_)); 751 | ); 752 | 753 | // INITIALIZATION 754 | 755 | __on_start() -> ( 756 | for(['stats', 'bedrock_removed', 'digs'], if(scoreboard()~_ == null, scoreboard_add(_))); 757 | if(all(scoreboard(), scoreboard_property(_, 'display_slot')~'list' == null), scoreboard_display('list', 'digs')); 758 | 759 | if(global_stat:0 == 'combined', [display_name, combined_category, entries] = _parseCombinedStatFile(global_stat:1); global_combined = [combined_category, entries]); 760 | for(player('all'), updateDigs(_); updateStat(_)); 761 | removeInvalidEntries(); 762 | calculateTotal(); 763 | ); -------------------------------------------------------------------------------- /programs/update.sc: -------------------------------------------------------------------------------- 1 | // Block Updater by CommandLeo 2 | 3 | __config() -> { 4 | 'commands' -> { 5 | '' -> ['updateBlocks', null, null, null], 6 | ' ' -> ['updateBlocks', null], 7 | ' ' -> 'updateBlocks' 8 | }, 9 | 'arguments' -> { 10 | 'start' -> { 11 | 'type' -> 'pos' 12 | }, 13 | 'end' -> { 14 | 'type' -> 'pos' 15 | } 16 | }, 17 | 'scope' -> 'player' 18 | }; 19 | 20 | updateBlocks(start, end, block) -> ( 21 | trace = player()~'trace'; 22 | if(!start || !end, 23 | if( 24 | trace && type(trace) == 'block', 25 | update(trace); 26 | print(format('f » ', 'g Updated ', str('gi %s', trace), str('g at [%d, %d, %d]', ...pos(trace)))), 27 | // else 28 | print(format('r You are not looking at any block')) 29 | ); 30 | exit(); 31 | ); 32 | updated_count = 0; 33 | volume(start, end, 34 | if(!air(_) && (!block || _ == block), 35 | update(_); 36 | updated_count += 1; 37 | ); 38 | ); 39 | print(format('f » ', 'g Updated ', str('d %d', updated_count), str('g block%s', if(updated_count != 1, 's', '')))); 40 | ) -------------------------------------------------------------------------------- /resources/stat/combined/concrete_placed.txt: -------------------------------------------------------------------------------- 1 | Concrete Placed 2 | used 3 | white_concrete 4 | orange_concrete 5 | magenta_concrete 6 | light_blue_concrete 7 | yellow_concrete 8 | lime_concrete 9 | pink_concrete 10 | gray_concrete 11 | light_gray_concrete 12 | cyan_concrete 13 | purple_concrete 14 | blue_concrete 15 | brown_concrete 16 | green_concrete 17 | red_concrete 18 | black_concrete 19 | white_concrete_powder 20 | orange_concrete_powder 21 | magenta_concrete_powder 22 | light_blue_concrete_powder 23 | yellow_concrete_powder 24 | lime_concrete_powder 25 | pink_concrete_powder 26 | gray_concrete_powder 27 | light_gray_concrete_powder 28 | cyan_concrete_powder 29 | purple_concrete_powder 30 | blue_concrete_powder 31 | brown_concrete_powder 32 | green_concrete_powder 33 | red_concrete_powder 34 | black_concrete_powder -------------------------------------------------------------------------------- /resources/stat/combined/ores_mined.txt: -------------------------------------------------------------------------------- 1 | Ores Mined 2 | mined 3 | coal_ore 4 | deepslate_coal_ore 5 | iron_ore 6 | deepslate_iron_ore 7 | copper_ore 8 | deepslate_copper_ore 9 | gold_ore 10 | deepslate_copper_ore 11 | redstone_ore 12 | deepslate_redstone_ore 13 | emerald_ore 14 | deepslate_emerald_ore 15 | lapis_ore 16 | deepslate_lapis_ore 17 | diamond_ore 18 | deepslate_diamond_ore -------------------------------------------------------------------------------- /resources/stat/combined/slimestone.txt: -------------------------------------------------------------------------------- 1 | Slimestone Used 2 | used 3 | slime_block 4 | honey_block 5 | observer 6 | redstone_block 7 | piston 8 | sticky_piston -------------------------------------------------------------------------------- /resources/stat/combined/stones_mined.txt: -------------------------------------------------------------------------------- 1 | Stones Mined 2 | mined 3 | stone 4 | andesite 5 | granite 6 | diorite 7 | deepslate 8 | tuff 9 | calcite -------------------------------------------------------------------------------- /resources/stat/display_names/20.json: -------------------------------------------------------------------------------- 1 | {"blocks":{"acacia_button":"Acacia Button","acacia_door":"Acacia Door","acacia_fence":"Acacia Fence","acacia_fence_gate":"Acacia Fence Gate","acacia_hanging_sign":"Acacia Hanging Sign","acacia_leaves":"Acacia Leaves","acacia_log":"Acacia Log","acacia_planks":"Acacia Planks","acacia_pressure_plate":"Acacia Pressure Plate","acacia_sapling":"Acacia Sapling","acacia_sign":"Acacia Sign","acacia_slab":"Acacia Slab","acacia_stairs":"Acacia Stairs","acacia_trapdoor":"Acacia Trapdoor","acacia_wall_hanging_sign":"Acacia Wall Hanging Sign","acacia_wall_sign":"Acacia Wall Sign","acacia_wood":"Acacia Wood","activator_rail":"Activator Rail","air":"Air","allium":"Allium","amethyst_block":"Block of Amethyst","amethyst_cluster":"Amethyst Cluster","ancient_debris":"Ancient Debris","andesite":"Andesite","andesite_slab":"Andesite Slab","andesite_stairs":"Andesite Stairs","andesite_wall":"Andesite Wall","anvil":"Anvil","attached_melon_stem":"Attached Melon Stem","attached_pumpkin_stem":"Attached Pumpkin Stem","azalea":"Azalea","azalea_leaves":"Azalea Leaves","azure_bluet":"Azure Bluet","bamboo":"Bamboo","bamboo_block":"Block of Bamboo","bamboo_button":"Bamboo Button","bamboo_door":"Bamboo Door","bamboo_fence":"Bamboo Fence","bamboo_fence_gate":"Bamboo Fence Gate","bamboo_hanging_sign":"Bamboo Hanging Sign","bamboo_mosaic":"Bamboo Mosaic","bamboo_mosaic_slab":"Bamboo Mosaic Slab","bamboo_mosaic_stairs":"Bamboo Mosaic Stairs","bamboo_planks":"Bamboo Planks","bamboo_pressure_plate":"Bamboo Pressure Plate","bamboo_sapling":"Bamboo Shoot","bamboo_sign":"Bamboo Sign","bamboo_slab":"Bamboo Slab","bamboo_stairs":"Bamboo Stairs","bamboo_trapdoor":"Bamboo Trapdoor","bamboo_wall_hanging_sign":"Bamboo Wall Hanging Sign","bamboo_wall_sign":"Bamboo Wall Sign","barrel":"Barrel","barrier":"Barrier","basalt":"Basalt","beacon":"Beacon","bedrock":"Bedrock","bee_nest":"Bee Nest","beehive":"Beehive","beetroots":"Beetroots","bell":"Bell","big_dripleaf":"Big Dripleaf","big_dripleaf_stem":"Big Dripleaf Stem","birch_button":"Birch Button","birch_door":"Birch Door","birch_fence":"Birch Fence","birch_fence_gate":"Birch Fence Gate","birch_hanging_sign":"Birch Hanging Sign","birch_leaves":"Birch Leaves","birch_log":"Birch Log","birch_planks":"Birch Planks","birch_pressure_plate":"Birch Pressure Plate","birch_sapling":"Birch Sapling","birch_sign":"Birch Sign","birch_slab":"Birch Slab","birch_stairs":"Birch Stairs","birch_trapdoor":"Birch Trapdoor","birch_wall_hanging_sign":"Birch Wall Hanging Sign","birch_wall_sign":"Birch Wall Sign","birch_wood":"Birch Wood","black_banner":"Black Banner","black_bed":"Black Bed","black_candle":"Black Candle","black_candle_cake":"Cake with Black Candle","black_carpet":"Black Carpet","black_concrete":"Black Concrete","black_concrete_powder":"Black Concrete Powder","black_glazed_terracotta":"Black Glazed Terracotta","black_shulker_box":"Black Shulker Box","black_stained_glass":"Black Stained Glass","black_stained_glass_pane":"Black Stained Glass Pane","black_terracotta":"Black Terracotta","black_wool":"Black Wool","blackstone":"Blackstone","blackstone_slab":"Blackstone Slab","blackstone_stairs":"Blackstone Stairs","blackstone_wall":"Blackstone Wall","blast_furnace":"Blast Furnace","blue_banner":"Blue Banner","blue_bed":"Blue Bed","blue_candle":"Blue Candle","blue_candle_cake":"Cake with Blue Candle","blue_carpet":"Blue Carpet","blue_concrete":"Blue Concrete","blue_concrete_powder":"Blue Concrete Powder","blue_glazed_terracotta":"Blue Glazed Terracotta","blue_ice":"Blue Ice","blue_orchid":"Blue Orchid","blue_shulker_box":"Blue Shulker Box","blue_stained_glass":"Blue Stained Glass","blue_stained_glass_pane":"Blue Stained Glass Pane","blue_terracotta":"Blue Terracotta","blue_wool":"Blue Wool","bone_block":"Bone Block","bookshelf":"Bookshelf","brain_coral":"Brain Coral","brain_coral_block":"Brain Coral Block","brain_coral_fan":"Brain Coral Fan","brain_coral_wall_fan":"Brain Coral Wall Fan","brewing_stand":"Brewing Stand","brick_slab":"Brick Slab","brick_stairs":"Brick Stairs","brick_wall":"Brick Wall","bricks":"Bricks","brown_banner":"Brown Banner","brown_bed":"Brown Bed","brown_candle":"Brown Candle","brown_candle_cake":"Cake with Brown Candle","brown_carpet":"Brown Carpet","brown_concrete":"Brown Concrete","brown_concrete_powder":"Brown Concrete Powder","brown_glazed_terracotta":"Brown Glazed Terracotta","brown_mushroom":"Brown Mushroom","brown_mushroom_block":"Brown Mushroom Block","brown_shulker_box":"Brown Shulker Box","brown_stained_glass":"Brown Stained Glass","brown_stained_glass_pane":"Brown Stained Glass Pane","brown_terracotta":"Brown Terracotta","brown_wool":"Brown Wool","bubble_column":"Bubble Column","bubble_coral":"Bubble Coral","bubble_coral_block":"Bubble Coral Block","bubble_coral_fan":"Bubble Coral Fan","bubble_coral_wall_fan":"Bubble Coral Wall Fan","budding_amethyst":"Budding Amethyst","cactus":"Cactus","cake":"Cake","calcite":"Calcite","calibrated_sculk_sensor":"Calibrated Sculk Sensor","campfire":"Campfire","candle":"Candle","candle_cake":"Cake with Candle","carrots":"Carrots","cartography_table":"Cartography Table","carved_pumpkin":"Carved Pumpkin","cauldron":"Cauldron","cave_air":"Cave Air","cave_vines":"Cave Vines","cave_vines_plant":"Cave Vines Plant","chain":"Chain","chain_command_block":"Chain Command Block","cherry_button":"Cherry Button","cherry_door":"Cherry Door","cherry_fence":"Cherry Fence","cherry_fence_gate":"Cherry Fence Gate","cherry_hanging_sign":"Cherry Hanging Sign","cherry_leaves":"Cherry Leaves","cherry_log":"Cherry Log","cherry_planks":"Cherry Planks","cherry_pressure_plate":"Cherry Pressure Plate","cherry_sapling":"Cherry Sapling","cherry_sign":"Cherry Sign","cherry_slab":"Cherry Slab","cherry_stairs":"Cherry Stairs","cherry_trapdoor":"Cherry Trapdoor","cherry_wall_hanging_sign":"Cherry Wall Hanging Sign","cherry_wall_sign":"Cherry Wall Sign","cherry_wood":"Cherry Wood","chest":"Chest","chipped_anvil":"Chipped Anvil","chiseled_bookshelf":"Chiseled Bookshelf","chiseled_deepslate":"Chiseled Deepslate","chiseled_nether_bricks":"Chiseled Nether Bricks","chiseled_polished_blackstone":"Chiseled Polished Blackstone","chiseled_quartz_block":"Chiseled Quartz Block","chiseled_red_sandstone":"Chiseled Red Sandstone","chiseled_sandstone":"Chiseled Sandstone","chiseled_stone_bricks":"Chiseled Stone Bricks","chorus_flower":"Chorus Flower","chorus_plant":"Chorus Plant","clay":"Clay","coal_block":"Block of Coal","coal_ore":"Coal Ore","coarse_dirt":"Coarse Dirt","cobbled_deepslate":"Cobbled Deepslate","cobbled_deepslate_slab":"Cobbled Deepslate Slab","cobbled_deepslate_stairs":"Cobbled Deepslate Stairs","cobbled_deepslate_wall":"Cobbled Deepslate Wall","cobblestone":"Cobblestone","cobblestone_slab":"Cobblestone Slab","cobblestone_stairs":"Cobblestone Stairs","cobblestone_wall":"Cobblestone Wall","cobweb":"Cobweb","cocoa":"Cocoa","command_block":"Command Block","comparator":"Redstone Comparator","composter":"Composter","conduit":"Conduit","copper_block":"Block of Copper","copper_ore":"Copper Ore","cornflower":"Cornflower","cracked_deepslate_bricks":"Cracked Deepslate Bricks","cracked_deepslate_tiles":"Cracked Deepslate Tiles","cracked_nether_bricks":"Cracked Nether Bricks","cracked_polished_blackstone_bricks":"Cracked Polished Blackstone Bricks","cracked_stone_bricks":"Cracked Stone Bricks","crafting_table":"Crafting Table","creeper_head":"Creeper Head","creeper_wall_head":"Creeper Wall Head","crimson_button":"Crimson Button","crimson_door":"Crimson Door","crimson_fence":"Crimson Fence","crimson_fence_gate":"Crimson Fence Gate","crimson_fungus":"Crimson Fungus","crimson_hanging_sign":"Crimson Hanging Sign","crimson_hyphae":"Crimson Hyphae","crimson_nylium":"Crimson Nylium","crimson_planks":"Crimson Planks","crimson_pressure_plate":"Crimson Pressure Plate","crimson_roots":"Crimson Roots","crimson_sign":"Crimson Sign","crimson_slab":"Crimson Slab","crimson_stairs":"Crimson Stairs","crimson_stem":"Crimson Stem","crimson_trapdoor":"Crimson Trapdoor","crimson_wall_hanging_sign":"Crimson Wall Hanging Sign","crimson_wall_sign":"Crimson Wall Sign","crying_obsidian":"Crying Obsidian","cut_copper":"Cut Copper","cut_copper_slab":"Cut Copper Slab","cut_copper_stairs":"Cut Copper Stairs","cut_red_sandstone":"Cut Red Sandstone","cut_red_sandstone_slab":"Cut Red Sandstone Slab","cut_sandstone":"Cut Sandstone","cut_sandstone_slab":"Cut Sandstone Slab","cyan_banner":"Cyan Banner","cyan_bed":"Cyan Bed","cyan_candle":"Cyan Candle","cyan_candle_cake":"Cake with Cyan Candle","cyan_carpet":"Cyan Carpet","cyan_concrete":"Cyan Concrete","cyan_concrete_powder":"Cyan Concrete Powder","cyan_glazed_terracotta":"Cyan Glazed Terracotta","cyan_shulker_box":"Cyan Shulker Box","cyan_stained_glass":"Cyan Stained Glass","cyan_stained_glass_pane":"Cyan Stained Glass Pane","cyan_terracotta":"Cyan Terracotta","cyan_wool":"Cyan Wool","damaged_anvil":"Damaged Anvil","dandelion":"Dandelion","dark_oak_button":"Dark Oak Button","dark_oak_door":"Dark Oak Door","dark_oak_fence":"Dark Oak Fence","dark_oak_fence_gate":"Dark Oak Fence Gate","dark_oak_hanging_sign":"Dark Oak Hanging Sign","dark_oak_leaves":"Dark Oak Leaves","dark_oak_log":"Dark Oak Log","dark_oak_planks":"Dark Oak Planks","dark_oak_pressure_plate":"Dark Oak Pressure Plate","dark_oak_sapling":"Dark Oak Sapling","dark_oak_sign":"Dark Oak Sign","dark_oak_slab":"Dark Oak Slab","dark_oak_stairs":"Dark Oak Stairs","dark_oak_trapdoor":"Dark Oak Trapdoor","dark_oak_wall_hanging_sign":"Dark Oak Wall Hanging Sign","dark_oak_wall_sign":"Dark Oak Wall Sign","dark_oak_wood":"Dark Oak Wood","dark_prismarine":"Dark Prismarine","dark_prismarine_slab":"Dark Prismarine Slab","dark_prismarine_stairs":"Dark Prismarine Stairs","daylight_detector":"Daylight Detector","dead_brain_coral":"Dead Brain Coral","dead_brain_coral_block":"Dead Brain Coral Block","dead_brain_coral_fan":"Dead Brain Coral Fan","dead_brain_coral_wall_fan":"Dead Brain Coral Wall Fan","dead_bubble_coral":"Dead Bubble Coral","dead_bubble_coral_block":"Dead Bubble Coral Block","dead_bubble_coral_fan":"Dead Bubble Coral Fan","dead_bubble_coral_wall_fan":"Dead Bubble Coral Wall Fan","dead_bush":"Dead Bush","dead_fire_coral":"Dead Fire Coral","dead_fire_coral_block":"Dead Fire Coral Block","dead_fire_coral_fan":"Dead Fire Coral Fan","dead_fire_coral_wall_fan":"Dead Fire Coral Wall Fan","dead_horn_coral":"Dead Horn Coral","dead_horn_coral_block":"Dead Horn Coral Block","dead_horn_coral_fan":"Dead Horn Coral Fan","dead_horn_coral_wall_fan":"Dead Horn Coral Wall Fan","dead_tube_coral":"Dead Tube Coral","dead_tube_coral_block":"Dead Tube Coral Block","dead_tube_coral_fan":"Dead Tube Coral Fan","dead_tube_coral_wall_fan":"Dead Tube Coral Wall Fan","decorated_pot":"Decorated Pot","deepslate":"Deepslate","deepslate_brick_slab":"Deepslate Brick Slab","deepslate_brick_stairs":"Deepslate Brick Stairs","deepslate_brick_wall":"Deepslate Brick Wall","deepslate_bricks":"Deepslate Bricks","deepslate_coal_ore":"Deepslate Coal Ore","deepslate_copper_ore":"Deepslate Copper Ore","deepslate_diamond_ore":"Deepslate Diamond Ore","deepslate_emerald_ore":"Deepslate Emerald Ore","deepslate_gold_ore":"Deepslate Gold Ore","deepslate_iron_ore":"Deepslate Iron Ore","deepslate_lapis_ore":"Deepslate Lapis Lazuli Ore","deepslate_redstone_ore":"Deepslate Redstone Ore","deepslate_tile_slab":"Deepslate Tile Slab","deepslate_tile_stairs":"Deepslate Tile Stairs","deepslate_tile_wall":"Deepslate Tile Wall","deepslate_tiles":"Deepslate Tiles","detector_rail":"Detector Rail","diamond_block":"Block of Diamond","diamond_ore":"Diamond Ore","diorite":"Diorite","diorite_slab":"Diorite Slab","diorite_stairs":"Diorite Stairs","diorite_wall":"Diorite Wall","dirt":"Dirt","dirt_path":"Dirt Path","dispenser":"Dispenser","dragon_egg":"Dragon Egg","dragon_head":"Dragon Head","dragon_wall_head":"Dragon Wall Head","dried_kelp_block":"Dried Kelp Block","dripstone_block":"Dripstone Block","dropper":"Dropper","emerald_block":"Block of Emerald","emerald_ore":"Emerald Ore","enchanting_table":"Enchanting Table","end_gateway":"End Gateway","end_portal":"End Portal","end_portal_frame":"End Portal Frame","end_rod":"End Rod","end_stone":"End Stone","end_stone_brick_slab":"End Stone Brick Slab","end_stone_brick_stairs":"End Stone Brick Stairs","end_stone_brick_wall":"End Stone Brick Wall","end_stone_bricks":"End Stone Bricks","ender_chest":"Ender Chest","exposed_copper":"Exposed Copper","exposed_cut_copper":"Exposed Cut Copper","exposed_cut_copper_slab":"Exposed Cut Copper Slab","exposed_cut_copper_stairs":"Exposed Cut Copper Stairs","farmland":"Farmland","fern":"Fern","fire":"Fire","fire_coral":"Fire Coral","fire_coral_block":"Fire Coral Block","fire_coral_fan":"Fire Coral Fan","fire_coral_wall_fan":"Fire Coral Wall Fan","fletching_table":"Fletching Table","flower_pot":"Flower Pot","flowering_azalea":"Flowering Azalea","flowering_azalea_leaves":"Flowering Azalea Leaves","frogspawn":"Frogspawn","frosted_ice":"Frosted Ice","furnace":"Furnace","gilded_blackstone":"Gilded Blackstone","glass":"Glass","glass_pane":"Glass Pane","glow_lichen":"Glow Lichen","glowstone":"Glowstone","gold_block":"Block of Gold","gold_ore":"Gold Ore","granite":"Granite","granite_slab":"Granite Slab","granite_stairs":"Granite Stairs","granite_wall":"Granite Wall","grass":"Grass","grass_block":"Grass Block","gravel":"Gravel","gray_banner":"Gray Banner","gray_bed":"Gray Bed","gray_candle":"Gray Candle","gray_candle_cake":"Cake with Gray Candle","gray_carpet":"Gray Carpet","gray_concrete":"Gray Concrete","gray_concrete_powder":"Gray Concrete Powder","gray_glazed_terracotta":"Gray Glazed Terracotta","gray_shulker_box":"Gray Shulker Box","gray_stained_glass":"Gray Stained Glass","gray_stained_glass_pane":"Gray Stained Glass Pane","gray_terracotta":"Gray Terracotta","gray_wool":"Gray Wool","green_banner":"Green Banner","green_bed":"Green Bed","green_candle":"Green Candle","green_candle_cake":"Cake with Green Candle","green_carpet":"Green Carpet","green_concrete":"Green Concrete","green_concrete_powder":"Green Concrete Powder","green_glazed_terracotta":"Green Glazed Terracotta","green_shulker_box":"Green Shulker Box","green_stained_glass":"Green Stained Glass","green_stained_glass_pane":"Green Stained Glass Pane","green_terracotta":"Green Terracotta","green_wool":"Green Wool","grindstone":"Grindstone","hanging_roots":"Hanging Roots","hay_block":"Hay Bale","heavy_weighted_pressure_plate":"Heavy Weighted Pressure Plate","honey_block":"Honey Block","honeycomb_block":"Honeycomb Block","hopper":"Hopper","horn_coral":"Horn Coral","horn_coral_block":"Horn Coral Block","horn_coral_fan":"Horn Coral Fan","horn_coral_wall_fan":"Horn Coral Wall Fan","ice":"Ice","infested_chiseled_stone_bricks":"Infested Chiseled Stone Bricks","infested_cobblestone":"Infested Cobblestone","infested_cracked_stone_bricks":"Infested Cracked Stone Bricks","infested_deepslate":"Infested Deepslate","infested_mossy_stone_bricks":"Infested Mossy Stone Bricks","infested_stone":"Infested Stone","infested_stone_bricks":"Infested Stone Bricks","iron_bars":"Iron Bars","iron_block":"Block of Iron","iron_door":"Iron Door","iron_ore":"Iron Ore","iron_trapdoor":"Iron Trapdoor","jack_o_lantern":"Jack o'Lantern","jigsaw":"Jigsaw Block","jukebox":"Jukebox","jungle_button":"Jungle Button","jungle_door":"Jungle Door","jungle_fence":"Jungle Fence","jungle_fence_gate":"Jungle Fence Gate","jungle_hanging_sign":"Jungle Hanging Sign","jungle_leaves":"Jungle Leaves","jungle_log":"Jungle Log","jungle_planks":"Jungle Planks","jungle_pressure_plate":"Jungle Pressure Plate","jungle_sapling":"Jungle Sapling","jungle_sign":"Jungle Sign","jungle_slab":"Jungle Slab","jungle_stairs":"Jungle Stairs","jungle_trapdoor":"Jungle Trapdoor","jungle_wall_hanging_sign":"Jungle Wall Hanging Sign","jungle_wall_sign":"Jungle Wall Sign","jungle_wood":"Jungle Wood","kelp":"Kelp","kelp_plant":"Kelp Plant","ladder":"Ladder","lantern":"Lantern","lapis_block":"Block of Lapis Lazuli","lapis_ore":"Lapis Lazuli Ore","large_amethyst_bud":"Large Amethyst Bud","large_fern":"Large Fern","lava":"Lava","lava_cauldron":"Lava Cauldron","lectern":"Lectern","lever":"Lever","light":"Light","light_blue_banner":"Light Blue Banner","light_blue_bed":"Light Blue Bed","light_blue_candle":"Light Blue Candle","light_blue_candle_cake":"Cake with Light Blue Candle","light_blue_carpet":"Light Blue Carpet","light_blue_concrete":"Light Blue Concrete","light_blue_concrete_powder":"Light Blue Concrete Powder","light_blue_glazed_terracotta":"Light Blue Glazed Terracotta","light_blue_shulker_box":"Light Blue Shulker Box","light_blue_stained_glass":"Light Blue Stained Glass","light_blue_stained_glass_pane":"Light Blue Stained Glass Pane","light_blue_terracotta":"Light Blue Terracotta","light_blue_wool":"Light Blue Wool","light_gray_banner":"Light Gray Banner","light_gray_bed":"Light Gray Bed","light_gray_candle":"Light Gray Candle","light_gray_candle_cake":"Cake with Light Gray Candle","light_gray_carpet":"Light Gray Carpet","light_gray_concrete":"Light Gray Concrete","light_gray_concrete_powder":"Light Gray Concrete Powder","light_gray_glazed_terracotta":"Light Gray Glazed Terracotta","light_gray_shulker_box":"Light Gray Shulker Box","light_gray_stained_glass":"Light Gray Stained Glass","light_gray_stained_glass_pane":"Light Gray Stained Glass Pane","light_gray_terracotta":"Light Gray Terracotta","light_gray_wool":"Light Gray Wool","light_weighted_pressure_plate":"Light Weighted Pressure Plate","lightning_rod":"Lightning Rod","lilac":"Lilac","lily_of_the_valley":"Lily of the Valley","lily_pad":"Lily Pad","lime_banner":"Lime Banner","lime_bed":"Lime Bed","lime_candle":"Lime Candle","lime_candle_cake":"Cake with Lime Candle","lime_carpet":"Lime Carpet","lime_concrete":"Lime Concrete","lime_concrete_powder":"Lime Concrete Powder","lime_glazed_terracotta":"Lime Glazed Terracotta","lime_shulker_box":"Lime Shulker Box","lime_stained_glass":"Lime Stained Glass","lime_stained_glass_pane":"Lime Stained Glass Pane","lime_terracotta":"Lime Terracotta","lime_wool":"Lime Wool","lodestone":"Lodestone","loom":"Loom","magenta_banner":"Magenta Banner","magenta_bed":"Magenta Bed","magenta_candle":"Magenta Candle","magenta_candle_cake":"Cake with Magenta Candle","magenta_carpet":"Magenta Carpet","magenta_concrete":"Magenta Concrete","magenta_concrete_powder":"Magenta Concrete Powder","magenta_glazed_terracotta":"Magenta Glazed Terracotta","magenta_shulker_box":"Magenta Shulker Box","magenta_stained_glass":"Magenta Stained Glass","magenta_stained_glass_pane":"Magenta Stained Glass Pane","magenta_terracotta":"Magenta Terracotta","magenta_wool":"Magenta Wool","magma_block":"Magma Block","mangrove_button":"Mangrove Button","mangrove_door":"Mangrove Door","mangrove_fence":"Mangrove Fence","mangrove_fence_gate":"Mangrove Fence Gate","mangrove_hanging_sign":"Mangrove Hanging Sign","mangrove_leaves":"Mangrove Leaves","mangrove_log":"Mangrove Log","mangrove_planks":"Mangrove Planks","mangrove_pressure_plate":"Mangrove Pressure Plate","mangrove_propagule":"Mangrove Propagule","mangrove_roots":"Mangrove Roots","mangrove_sign":"Mangrove Sign","mangrove_slab":"Mangrove Slab","mangrove_stairs":"Mangrove Stairs","mangrove_trapdoor":"Mangrove Trapdoor","mangrove_wall_hanging_sign":"Mangrove Wall Hanging Sign","mangrove_wall_sign":"Mangrove Wall Sign","mangrove_wood":"Mangrove Wood","medium_amethyst_bud":"Medium Amethyst Bud","melon":"Melon","melon_stem":"Melon Stem","moss_block":"Moss Block","moss_carpet":"Moss Carpet","mossy_cobblestone":"Mossy Cobblestone","mossy_cobblestone_slab":"Mossy Cobblestone Slab","mossy_cobblestone_stairs":"Mossy Cobblestone Stairs","mossy_cobblestone_wall":"Mossy Cobblestone Wall","mossy_stone_brick_slab":"Mossy Stone Brick Slab","mossy_stone_brick_stairs":"Mossy Stone Brick Stairs","mossy_stone_brick_wall":"Mossy Stone Brick Wall","mossy_stone_bricks":"Mossy Stone Bricks","moving_piston":"Moving Piston","mud":"Mud","mud_brick_slab":"Mud Brick Slab","mud_brick_stairs":"Mud Brick Stairs","mud_brick_wall":"Mud Brick Wall","mud_bricks":"Mud Bricks","muddy_mangrove_roots":"Muddy Mangrove Roots","mushroom_stem":"Mushroom Stem","mycelium":"Mycelium","nether_brick_fence":"Nether Brick Fence","nether_brick_slab":"Nether Brick Slab","nether_brick_stairs":"Nether Brick Stairs","nether_brick_wall":"Nether Brick Wall","nether_bricks":"Nether Bricks","nether_gold_ore":"Nether Gold Ore","nether_portal":"Nether Portal","nether_quartz_ore":"Nether Quartz Ore","nether_sprouts":"Nether Sprouts","nether_wart":"Nether Wart","nether_wart_block":"Nether Wart Block","netherite_block":"Block of Netherite","netherrack":"Netherrack","note_block":"Note Block","oak_button":"Oak Button","oak_door":"Oak Door","oak_fence":"Oak Fence","oak_fence_gate":"Oak Fence Gate","oak_hanging_sign":"Oak Hanging Sign","oak_leaves":"Oak Leaves","oak_log":"Oak Log","oak_planks":"Oak Planks","oak_pressure_plate":"Oak Pressure Plate","oak_sapling":"Oak Sapling","oak_sign":"Oak Sign","oak_slab":"Oak Slab","oak_stairs":"Oak Stairs","oak_trapdoor":"Oak Trapdoor","oak_wall_hanging_sign":"Oak Wall Hanging Sign","oak_wall_sign":"Oak Wall Sign","oak_wood":"Oak Wood","observer":"Observer","obsidian":"Obsidian","ochre_froglight":"Ochre Froglight","ominous_banner":"Ominous Banner","orange_banner":"Orange Banner","orange_bed":"Orange Bed","orange_candle":"Orange Candle","orange_candle_cake":"Cake with Orange Candle","orange_carpet":"Orange Carpet","orange_concrete":"Orange Concrete","orange_concrete_powder":"Orange Concrete Powder","orange_glazed_terracotta":"Orange Glazed Terracotta","orange_shulker_box":"Orange Shulker Box","orange_stained_glass":"Orange Stained Glass","orange_stained_glass_pane":"Orange Stained Glass Pane","orange_terracotta":"Orange Terracotta","orange_tulip":"Orange Tulip","orange_wool":"Orange Wool","oxeye_daisy":"Oxeye Daisy","oxidized_copper":"Oxidized Copper","oxidized_cut_copper":"Oxidized Cut Copper","oxidized_cut_copper_slab":"Oxidized Cut Copper Slab","oxidized_cut_copper_stairs":"Oxidized Cut Copper Stairs","packed_ice":"Packed Ice","packed_mud":"Packed Mud","pearlescent_froglight":"Pearlescent Froglight","peony":"Peony","petrified_oak_slab":"Petrified Oak Slab","piglin_head":"Piglin Head","piglin_wall_head":"Piglin Wall Head","pink_banner":"Pink Banner","pink_bed":"Pink Bed","pink_candle":"Pink Candle","pink_candle_cake":"Cake with Pink Candle","pink_carpet":"Pink Carpet","pink_concrete":"Pink Concrete","pink_concrete_powder":"Pink Concrete Powder","pink_glazed_terracotta":"Pink Glazed Terracotta","pink_petals":"Pink Petals","pink_shulker_box":"Pink Shulker Box","pink_stained_glass":"Pink Stained Glass","pink_stained_glass_pane":"Pink Stained Glass Pane","pink_terracotta":"Pink Terracotta","pink_tulip":"Pink Tulip","pink_wool":"Pink Wool","piston":"Piston","piston_head":"Piston Head","pitcher_crop":"Pitcher Crop","pitcher_plant":"Pitcher Plant","player_head":"Player Head","player_wall_head":"Player Wall Head","podzol":"Podzol","pointed_dripstone":"Pointed Dripstone","polished_andesite":"Polished Andesite","polished_andesite_slab":"Polished Andesite Slab","polished_andesite_stairs":"Polished Andesite Stairs","polished_basalt":"Polished Basalt","polished_blackstone":"Polished Blackstone","polished_blackstone_brick_slab":"Polished Blackstone Brick Slab","polished_blackstone_brick_stairs":"Polished Blackstone Brick Stairs","polished_blackstone_brick_wall":"Polished Blackstone Brick Wall","polished_blackstone_bricks":"Polished Blackstone Bricks","polished_blackstone_button":"Polished Blackstone Button","polished_blackstone_pressure_plate":"Polished Blackstone Pressure Plate","polished_blackstone_slab":"Polished Blackstone Slab","polished_blackstone_stairs":"Polished Blackstone Stairs","polished_blackstone_wall":"Polished Blackstone Wall","polished_deepslate":"Polished Deepslate","polished_deepslate_slab":"Polished Deepslate Slab","polished_deepslate_stairs":"Polished Deepslate Stairs","polished_deepslate_wall":"Polished Deepslate Wall","polished_diorite":"Polished Diorite","polished_diorite_slab":"Polished Diorite Slab","polished_diorite_stairs":"Polished Diorite Stairs","polished_granite":"Polished Granite","polished_granite_slab":"Polished Granite Slab","polished_granite_stairs":"Polished Granite Stairs","poppy":"Poppy","potatoes":"Potatoes","potted_acacia_sapling":"Potted Acacia Sapling","potted_allium":"Potted Allium","potted_azalea_bush":"Potted Azalea","potted_azure_bluet":"Potted Azure Bluet","potted_bamboo":"Potted Bamboo","potted_birch_sapling":"Potted Birch Sapling","potted_blue_orchid":"Potted Blue Orchid","potted_brown_mushroom":"Potted Brown Mushroom","potted_cactus":"Potted Cactus","potted_cherry_sapling":"Potted Cherry Sapling","potted_cornflower":"Potted Cornflower","potted_crimson_fungus":"Potted Crimson Fungus","potted_crimson_roots":"Potted Crimson Roots","potted_dandelion":"Potted Dandelion","potted_dark_oak_sapling":"Potted Dark Oak Sapling","potted_dead_bush":"Potted Dead Bush","potted_fern":"Potted Fern","potted_flowering_azalea_bush":"Potted Flowering Azalea","potted_jungle_sapling":"Potted Jungle Sapling","potted_lily_of_the_valley":"Potted Lily of the Valley","potted_mangrove_propagule":"Potted Mangrove Propagule","potted_oak_sapling":"Potted Oak Sapling","potted_orange_tulip":"Potted Orange Tulip","potted_oxeye_daisy":"Potted Oxeye Daisy","potted_pink_tulip":"Potted Pink Tulip","potted_poppy":"Potted Poppy","potted_red_mushroom":"Potted Red Mushroom","potted_red_tulip":"Potted Red Tulip","potted_spruce_sapling":"Potted Spruce Sapling","potted_torchflower":"Potted Torchflower","potted_warped_fungus":"Potted Warped Fungus","potted_warped_roots":"Potted Warped Roots","potted_white_tulip":"Potted White Tulip","potted_wither_rose":"Potted Wither Rose","powder_snow":"Powder Snow","powder_snow_cauldron":"Powder Snow Cauldron","powered_rail":"Powered Rail","prismarine":"Prismarine","prismarine_brick_slab":"Prismarine Brick Slab","prismarine_brick_stairs":"Prismarine Brick Stairs","prismarine_bricks":"Prismarine Bricks","prismarine_slab":"Prismarine Slab","prismarine_stairs":"Prismarine Stairs","prismarine_wall":"Prismarine Wall","pumpkin":"Pumpkin","pumpkin_stem":"Pumpkin Stem","purple_banner":"Purple Banner","purple_bed":"Purple Bed","purple_candle":"Purple Candle","purple_candle_cake":"Cake with Purple Candle","purple_carpet":"Purple Carpet","purple_concrete":"Purple Concrete","purple_concrete_powder":"Purple Concrete Powder","purple_glazed_terracotta":"Purple Glazed Terracotta","purple_shulker_box":"Purple Shulker Box","purple_stained_glass":"Purple Stained Glass","purple_stained_glass_pane":"Purple Stained Glass Pane","purple_terracotta":"Purple Terracotta","purple_wool":"Purple Wool","purpur_block":"Purpur Block","purpur_pillar":"Purpur Pillar","purpur_slab":"Purpur Slab","purpur_stairs":"Purpur Stairs","quartz_block":"Block of Quartz","quartz_bricks":"Quartz Bricks","quartz_pillar":"Quartz Pillar","quartz_slab":"Quartz Slab","quartz_stairs":"Quartz Stairs","rail":"Rail","raw_copper_block":"Block of Raw Copper","raw_gold_block":"Block of Raw Gold","raw_iron_block":"Block of Raw Iron","red_banner":"Red Banner","red_bed":"Red Bed","red_candle":"Red Candle","red_candle_cake":"Cake with Red Candle","red_carpet":"Red Carpet","red_concrete":"Red Concrete","red_concrete_powder":"Red Concrete Powder","red_glazed_terracotta":"Red Glazed Terracotta","red_mushroom":"Red Mushroom","red_mushroom_block":"Red Mushroom Block","red_nether_brick_slab":"Red Nether Brick Slab","red_nether_brick_stairs":"Red Nether Brick Stairs","red_nether_brick_wall":"Red Nether Brick Wall","red_nether_bricks":"Red Nether Bricks","red_sand":"Red Sand","red_sandstone":"Red Sandstone","red_sandstone_slab":"Red Sandstone Slab","red_sandstone_stairs":"Red Sandstone Stairs","red_sandstone_wall":"Red Sandstone Wall","red_shulker_box":"Red Shulker Box","red_stained_glass":"Red Stained Glass","red_stained_glass_pane":"Red Stained Glass Pane","red_terracotta":"Red Terracotta","red_tulip":"Red Tulip","red_wool":"Red Wool","redstone_block":"Block of Redstone","redstone_lamp":"Redstone Lamp","redstone_ore":"Redstone Ore","redstone_torch":"Redstone Torch","redstone_wall_torch":"Redstone Wall Torch","redstone_wire":"Redstone Wire","reinforced_deepslate":"Reinforced Deepslate","repeater":"Redstone Repeater","repeating_command_block":"Repeating Command Block","respawn_anchor":"Respawn Anchor","rooted_dirt":"Rooted Dirt","rose_bush":"Rose Bush","sand":"Sand","sandstone":"Sandstone","sandstone_slab":"Sandstone Slab","sandstone_stairs":"Sandstone Stairs","sandstone_wall":"Sandstone Wall","scaffolding":"Scaffolding","sculk":"Sculk","sculk_catalyst":"Sculk Catalyst","sculk_sensor":"Sculk Sensor","sculk_shrieker":"Sculk Shrieker","sculk_vein":"Sculk Vein","sea_lantern":"Sea Lantern","sea_pickle":"Sea Pickle","seagrass":"Seagrass","set_spawn":"Respawn point set","shroomlight":"Shroomlight","shulker_box":"Shulker Box","skeleton_skull":"Skeleton Skull","skeleton_wall_skull":"Skeleton Wall Skull","slime_block":"Slime Block","small_amethyst_bud":"Small Amethyst Bud","small_dripleaf":"Small Dripleaf","smithing_table":"Smithing Table","smoker":"Smoker","smooth_basalt":"Smooth Basalt","smooth_quartz":"Smooth Quartz Block","smooth_quartz_slab":"Smooth Quartz Slab","smooth_quartz_stairs":"Smooth Quartz Stairs","smooth_red_sandstone":"Smooth Red Sandstone","smooth_red_sandstone_slab":"Smooth Red Sandstone Slab","smooth_red_sandstone_stairs":"Smooth Red Sandstone Stairs","smooth_sandstone":"Smooth Sandstone","smooth_sandstone_slab":"Smooth Sandstone Slab","smooth_sandstone_stairs":"Smooth Sandstone Stairs","smooth_stone":"Smooth Stone","smooth_stone_slab":"Smooth Stone Slab","sniffer_egg":"Sniffer Egg","snow":"Snow","snow_block":"Snow Block","soul_campfire":"Soul Campfire","soul_fire":"Soul Fire","soul_lantern":"Soul Lantern","soul_sand":"Soul Sand","soul_soil":"Soul Soil","soul_torch":"Soul Torch","soul_wall_torch":"Soul Wall Torch","spawner":"Monster Spawner","sponge":"Sponge","spore_blossom":"Spore Blossom","spruce_button":"Spruce Button","spruce_door":"Spruce Door","spruce_fence":"Spruce Fence","spruce_fence_gate":"Spruce Fence Gate","spruce_hanging_sign":"Spruce Hanging Sign","spruce_leaves":"Spruce Leaves","spruce_log":"Spruce Log","spruce_planks":"Spruce Planks","spruce_pressure_plate":"Spruce Pressure Plate","spruce_sapling":"Spruce Sapling","spruce_sign":"Spruce Sign","spruce_slab":"Spruce Slab","spruce_stairs":"Spruce Stairs","spruce_trapdoor":"Spruce Trapdoor","spruce_wall_hanging_sign":"Spruce Wall Hanging Sign","spruce_wall_sign":"Spruce Wall Sign","spruce_wood":"Spruce Wood","sticky_piston":"Sticky Piston","stone":"Stone","stone_brick_slab":"Stone Brick Slab","stone_brick_stairs":"Stone Brick Stairs","stone_brick_wall":"Stone Brick Wall","stone_bricks":"Stone Bricks","stone_button":"Stone Button","stone_pressure_plate":"Stone Pressure Plate","stone_slab":"Stone Slab","stone_stairs":"Stone Stairs","stonecutter":"Stonecutter","stripped_acacia_log":"Stripped Acacia Log","stripped_acacia_wood":"Stripped Acacia Wood","stripped_bamboo_block":"Block of Stripped Bamboo","stripped_birch_log":"Stripped Birch Log","stripped_birch_wood":"Stripped Birch Wood","stripped_cherry_log":"Stripped Cherry Log","stripped_cherry_wood":"Stripped Cherry Wood","stripped_crimson_hyphae":"Stripped Crimson Hyphae","stripped_crimson_stem":"Stripped Crimson Stem","stripped_dark_oak_log":"Stripped Dark Oak Log","stripped_dark_oak_wood":"Stripped Dark Oak Wood","stripped_jungle_log":"Stripped Jungle Log","stripped_jungle_wood":"Stripped Jungle Wood","stripped_mangrove_log":"Stripped Mangrove Log","stripped_mangrove_wood":"Stripped Mangrove Wood","stripped_oak_log":"Stripped Oak Log","stripped_oak_wood":"Stripped Oak Wood","stripped_spruce_log":"Stripped Spruce Log","stripped_spruce_wood":"Stripped Spruce Wood","stripped_warped_hyphae":"Stripped Warped Hyphae","stripped_warped_stem":"Stripped Warped Stem","structure_block":"Structure Block","structure_void":"Structure Void","sugar_cane":"Sugar Cane","sunflower":"Sunflower","suspicious_gravel":"Suspicious Gravel","suspicious_sand":"Suspicious Sand","sweet_berry_bush":"Sweet Berry Bush","tall_grass":"Tall Grass","tall_seagrass":"Tall Seagrass","target":"Target","terracotta":"Terracotta","tinted_glass":"Tinted Glass","tnt":"TNT","torch":"Torch","torchflower":"Torchflower","torchflower_crop":"Torchflower Crop","trapped_chest":"Trapped Chest","tripwire":"Tripwire","tripwire_hook":"Tripwire Hook","tube_coral":"Tube Coral","tube_coral_block":"Tube Coral Block","tube_coral_fan":"Tube Coral Fan","tube_coral_wall_fan":"Tube Coral Wall Fan","tuff":"Tuff","turtle_egg":"Turtle Egg","twisting_vines":"Twisting Vines","twisting_vines_plant":"Twisting Vines Plant","verdant_froglight":"Verdant Froglight","vine":"Vines","void_air":"Void Air","wall_torch":"Wall Torch","warped_button":"Warped Button","warped_door":"Warped Door","warped_fence":"Warped Fence","warped_fence_gate":"Warped Fence Gate","warped_fungus":"Warped Fungus","warped_hanging_sign":"Warped Hanging Sign","warped_hyphae":"Warped Hyphae","warped_nylium":"Warped Nylium","warped_planks":"Warped Planks","warped_pressure_plate":"Warped Pressure Plate","warped_roots":"Warped Roots","warped_sign":"Warped Sign","warped_slab":"Warped Slab","warped_stairs":"Warped Stairs","warped_stem":"Warped Stem","warped_trapdoor":"Warped Trapdoor","warped_wall_hanging_sign":"Warped Wall Hanging Sign","warped_wall_sign":"Warped Wall Sign","warped_wart_block":"Warped Wart Block","water":"Water","water_cauldron":"Water Cauldron","waxed_copper_block":"Waxed Block of Copper","waxed_cut_copper":"Waxed Cut Copper","waxed_cut_copper_slab":"Waxed Cut Copper Slab","waxed_cut_copper_stairs":"Waxed Cut Copper Stairs","waxed_exposed_copper":"Waxed Exposed Copper","waxed_exposed_cut_copper":"Waxed Exposed Cut Copper","waxed_exposed_cut_copper_slab":"Waxed Exposed Cut Copper Slab","waxed_exposed_cut_copper_stairs":"Waxed Exposed Cut Copper Stairs","waxed_oxidized_copper":"Waxed Oxidized Copper","waxed_oxidized_cut_copper":"Waxed Oxidized Cut Copper","waxed_oxidized_cut_copper_slab":"Waxed Oxidized Cut Copper Slab","waxed_oxidized_cut_copper_stairs":"Waxed Oxidized Cut Copper Stairs","waxed_weathered_copper":"Waxed Weathered Copper","waxed_weathered_cut_copper":"Waxed Weathered Cut Copper","waxed_weathered_cut_copper_slab":"Waxed Weathered Cut Copper Slab","waxed_weathered_cut_copper_stairs":"Waxed Weathered Cut Copper Stairs","weathered_copper":"Weathered Copper","weathered_cut_copper":"Weathered Cut Copper","weathered_cut_copper_slab":"Weathered Cut Copper Slab","weathered_cut_copper_stairs":"Weathered Cut Copper Stairs","weeping_vines":"Weeping Vines","weeping_vines_plant":"Weeping Vines Plant","wet_sponge":"Wet Sponge","wheat":"Wheat Crops","white_banner":"White Banner","white_bed":"White Bed","white_candle":"White Candle","white_candle_cake":"Cake with White Candle","white_carpet":"White Carpet","white_concrete":"White Concrete","white_concrete_powder":"White Concrete Powder","white_glazed_terracotta":"White Glazed Terracotta","white_shulker_box":"White Shulker Box","white_stained_glass":"White Stained Glass","white_stained_glass_pane":"White Stained Glass Pane","white_terracotta":"White Terracotta","white_tulip":"White Tulip","white_wool":"White Wool","wither_rose":"Wither Rose","wither_skeleton_skull":"Wither Skeleton Skull","wither_skeleton_wall_skull":"Wither Skeleton Wall Skull","yellow_banner":"Yellow Banner","yellow_bed":"Yellow Bed","yellow_candle":"Yellow Candle","yellow_candle_cake":"Cake with Yellow Candle","yellow_carpet":"Yellow Carpet","yellow_concrete":"Yellow Concrete","yellow_concrete_powder":"Yellow Concrete Powder","yellow_glazed_terracotta":"Yellow Glazed Terracotta","yellow_shulker_box":"Yellow Shulker Box","yellow_stained_glass":"Yellow Stained Glass","yellow_stained_glass_pane":"Yellow Stained Glass Pane","yellow_terracotta":"Yellow Terracotta","yellow_wool":"Yellow Wool","zombie_head":"Zombie Head","zombie_wall_head":"Zombie Wall Head"},"items":{"acacia_boat":"Acacia Boat","acacia_chest_boat":"Acacia Boat with Chest","allay_spawn_egg":"Allay Spawn Egg","amethyst_shard":"Amethyst Shard","angler_pottery_shard":"Angler Pottery Shard","angler_pottery_sherd":"Angler Pottery Sherd","apple":"Apple","archer_pottery_shard":"Archer Pottery Shard","archer_pottery_sherd":"Archer Pottery Sherd","armor_stand":"Armor Stand","arms_up_pottery_shard":"Arms Up Pottery Shard","arms_up_pottery_sherd":"Arms Up Pottery Sherd","arrow":"Arrow","axolotl_bucket":"Bucket of Axolotl","axolotl_spawn_egg":"Axolotl Spawn Egg","baked_potato":"Baked Potato","bamboo_chest_raft":"Bamboo Raft with Chest","bamboo_raft":"Bamboo Raft","bat_spawn_egg":"Bat Spawn Egg","bee_spawn_egg":"Bee Spawn Egg","beef":"Raw Beef","beetroot":"Beetroot","beetroot_seeds":"Beetroot Seeds","beetroot_soup":"Beetroot Soup","birch_boat":"Birch Boat","birch_chest_boat":"Birch Boat with Chest","black_dye":"Black Dye","blade_pottery_shard":"Blade Pottery Shard","blade_pottery_sherd":"Blade Pottery Sherd","blaze_powder":"Blaze Powder","blaze_rod":"Blaze Rod","blaze_spawn_egg":"Blaze Spawn Egg","blue_dye":"Blue Dye","bone":"Bone","bone_meal":"Bone Meal","book":"Book","bow":"Bow","bowl":"Bowl","bread":"Bread","brewer_pottery_shard":"Brewer Pottery Shard","brewer_pottery_sherd":"Brewer Pottery Sherd","brewing_stand":"Brewing Stand","brick":"Brick","brown_dye":"Brown Dye","brush":"Brush","bucket":"Bucket","bundle":"Bundle","burn_pottery_shard":"Burn Pottery Shard","burn_pottery_sherd":"Burn Pottery Sherd","camel_spawn_egg":"Camel Spawn Egg","carrot":"Carrot","carrot_on_a_stick":"Carrot on a Stick","cat_spawn_egg":"Cat Spawn Egg","cauldron":"Cauldron","cave_spider_spawn_egg":"Cave Spider Spawn Egg","chainmail_boots":"Chainmail Boots","chainmail_chestplate":"Chainmail Chestplate","chainmail_helmet":"Chainmail Helmet","chainmail_leggings":"Chainmail Leggings","charcoal":"Charcoal","cherry_boat":"Cherry Boat","cherry_chest_boat":"Cherry Boat with Chest","chest_minecart":"Minecart with Chest","chicken":"Raw Chicken","chicken_spawn_egg":"Chicken Spawn Egg","chorus_fruit":"Chorus Fruit","clay_ball":"Clay Ball","clock":"Clock","coal":"Coal","cocoa_beans":"Cocoa Beans","cod":"Raw Cod","cod_bucket":"Bucket of Cod","cod_spawn_egg":"Cod Spawn Egg","command_block_minecart":"Minecart with Command Block","compass":"Compass","cooked_beef":"Steak","cooked_chicken":"Cooked Chicken","cooked_cod":"Cooked Cod","cooked_mutton":"Cooked Mutton","cooked_porkchop":"Cooked Porkchop","cooked_rabbit":"Cooked Rabbit","cooked_salmon":"Cooked Salmon","cookie":"Cookie","copper_ingot":"Copper Ingot","cow_spawn_egg":"Cow Spawn Egg","creeper_banner_pattern":"Banner Pattern","creeper_spawn_egg":"Creeper Spawn Egg","crossbow":"Crossbow","cyan_dye":"Cyan Dye","danger_pottery_shard":"Danger Pottery Shard","danger_pottery_sherd":"Danger Pottery Sherd","dark_oak_boat":"Dark Oak Boat","dark_oak_chest_boat":"Dark Oak Boat with Chest","debug_stick":"Debug Stick","diamond":"Diamond","diamond_axe":"Diamond Axe","diamond_boots":"Diamond Boots","diamond_chestplate":"Diamond Chestplate","diamond_helmet":"Diamond Helmet","diamond_hoe":"Diamond Hoe","diamond_horse_armor":"Diamond Horse Armor","diamond_leggings":"Diamond Leggings","diamond_pickaxe":"Diamond Pickaxe","diamond_shovel":"Diamond Shovel","diamond_sword":"Diamond Sword","disc_fragment_5":"Disc Fragment","dolphin_spawn_egg":"Dolphin Spawn Egg","donkey_spawn_egg":"Donkey Spawn Egg","dragon_breath":"Dragon's Breath","dried_kelp":"Dried Kelp","drowned_spawn_egg":"Drowned Spawn Egg","echo_shard":"Echo Shard","egg":"Egg","elder_guardian_spawn_egg":"Elder Guardian Spawn Egg","elytra":"Elytra","emerald":"Emerald","enchanted_book":"Enchanted Book","enchanted_golden_apple":"Enchanted Golden Apple","end_crystal":"End Crystal","ender_dragon_spawn_egg":"Ender Dragon Spawn Egg","ender_eye":"Eye of Ender","ender_pearl":"Ender Pearl","enderman_spawn_egg":"Enderman Spawn Egg","endermite_spawn_egg":"Endermite Spawn Egg","evoker_spawn_egg":"Evoker Spawn Egg","experience_bottle":"Bottle o' Enchanting","explorer_pottery_shard":"Explorer Pottery Shard","explorer_pottery_sherd":"Explorer Pottery Sherd","feather":"Feather","fermented_spider_eye":"Fermented Spider Eye","filled_map":"Map","fire_charge":"Fire Charge","firework_rocket":"Firework Rocket","firework_star":"Firework Star","fishing_rod":"Fishing Rod","flint":"Flint","flint_and_steel":"Flint and Steel","flower_banner_pattern":"Banner Pattern","flower_pot":"Flower Pot","fox_spawn_egg":"Fox Spawn Egg","friend_pottery_shard":"Friend Pottery Shard","friend_pottery_sherd":"Friend Pottery Sherd","frog_spawn_egg":"Frog Spawn Egg","furnace_minecart":"Minecart with Furnace","ghast_spawn_egg":"Ghast Spawn Egg","ghast_tear":"Ghast Tear","glass_bottle":"Glass Bottle","glistering_melon_slice":"Glistering Melon Slice","globe_banner_pattern":"Banner Pattern","glow_berries":"Glow Berries","glow_ink_sac":"Glow Ink Sac","glow_item_frame":"Glow Item Frame","glow_squid_spawn_egg":"Glow Squid Spawn Egg","glowstone_dust":"Glowstone Dust","goat_horn":"Goat Horn","goat_spawn_egg":"Goat Spawn Egg","gold_ingot":"Gold Ingot","gold_nugget":"Gold Nugget","golden_apple":"Golden Apple","golden_axe":"Golden Axe","golden_boots":"Golden Boots","golden_carrot":"Golden Carrot","golden_chestplate":"Golden Chestplate","golden_helmet":"Golden Helmet","golden_hoe":"Golden Hoe","golden_horse_armor":"Golden Horse Armor","golden_leggings":"Golden Leggings","golden_pickaxe":"Golden Pickaxe","golden_shovel":"Golden Shovel","golden_sword":"Golden Sword","gray_dye":"Gray Dye","green_dye":"Green Dye","guardian_spawn_egg":"Guardian Spawn Egg","gunpowder":"Gunpowder","heart_of_the_sea":"Heart of the Sea","heart_pottery_shard":"Heart Pottery Shard","heart_pottery_sherd":"Heart Pottery Sherd","heartbreak_pottery_shard":"Heartbreak Pottery Shard","heartbreak_pottery_sherd":"Heartbreak Pottery Sherd","hoglin_spawn_egg":"Hoglin Spawn Egg","honey_bottle":"Honey Bottle","honeycomb":"Honeycomb","hopper_minecart":"Minecart with Hopper","horse_spawn_egg":"Horse Spawn Egg","howl_pottery_shard":"Howl Pottery Shard","howl_pottery_sherd":"Howl Pottery Sherd","husk_spawn_egg":"Husk Spawn Egg","ink_sac":"Ink Sac","iron_axe":"Iron Axe","iron_boots":"Iron Boots","iron_chestplate":"Iron Chestplate","iron_golem_spawn_egg":"Iron Golem Spawn Egg","iron_helmet":"Iron Helmet","iron_hoe":"Iron Hoe","iron_horse_armor":"Iron Horse Armor","iron_ingot":"Iron Ingot","iron_leggings":"Iron Leggings","iron_nugget":"Iron Nugget","iron_pickaxe":"Iron Pickaxe","iron_shovel":"Iron Shovel","iron_sword":"Iron Sword","item_frame":"Item Frame","jungle_boat":"Jungle Boat","jungle_chest_boat":"Jungle Boat with Chest","knowledge_book":"Knowledge Book","lapis_lazuli":"Lapis Lazuli","lava_bucket":"Lava Bucket","lead":"Lead","leather":"Leather","leather_boots":"Leather Boots","leather_chestplate":"Leather Tunic","leather_helmet":"Leather Cap","leather_horse_armor":"Leather Horse Armor","leather_leggings":"Leather Pants","light_blue_dye":"Light Blue Dye","light_gray_dye":"Light Gray Dye","lime_dye":"Lime Dye","lingering_potion":"Lingering Potion","llama_spawn_egg":"Llama Spawn Egg","lodestone_compass":"Lodestone Compass","magenta_dye":"Magenta Dye","magma_cream":"Magma Cream","magma_cube_spawn_egg":"Magma Cube Spawn Egg","mangrove_boat":"Mangrove Boat","mangrove_chest_boat":"Mangrove Boat with Chest","map":"Empty Map","melon_seeds":"Melon Seeds","melon_slice":"Melon Slice","milk_bucket":"Milk Bucket","minecart":"Minecart","miner_pottery_shard":"Miner Pottery Shard","miner_pottery_sherd":"Miner Pottery Sherd","mojang_banner_pattern":"Banner Pattern","mooshroom_spawn_egg":"Mooshroom Spawn Egg","mourner_pottery_shard":"Mourner Pottery Shard","mourner_pottery_sherd":"Mourner Pottery Sherd","mule_spawn_egg":"Mule Spawn Egg","mushroom_stew":"Mushroom Stew","music_disc_5":"Music Disc","music_disc_11":"Music Disc","music_disc_13":"Music Disc","music_disc_blocks":"Music Disc","music_disc_cat":"Music Disc","music_disc_chirp":"Music Disc","music_disc_far":"Music Disc","music_disc_mall":"Music Disc","music_disc_mellohi":"Music Disc","music_disc_otherside":"Music Disc","music_disc_pigstep":"Music Disc","music_disc_relic":"Music Disc","music_disc_stal":"Music Disc","music_disc_strad":"Music Disc","music_disc_wait":"Music Disc","music_disc_ward":"Music Disc","mutton":"Raw Mutton","name_tag":"Name Tag","nautilus_shell":"Nautilus Shell","nether_brick":"Nether Brick","nether_star":"Nether Star","nether_wart":"Nether Wart","netherite_axe":"Netherite Axe","netherite_boots":"Netherite Boots","netherite_chestplate":"Netherite Chestplate","netherite_helmet":"Netherite Helmet","netherite_hoe":"Netherite Hoe","netherite_ingot":"Netherite Ingot","netherite_leggings":"Netherite Leggings","netherite_pickaxe":"Netherite Pickaxe","netherite_scrap":"Netherite Scrap","netherite_shovel":"Netherite Shovel","netherite_sword":"Netherite Sword","oak_boat":"Oak Boat","oak_chest_boat":"Oak Boat with Chest","ocelot_spawn_egg":"Ocelot Spawn Egg","orange_dye":"Orange Dye","painting":"Painting","panda_spawn_egg":"Panda Spawn Egg","paper":"Paper","parrot_spawn_egg":"Parrot Spawn Egg","phantom_membrane":"Phantom Membrane","phantom_spawn_egg":"Phantom Spawn Egg","pig_spawn_egg":"Pig Spawn Egg","piglin_banner_pattern":"Banner Pattern","piglin_brute_spawn_egg":"Piglin Brute Spawn Egg","piglin_spawn_egg":"Piglin Spawn Egg","pillager_spawn_egg":"Pillager Spawn Egg","pink_dye":"Pink Dye","pitcher_plant":"Pitcher Plant","pitcher_pod":"Pitcher Pod","plenty_pottery_shard":"Plenty Pottery Shard","plenty_pottery_sherd":"Plenty Pottery Sherd","poisonous_potato":"Poisonous Potato","polar_bear_spawn_egg":"Polar Bear Spawn Egg","popped_chorus_fruit":"Popped Chorus Fruit","porkchop":"Raw Porkchop","potato":"Potato","potion":"Potion","pottery_shard_archer":"Archer Pottery Shard","pottery_shard_arms_up":"Arms Up Pottery Shard","pottery_shard_prize":"Prize Pottery Shard","pottery_shard_skull":"Skull Pottery Shard","powder_snow_bucket":"Powder Snow Bucket","prismarine_crystals":"Prismarine Crystals","prismarine_shard":"Prismarine Shard","prize_pottery_shard":"Prize Pottery Shard","prize_pottery_sherd":"Prize Pottery Sherd","pufferfish":"Pufferfish","pufferfish_bucket":"Bucket of Pufferfish","pufferfish_spawn_egg":"Pufferfish Spawn Egg","pumpkin_pie":"Pumpkin Pie","pumpkin_seeds":"Pumpkin Seeds","purple_dye":"Purple Dye","quartz":"Nether Quartz","rabbit":"Raw Rabbit","rabbit_foot":"Rabbit's Foot","rabbit_hide":"Rabbit Hide","rabbit_spawn_egg":"Rabbit Spawn Egg","rabbit_stew":"Rabbit Stew","ravager_spawn_egg":"Ravager Spawn Egg","raw_copper":"Raw Copper","raw_gold":"Raw Gold","raw_iron":"Raw Iron","recovery_compass":"Recovery Compass","red_dye":"Red Dye","redstone":"Redstone Dust","rotten_flesh":"Rotten Flesh","saddle":"Saddle","salmon":"Raw Salmon","salmon_bucket":"Bucket of Salmon","salmon_spawn_egg":"Salmon Spawn Egg","scute":"Scute","sheaf_pottery_shard":"Sheaf Pottery Shard","sheaf_pottery_sherd":"Sheaf Pottery Sherd","shears":"Shears","sheep_spawn_egg":"Sheep Spawn Egg","shelter_pottery_shard":"Shelter Pottery Shard","shelter_pottery_sherd":"Shelter Pottery Sherd","shield":"Shield","shulker_shell":"Shulker Shell","shulker_spawn_egg":"Shulker Spawn Egg","sign":"Sign","silverfish_spawn_egg":"Silverfish Spawn Egg","skeleton_horse_spawn_egg":"Skeleton Horse Spawn Egg","skeleton_spawn_egg":"Skeleton Spawn Egg","skull_banner_pattern":"Banner Pattern","skull_pottery_shard":"Skull Pottery Shard","skull_pottery_sherd":"Skull Pottery Sherd","slime_ball":"Slimeball","slime_spawn_egg":"Slime Spawn Egg","smithing_template":"Smithing Template","sniffer_spawn_egg":"Sniffer Spawn Egg","snort_pottery_shard":"Snort Pottery Shard","snort_pottery_sherd":"Snort Pottery Sherd","snow_golem_spawn_egg":"Snow Golem Spawn Egg","snowball":"Snowball","spectral_arrow":"Spectral Arrow","spider_eye":"Spider Eye","spider_spawn_egg":"Spider Spawn Egg","splash_potion":"Splash Potion","spruce_boat":"Spruce Boat","spruce_chest_boat":"Spruce Boat with Chest","spyglass":"Spyglass","squid_spawn_egg":"Squid Spawn Egg","stick":"Stick","stone_axe":"Stone Axe","stone_hoe":"Stone Hoe","stone_pickaxe":"Stone Pickaxe","stone_shovel":"Stone Shovel","stone_sword":"Stone Sword","stray_spawn_egg":"Stray Spawn Egg","strider_spawn_egg":"Strider Spawn Egg","string":"String","sugar":"Sugar","suspicious_stew":"Suspicious Stew","sweet_berries":"Sweet Berries","tadpole_bucket":"Bucket of Tadpole","tadpole_spawn_egg":"Tadpole Spawn Egg","tipped_arrow":"Tipped Arrow","tnt_minecart":"Minecart with TNT","torchflower_seeds":"Torchflower Seeds","totem_of_undying":"Totem of Undying","trader_llama_spawn_egg":"Trader Llama Spawn Egg","trident":"Trident","tropical_fish":"Tropical Fish","tropical_fish_bucket":"Bucket of Tropical Fish","tropical_fish_spawn_egg":"Tropical Fish Spawn Egg","turtle_helmet":"Turtle Shell","turtle_spawn_egg":"Turtle Spawn Egg","vex_spawn_egg":"Vex Spawn Egg","villager_spawn_egg":"Villager Spawn Egg","vindicator_spawn_egg":"Vindicator Spawn Egg","wandering_trader_spawn_egg":"Wandering Trader Spawn Egg","warden_spawn_egg":"Warden Spawn Egg","warped_fungus_on_a_stick":"Warped Fungus on a Stick","water_bucket":"Water Bucket","wheat":"Wheat","wheat_seeds":"Wheat Seeds","white_dye":"White Dye","witch_spawn_egg":"Witch Spawn Egg","wither_skeleton_spawn_egg":"Wither Skeleton Spawn Egg","wither_spawn_egg":"Wither Spawn Egg","wolf_spawn_egg":"Wolf Spawn Egg","wooden_axe":"Wooden Axe","wooden_hoe":"Wooden Hoe","wooden_pickaxe":"Wooden Pickaxe","wooden_shovel":"Wooden Shovel","wooden_sword":"Wooden Sword","writable_book":"Book and Quill","written_book":"Written Book","yellow_dye":"Yellow Dye","zoglin_spawn_egg":"Zoglin Spawn Egg","zombie_horse_spawn_egg":"Zombie Horse Spawn Egg","zombie_spawn_egg":"Zombie Spawn Egg","zombie_villager_spawn_egg":"Zombie Villager Spawn Egg","zombified_piglin_spawn_egg":"Zombified Piglin Spawn Egg"},"entities":{"allay":"Allay","area_effect_cloud":"Area Effect Cloud","armor_stand":"Armor Stand","arrow":"Arrow","axolotl":"Axolotl","bat":"Bat","bee":"Bee","blaze":"Blaze","block_display":"Block Display","boat":"Boat","camel":"Camel","cat":"Cat","cave_spider":"Cave Spider","chest_boat":"Boat with Chest","chest_minecart":"Minecart with Chest","chicken":"Chicken","cod":"Cod","command_block_minecart":"Minecart with Command Block","cow":"Cow","creeper":"Creeper","dolphin":"Dolphin","donkey":"Donkey","dragon_fireball":"Dragon Fireball","drowned":"Drowned","egg":"Thrown Egg","elder_guardian":"Elder Guardian","end_crystal":"End Crystal","ender_dragon":"Ender Dragon","ender_pearl":"Thrown Ender Pearl","enderman":"Enderman","endermite":"Endermite","evoker":"Evoker","evoker_fangs":"Evoker Fangs","experience_bottle":"Thrown Bottle o' Enchanting","experience_orb":"Experience Orb","eye_of_ender":"Eye of Ender","falling_block":"Falling Block","falling_block_type":"Falling %s","fireball":"Fireball","firework_rocket":"Firework Rocket","fishing_bobber":"Fishing Bobber","fox":"Fox","frog":"Frog","furnace_minecart":"Minecart with Furnace","ghast":"Ghast","giant":"Giant","glow_item_frame":"Glow Item Frame","glow_squid":"Glow Squid","goat":"Goat","guardian":"Guardian","hoglin":"Hoglin","hopper_minecart":"Minecart with Hopper","horse":"Horse","husk":"Husk","illusioner":"Illusioner","interaction":"Interaction","iron_golem":"Iron Golem","item":"Item","item_display":"Item Display","item_frame":"Item Frame","killer_bunny":"The Killer Bunny","leash_knot":"Leash Knot","lightning_bolt":"Lightning Bolt","llama":"Llama","llama_spit":"Llama Spit","magma_cube":"Magma Cube","marker":"Marker","minecart":"Minecart","mooshroom":"Mooshroom","mule":"Mule","ocelot":"Ocelot","painting":"Painting","panda":"Panda","parrot":"Parrot","phantom":"Phantom","pig":"Pig","piglin":"Piglin","piglin_brute":"Piglin Brute","pillager":"Pillager","player":"Player","polar_bear":"Polar Bear","potion":"Potion","pufferfish":"Pufferfish","rabbit":"Rabbit","ravager":"Ravager","salmon":"Salmon","sheep":"Sheep","shulker":"Shulker","shulker_bullet":"Shulker Bullet","silverfish":"Silverfish","skeleton":"Skeleton","skeleton_horse":"Skeleton Horse","slime":"Slime","small_fireball":"Small Fireball","sniffer":"Sniffer","snow_golem":"Snow Golem","snowball":"Snowball","spawner_minecart":"Minecart with Monster Spawner","spectral_arrow":"Spectral Arrow","spider":"Spider","squid":"Squid","stray":"Stray","strider":"Strider","tadpole":"Tadpole","text_display":"Text Display","tnt":"Primed TNT","tnt_minecart":"Minecart with TNT","trader_llama":"Trader Llama","trident":"Trident","tropical_fish":"Tropical Fish","turtle":"Turtle","vex":"Vex","villager":"Villager","vindicator":"Vindicator","wandering_trader":"Wandering Trader","warden":"Warden","witch":"Witch","wither":"Wither","wither_skeleton":"Wither Skeleton","wither_skull":"Wither Skull","wolf":"Wolf","zoglin":"Zoglin","zombie":"Zombie","zombie_horse":"Zombie Horse","zombie_villager":"Zombie Villager","zombified_piglin":"Zombified Piglin"},"misc":{"animals_bred":"Animals Bred","aviate_one_cm":"Distance by Elytra","bell_ring":"Bells Rung","boat_one_cm":"Distance by Boat","clean_armor":"Armor Pieces Cleaned","clean_banner":"Banners Cleaned","clean_shulker_box":"Shulker Boxes Cleaned","climb_one_cm":"Distance Climbed","crouch_one_cm":"Distance Crouched","damage_absorbed":"Damage Absorbed","damage_blocked_by_shield":"Damage Blocked by Shield","damage_dealt":"Damage Dealt","damage_dealt_absorbed":"Damage Dealt (Absorbed)","damage_dealt_resisted":"Damage Dealt (Resisted)","damage_resisted":"Damage Resisted","damage_taken":"Damage Taken","deaths":"Number of Deaths","drop":"Items Dropped","eat_cake_slice":"Cake Slices Eaten","enchant_item":"Items Enchanted","fall_one_cm":"Distance Fallen","fill_cauldron":"Cauldrons Filled","fish_caught":"Fish Caught","fly_one_cm":"Distance Flown","horse_one_cm":"Distance by Horse","inspect_dispenser":"Dispensers Searched","inspect_dropper":"Droppers Searched","inspect_hopper":"Hoppers Searched","interact_with_anvil":"Interactions with Anvil","interact_with_beacon":"Interactions with Beacon","interact_with_blast_furnace":"Interactions with Blast Furnace","interact_with_brewingstand":"Interactions with Brewing Stand","interact_with_campfire":"Interactions with Campfire","interact_with_cartography_table":"Interactions with Cartography Table","interact_with_crafting_table":"Interactions with Crafting Table","interact_with_furnace":"Interactions with Furnace","interact_with_grindstone":"Interactions with Grindstone","interact_with_lectern":"Interactions with Lectern","interact_with_loom":"Interactions with Loom","interact_with_smithing_table":"Interactions with Smithing Table","interact_with_smoker":"Interactions with Smoker","interact_with_stonecutter":"Interactions with Stonecutter","jump":"Jumps","junk_fished":"Junk Fished","leave_game":"Games Quit","minecart_one_cm":"Distance by Minecart","mob_kills":"Mob Kills","open_barrel":"Barrels Opened","open_chest":"Chests Opened","open_enderchest":"Ender Chests Opened","open_shulker_box":"Shulker Boxes Opened","pig_one_cm":"Distance by Pig","play_noteblock":"Note Blocks Played","play_record":"Music Discs Played","play_time":"Time Played","player_kills":"Player Kills","pot_flower":"Plants Potted","raid_trigger":"Raids Triggered","raid_win":"Raids Won","ring_bell":"Bells Rung","sleep_in_bed":"Times Slept in a Bed","sneak_time":"Sneak Time","sprint_one_cm":"Distance Sprinted","strider_one_cm":"Distance by Strider","swim_one_cm":"Distance Swum","talked_to_villager":"Talked to Villagers","target_hit":"Targets Hit","time_since_death":"Time Since Last Death","time_since_rest":"Time Since Last Rest","total_world_time":"Time with World Open","traded_with_villager":"Traded with Villagers","treasure_fished":"Treasure Fished","trigger_trapped_chest":"Trapped Chests Triggered","tune_noteblock":"Note Blocks Tuned","use_cauldron":"Water Taken from Cauldron","walk_on_water_one_cm":"Distance Walked on Water","walk_one_cm":"Distance Walked","walk_under_water_one_cm":"Distance Walked under Water"}} 2 | -------------------------------------------------------------------------------- /resources/stx/stx_modules.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "name": "itemlayout", 4 | "display_name": "Item Layout", 5 | "color": "#26DE81", 6 | "wiki": "https://github.com/CommandLeo/scarpet/wiki/Item-Layout" 7 | }, 8 | { 9 | "name": "randomizer", 10 | "display_name": "Item Randomizer", 11 | "color": "#9B59B6", 12 | "wiki": "https://github.com/CommandLeo/scarpet/wiki/Item-Randomizer" 13 | }, 14 | { 15 | "name": "getallitems", 16 | "display_name": "Get All Items", 17 | "color": "#E84393", 18 | "wiki": "https://github.com/CommandLeo/scarpet/wiki/Get-All-Items" 19 | }, 20 | { 21 | "name": "fill_level", 22 | "display_name": "Fill Level Utilities", 23 | "color": "#E67E22", 24 | "wiki": "https://github.com/CommandLeo/scarpet/wiki/Fill-Level-Utilities" 25 | } 26 | ] 27 | --------------------------------------------------------------------------------