legoatoom / ConnectibleChains

Connect your fences with a decorative chain!
GNU Lesser General Public License v3.0
14 stars 6 forks source link

Mod compat #18

Closed Qendolin closed 2 years ago

Qendolin commented 2 years ago
Qendolin commented 2 years ago

Test World.zip

Qendolin commented 2 years ago

I still need to do one last test, which is creating a dummy mod and adding ConnectibleChains compatibility to it

Qendolin commented 2 years ago

It works! Ready for review.

java/net/fabricmc/example/ExampleMod.java

if(FabricLoader.getInstance().isModLoaded("connectiblechains")) {
  ChainTypesRegistry.register(Items.DIRT);
}

resources/assets/minecraft/models/entity/chain/dirt.json

{
  "textures": {
    "chain": "minecraft:textures/block/dirt",
    "knot": "minecraft:textures/block/dirt"
  }
}

image

Qendolin commented 2 years ago

There might be an issue with resource priority where f.e. valley craft cannot override the default copper_chain model because it has a lesser priority. I haven't encountered this issue in my testing but I don't see why it cannot happen. I'll have to do some changes to how builtin types are loaded.

Arathain commented 2 years ago

Using structure blocks to move chains has weird side effects - seemingly only chains which share the same X axis are stored properly. Screenshots attached below. 2022-02-23_12 07 03 2022-02-23_12 07 16

Arathain commented 2 years ago

removing this line of code seems to fix things

Qendolin commented 2 years ago

That is very interesting, since I already had that exact same issue and fixed it. But now it's back. Removing that line only works when no mirror is applied.

Qendolin commented 2 years ago

image I've tested all possible combinations of mirroring and rotation, this should work now.

Qendolin commented 2 years ago

"No longer use log4j as there are now other ones that fabric wants you to use.". Do you mean slf4j? I'm not sure if that is available before 1.18.2

legoatoom commented 2 years ago

"No longer use log4j as there are now other ones that fabric wants you to use.". Do you mean slf4j? I'm not sure if that is available before 1.18.2

Does this mean that the current code does not work in 1.18.2? Or can I publish this new version?