- World age on 1.21.11: World.getTime() was a shortcut for getLevelProperties().getTime(), which every version has, so getWorldAge uses that everywhere (the TPS feature and day counter got 0 on 1.21.11). - Screen resize on 1.21.11: override resize(int, int), the new signature. - Splash loading-bar border on 1.21.9+: drawBorder was renamed drawStrokedRectangle. - Drag deltas on 1.21.9+: mouseDragged(Click, offsetX, offsetY) gets the deltas as offsetX/offsetY; Saturn's screens got 0.0 before. - Role icon in player names on 1.21.4-1.21.7: only storing the player in the render state needs Fabric API's render state data (1.21.8+). The updateRenderState hook now runs on every version and only the setData call is limited to 1.21.8+. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
+1
-1
@@ -36,7 +36,7 @@ import net.minecraft.client.render.RenderSetup;
|
||||
|
||||
Stonecutter rewrites inactive code into its own layout when switching versions (a single inactive line becomes `//code`), so write it that way to begin with, or run a switch and a reset before committing.
|
||||
|
||||
When a newer version leaves something out that an older one implements, keep the older version's code behind a condition and mark the newer branch with a `TODO`, rather than dropping it for every version. `WorldFeatureImpl.getWorldAge` and `SaturnScreenFabric.resize` are examples. Search for `TODO` to find what newer versions still lack.
|
||||
When a newer version leaves something out that an older one implements, keep the older version's code behind a condition and mark the newer branch with a `TODO`, rather than dropping it for every version. `NametagsMixin` and the panorama in `SaturnScreenFabric.render` are examples. Search for `TODO` to find what newer versions still lack (tracked in #30), and remove the condition once a version gap is fixed.
|
||||
|
||||
A whole class that only exists for some versions (such as `NametagsMixin`, which hooks a method that 1.21.9 changed) can keep an empty class body on the other versions. An empty mixin changes nothing, and it keeps the mixin configs the same for every version, since JSON can't hold version comments.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user