i just cloned 1.20.1 branch and start moving all to 1.18.2.
i need to do the exact same for 1.19.2 (which is more easy to port because it have the majority of the good and dumb refactors of Forge are properly done)
OVERALL OF CHANGES
Changed all GuiGraphics usages to PoseStack + Minecraft.getInstance() usages
Removed mixins related to forge light pipeline (because classes are missing)
reverted rewrite of components (new components impl is REALLY broken and depends on Component Contents and DataSources... old one works for much better for 1.18.2
removed checks for BundlePacket (because it doesn't exists on 1.18.2)
JOML vs mojang math
some cases are easy to backport just using mojang math clases, other can't because classes doesn't exists. I have many solutions but i choose to adapt code of CC into impl.
for example src/main/java/team/creative/creativecore/common/util/math/box/OBB.java
i change JOML Vec2d to the CC Vector2d, it doesn't use any special method and are just a simple container for 2 numbers so isn't necesary to shade anything
same situation happened on
src/main/java/team/creative/creativecore/common/util/type/set/QuadBitSet.java, which i made a "backpored" class just to make it work. Again, no special usages of JOML classes so its fine.
EXTRAS
i change GuiRenderHelper.colorRect() and GuiRenderHelper.drawTexRect() to use Tesselator#end() instead of BufferUploader.end(). In 1.18.2 for some reason causes crahes by IndexOutOfBounds
i just cloned 1.20.1 branch and start moving all to 1.18.2.
i need to do the exact same for 1.19.2 (which is more easy to port because it have the majority of the good and dumb refactors of Forge are properly done)
OVERALL OF CHANGES
JOML vs mojang math
some cases are easy to backport just using mojang math clases, other can't because classes doesn't exists. I have many solutions but i choose to adapt code of CC into impl.
for example
src/main/java/team/creative/creativecore/common/util/math/box/OBB.java
i change JOML Vec2d to the CC Vector2d, it doesn't use any special method and are just a simple container for 2 numbers so isn't necesary to shade anythingsame situation happened on
src/main/java/team/creative/creativecore/common/util/type/set/QuadBitSet.java
, which i made a "backpored" class just to make it work. Again, no special usages of JOML classes so its fine.EXTRAS
i change
GuiRenderHelper.colorRect()
andGuiRenderHelper.drawTexRect()
to useTesselator#end()
instead ofBufferUploader.end()
. In 1.18.2 for some reason causes crahes by IndexOutOfBounds