CreativeMD / CreativeCore

Required by AmbientSounds, ItemPhysic, LittleTiles, ...
GNU Lesser General Public License v3.0
56 stars 35 forks source link

Backport to 1.18.2 (needs a new branch) #206

Closed SrRapero720 closed 3 months ago

SrRapero720 commented 4 months ago

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 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 image image

SrRapero720 commented 3 months ago

fixed conflicts (backported new changes)

CreativeMD commented 3 months ago

Shouldn't the target be 1.18?