It's been almost a year since the first "Snapshot Note" series! Anyway here's the 23w03a stuff info.
Fabric Loader 0.14.13 should be used for this version.
Fabric API 0.72.1 is released for this version. Biome API received 1 breaking change; setPrecipitation method in BiomeModificationContext.WeatherContext now takes a boolean.
Multiple S2C packets can now be bundled into a single packet, so that they are processed in the same client tick. The bundled packets are still sent separately, but is re-bundled in the client.
Example of bundling 2 CustomPayloadS2CPacket and 1 GameMessageS2CPacket:
List<Packet<ClientPlayPacketListener>> packets = List.of(
ServerPlayNetworking.createS2CPacket(id, buf),
ServerPlayNetworking.createS2CPacket(id2, buf2),
new GameMessageS2CPacket(Text.of("Test"), false)
);
player.sendPacket(new BundleS2CPacket(packets));On the client, the handlers are invoked for each packet in the same order.
Internally, an encoder on the Netty side splits the bundled packet and inserts BundleSplitterPacket, a marker packet. The client reassembles the packets and processes all at once after the last one is received. This is now used to send entity tracker updates.
Gegy is improving the performance of DataFixerUpper, but that PR hasn't been merged yet. That said, this snapshot contains some data fixer changes, possibly related to the improvement:
updatemethods inNbtHelperare moved toDataFixTypes.- There is now a method to update
Dynamics that aren't NBT. getDataVersionandputDataVersionmethods were added toNbtHelper.
TranslatableTextContent now supports text fallbacks. To construct texts with fallbacks, use Text#translatableWithFallback. ScreenTexts received CONTINUE and SPACE predefined texts, as well as space method for chaining like space().append(text).
Similarly, Language#get now allows fallback to be passed.
Biome precipitation is now a boolean. Whether it rains or snows is now entirely dependent on temperature and is positional; if the temperature is below 0.15, it snows. Biome Modification API's setPrecipitation method now takes a boolean to reflect this, and Biome#getPrecipitation and hasPrecipitation methods were added to reflect this. Biome#isHot is removed and replaced with tags for specific usecases.
Biome JSON files should now have a boolean has_precipitation field, not enum precipitation field.
RenderSystem#enableTexture and disableTexture has been removed. They are no longer necessary. It is also no longer necessary to call setShaderColor before setShaderTexture.
GUI code has received changes to support new keyboard navigation. After each keyboard navigation, the game recalculates the focused element; it creates a tree of elements, making sure only one element is focused at a time. Screen implementations should call setInitialFocus within the init method.
Several MathHelper methods unused or easily replaceable with java.lang.Math methods were removed. They are: fastFloor, average, packRgb, fastInverseSqrt, lerpAngle, fwrapDegrees, the long and byte overload of clamp, multiplyColors, murmurHash, parseDouble, parseInt, getCumulativeDistribution, absFloor, magnitude, and ceil.
lerpAngle can be replaced with lerpAngleDegrees. Note the argument order; lerpAngle(a, b, c)'s equivalent is lerpAngleDegrees(c, a, b).
DamageTiltS2CPacketthat tilts the screen of the players that took damage.BlockPosArgumentType#getLoadedBlockPosthat grabs the block pos argument if the position is loaded.Advancement#getRootfor getting the root advancement.GameVersionreceived several methods, previously defined in JavaBridge.TimeArgumentType#timewithminimumparameter for setting the minimum value.Codecs#stringfor a codec of length-validated string.LogoDrawerfor drawing the Minceraft (or Minecraft) logo.
PlayerPositionLookS2CPacket.Flagis now a separate class namedPositionFlag.Packetis moved tonet.minecraft.network.packet.BlockPosArgumentType#getBlockPosis renamed togetValidBlockPos.
- JavaBridge is removed from dependencies.
PacketListener#getConnectionis removed.ResourceType#getPackVersionis replaced withGameVersion#getPackVersion.World#hasHighHumidityis removed.Entity#canUsePortalsnow checks for vehicles.TestContext#useOnBlocknow invokesItem#useOnBlockifBlock#usefails.