Minecraft 1.20.2 brings us some very significant changes for both data packs with function macros and a new random command and resource packs with a GUI sprite slicing. My name is slicedlime and I’m here to guide you through all these changes. Let’s start with the pack format. Both data packs and resource packs are now on pack version 18. Both pack types now also support multi-version packs. This allows you to create packs that are compatible with multiple versions of the game (starting with this one). This is done by including a supported_formats field which lists all supported pack versions. Packs can also contain overlay directories, which are sub-pack folder structures that are applied on top of the base packs but only for certain version ranges. That means you can have a shared base for all supported versions of the pack, but separate files where needed. An overlay can replace or add files, but not remove files from the base pack. These overlays are added in a new overlays section in the pack metadata. Just like world files previously, both data and resource packs now detect symbolic links used. If you add such a pack, the game will now warn and packs with disallowed symbolic links will not be visible in the lists of available packs. To allow a certain symbolic link, add it to the allowed_symlinks file. Now – let’s talk about commands. The last 50 commands you’ve used are now saved across sessions and worlds. You can access them like usual by pressing up in the chat. Regular chat is only saved in the context of the same game session, so leaving a server or world clears it. Recent commands are stored in a new file in the game folder called command_history.txt. There are also some significant changes to functions in this version. You can now continue long commands on separate lines by ending a line with a backslash. The following line is then appended with its leading and trailing whitespace trimmed. There is also support for function macros. Any line beginning with a dollar sign marks it as a macro line, and a function becomes a function macro if it contains any macro lines. Each macro line also contains one or more substitution placeholders in the form of a Dollar sign and then a variable name in parenthesis. To call a function macro it needs to get substitution values for all the variables in the function macro. This is done using a new form of the function command, sending parameters in data form to that function macro. The simplest form of this call is to include all the data in literal form in a compound, like is shown in these examples. You can also use a more dynamic form, function with and a data source. This is specified exactly like you’d specify a data source for the data get command. Either way, the resulting data must be a compound and it must contain entries for all the variables in the function macro. There can also be more data in that compound – it is completely ignored if that is the case. What happens when a function macro is called is that the values provided are substituted in place of the variable specifications and the resulting commands are executed as a function. If the result contains any syntax errors, the whole call fails and the entire function call is skipped. Now some things to note about macros – keep in mind that they are not function calls with arguments in that the substitution happens on a source level. This means any non-string types are converted to string form before substitution and it Also means that any macro lines in the function need to be re-evaluated which comes with a performance cost. In terms of the performance of macros, any regular commands in the function are still pre-parsed like for regular functions. Only the commands that have any substitutions will be re-parsed. The game will also attempt to cache the active parameter set used for the last few calls which means if you repeatedly call a function macro with the same data, it is likely to be more efficient. That isn’t all for commands though – there is also a new command in this version as well – the random command. Random lets you draw random values and control the random generation of random sequences. There are two subcommands for drawing random values – random value and random roll. Both take a range as a parameter and both do the same thing – randomize a value within that range. The difference is that random roll also announces the result in chat so that everyone can see it. These forms are usable by anyone – you do not need to have operator permissions. An advanced version that you do need operator permissions to use is to add a random sequence Id to the end of the command. This draws a random value out of that specific sequence, producing a deterministic and seed-based value by default. There is one more sub-command which is used to control random sequence generation – it is random reset. Random reset is followed either by an asterisk for everything or a sequence id to reset. This resets the sequence in question or all the sequences if you specified that. In addition you can also control the random sequence seed by adding a seed number and Specifying whether the world seed and the sequence id should be included in the resulting seed – by default these parameters are 0, true and true. Setting the includeWorldSeed parameter to false means the random sequence will have the same result regardless of which world it is being used in. Setting the includeSequenceId value to false means you’ll get the same sequence regardless of the sequence id, which can be used to set up multiple parallel sequences, for instance. Using an asterisk to reset all the sequences also sets the default parameters, which are then used for any newly created sequences. With those fairly massive news out of the way, let’s quickly walk through some other small changes and fixes. The belowName display slot selector in the scoreboard command is now below_name, written in all lower case. And two fixes have been made to the item command which can now replace items within chiseled Bookshelves and remove items from jukeboxes. When editing text like in a command block, holding shift and navigating with the arrow keys now properly scrolls the text. And functions containing the say command mixed with other command output now display their results in the right order. In game rule news, there is a new game rule in this version called enderPearlsVanishOnDeath. The default value for this rule is on which matches how the game always used to work, so if you don’t toggle this new rule, nothing changes. If you do turn it off, ender pearls you’ve thrown will remain in the world even when you die. The randomTickSpeed game rule now also affects the accumulation of snow and the conversion of water to ice. Some attribute news: max absorption is now an attribute called generic.max_absorption. It acts similarly to the max health attribute but controls the max amount of absorption hearts – when setting the AbsorptionAmount in an entity’s data, the max absorption serves as the upper bound. In entity news, the passenger offsets have been adjusted for most mobs so summoned passengers And the ride command should now produce less glitchy results. You can also see the attachment point of riders when using the F3+B hitbox debug mode. Effects are now stored differently. The big change here is that the ID of an effect is now a namespaced string instead of an integer, So for instance you’ll need to use minecraft:mining_fatigue instead of 4. The mapping of all the numeric ids to the new namespaced IDs are on screen now. In addition, fields that store data about effects have been changed to use the standard snake case format. This applies to the effect instances themselves wherever they appear with all the fields now lowercase and using underscore for spacing. Items that have effects including all types of potions and tipped arrows now have custom_potion_effects field in that format as well, and suspicious_stew items now have effects in lowercase and the Sub-items changed from EffectId and EffectDuration to just id and duration. Mooshrooms have been changed to have stew_effects instead of EffectId and EffectDuration. The new field is a list of effects just like for suspicious stew items. Area effect cloud data now has a lowercase effects field which is a list of effect instances. Arrow data now has a snake case format custom potion effects, which is also a list of effect instances. Players, armor stands and all type of living entity data now has a snake case active_effects field which is also a list of effect instances. And finally for block entities, the beacon block entity Primary and Secondary fields have been renamed primary_effect and secondary_effect in snake case, and its contents is now a namespaced ID instead of a number. In loot table news, there is a new function called sequence. This allows you to run a sequence of loot functions. It has one field called functions that is a list of sub-functions. You can also implicitly specify a sequence by simply inlining a list of functions at the top level. The same thing can now also be done for predicates – inlining a list of predicates now works Exactly as if you had specified an all_of predicate. A decal field has been added for armor trim patterns – setting this field to true makes the trim only render on pixels that also exist on the texture of the armor the trim is applied to. In game event news, the entity_roar and entity_shake events have been removed and replaced with an entity_action event which is also used for some other entity actions. New tags in this version! A new damage type tag called no_knockback has been added which causes knockback to not be caused by that damage. Vanilla types added to this tag include damage from events like explosions where the event iself also causes knockback separately. Another new damage type tag is always_kills_armor_stands, which controls which damage types will instantly break an armor stand, like arrow damage does in Vanilla. A new entity type tag called non_controlling_rider has been added for entities that don’t take over the control of a vehicle when riding it. And there are two new block tags – concrete_powder for all the concrete powder blocks and camel_sand_step_sound_blocks for all the blocks that camels make the special sand step sound on. The new trade_rebalance pack also introduces a number of new structure tags corresponding to the structures found on the new village and explorer maps in the villager trade rebalance experiment pack. Display entities now start updating their client-side position and rotation on the first tick after an update. In previous versions, updates were applied in the same tick as the update was received which could cause uneven motion. This new behavior is similar to how armor stands, mobs and players interpolate. There’s a new field as well called teleport_duration which controls this behavior and which is a value in ticks. If it is set to 0 it means that updates are applied immediately and 1 means that display entities will move from their current position and rotation to the updated ones over the course of a tick. Higher values spread the movement over multiple ticks. Note here that these changes apply to the position and rotation of the entity itself, not its internal display transformation. The teleport_duration value takes effect whenever the position or rotation changes, so changes to the teleport_duration value only applies to position and rotation changes made after it changed. One final note here is that when riding another entity, things work exactly as before. For resource packs, the main thing that has happened in this version is that all textures that contained multiple sprites in the same sheet for the user interface have been split into separate image files. These can now be found in a new folder called textures/gui/sprites. In addition, the villager2.png file is now called villager.png and the icon/trial_available and realm_status/expires_soon animations are now done using .mcmeta files. All of those changes can be made to your packs automatically using a tool provided by mojang called Slicer. If that seems familiar and you’ve been around all the way back to Minecraft 1.14 you might have seen a previous version of this tool as well. Running this version of the tool requires a java 17 installation and running it will only affect the gui texture folders of your packs. Slicer doesn’t change your files, instead it will output the result of converting the files into a new folder. It takes three arguments – first the input which is your pack directory or zip, then the output directory and finally an optional argument for a leftover directory. If you specify that, it will be filled with copies of the source images from your pack with added highlights for areas that were migrated. Everything outside those areas is not needed for the vanilla game. This means that from this point on, any sprite can now be animated using a .mcmeta file similar To other atlases. Sprites in the gui atlas can now also configure their scaling behavior in a new gui section in the mcmeta format. That section has a scaling field, which has a type. That type is one of stretch, which is the default, tile and nine_slice. When the type is tile, the scaling data also has width and height fields describing the repetition of the texture. When the type is nine_slice, the sprite is split into 4 corners, 4 edges and one center slice which will tile across the available space. In this case the data also has width and height which is the number of pixels to cover on-screen across its with. It also has a border field which determines how the slices are made. This can either be a single constant, in which case it specifies a uniform border width. It can also be an object with four fields called top, left, right and bottom. In addition to that, some other smaller changes have also been made. The bundle tooltip background is now drawn as a nine-sliced sprite. The icons for the Accessibility, Language and Realms News buttons have been split from Their underlying button texture and the Realms Invite button is now drawn as an overlay on the normal button texture as well. And the map_icons.png texture now has seven new icons. In news that might be interesting for modders, the network protocol has been changed to include a new configuration phase. This is part of ongoing work to enable more data-driven features in the future – for details, see the changelog on screen. This version also upgrades to a new java version, shipping with the Microsoft distribution of OpenJDK version 17.0.8. And finally, the Minecraft dedicated server has a new option in the server.properties File called log-ips. The default value is true and if you set it to false that will prevent player IPs from being included in the log file when players join the game. And that’s all for this time. I hope you found this video useful – my name is slicedlime, thank you for watching. I’ll see you next time. Video Information
This video, titled ‘Technical News in Minecraft 1.20.2 – Macros, Random Command, Pack Overlays!’, was uploaded by slicedlime on 2023-09-21 17:00:16. It has garnered 6071 views and 640 likes. The duration of the video is 00:14:54 or 894 seconds.
Minecraft 1.20.2 is here, with a great deal of news for map makers and pack creators! Check out the new macros, random command, pack overlays and more in this guide! #minecraftemployee
The information in this video applies to Minecraft Java Edition. Technical changes are unlikely to be the same for Bedrock Edition.
slicedlime works as a Tech Lead for Minecraft at Mojang, but the YouTube and Twitch channels are personal projects run entirely in his spare time. This is an unofficial update video that aims to be the most comprehensive guide possible. Official announcement: https://www.minecraft.net/en-us/article/minecraft-java-edition-1-20-2
Gameplay updates: https://youtu.be/3L3t25dyiu0
Introduction: 0:00 Pack Format: 0:15 Multi-Version Packs: 0:21 Symbolic Links: 0:59 Commands & Functions: 1:18 Macros: 1:53 The Random Command: 3:50 Command Changes & Fixes: 5:35 Game Rules: 6:09 Attributes: 6:34 Entities & Data: 6:53 Loot Tables: 8:41 Predicates: 8:57 Armor Trims: 9:06 Game Events: 9:17 Tags: 9:28 Display Entities: 10:24 Resource Packs: 11:26 Sprite Formats: 12:42 Modding: 14:06 Servers: 14:29 Thank You: 14:45
Thank you to the helper crew! Bl4ckscor3, Fabian, JochCool, Octojen, Vegguid, Violine & Wolk
Some camera sequences rendered using the ReplayMod: https://replaymod.com
Music: – “This Old Habit” by Victor Lundberg – “Forever Be” by Victor Lundberg – “Earthbound” by Victor Lundberg – “Come Daylight” by Victor Lundberg – “Walk These Shoes” by Crystal Shards
Artists: – Victor Lundberg: https://spoti.fi/42dqYZd – Crystal Shards: https://tinyurl.com/2sw8xy7y
—
Main channel: https://www.youtube.com/slicedlime Second channel: https://www.youtube.com/limeuncut Outdoors channel: https://youtube.com/@limeoutdoors Twitch: http://www.twitch.tv/slicedlime TikTok: https://tiktok.com/@slicedlime Twitter: http://twitter.com/slicedlime Fediverse: https://octodon.social/@slicedlime Facebook: https://www.facebook.com/SlicedlimeYT Patreon: https://www.patreon.com/slicedlime Discord: https://discord.gg/aFAnsdv
#minecraft #news