Jade ๐Ÿ”

Jade ๐Ÿ”

93M Downloads

WailaPlugin methods not called at runtime

DaanSchar opened this issue ยท 2 comments

commented

Mod loader

Fabric

Minecraft version

1.19.2

Mod version

4328558

Modloader version

0.73.0+1.19.2

Modpack info

No response

If bug:

  • Can you reproduce this issue with relevant mods only?

If bug: The latest.log file

No response

Issue description

The jade tooltip for AbstractFurnace is not being affected in-game by my wailaplugin.

Gradle

repositories {
    maven {
		    url "https://www.cursemaven.com"
		    content {
			    includeGroup "curse.maven"
		    }
	    }
}
dependencies {
	modImplementation "curse.maven:jade-324717:${jade_id}"
}

Example Plugin class

package net.fabricmc.example.jade;

@WailaPlugin(ExampleMod.MOD_ID)
public class ExamplePlugin implements IWailaPlugin {

    @Override
    public void register(IWailaCommonRegistration registration) {
        IWailaPlugin.super.register(registration);
    }

    @Override
    public void registerClient(IWailaClientRegistration registration) {
        registration.registerBlockComponent(ExampleComponentProvider.INSTANCE, AbstractFurnaceBlock.class);
    }
}

My issue starts here. This class is being called. However, the register methods do not get called at any point of booting and running the game.

fabric.mod.json

  "entrypoints": {
    "main": [
      "net.fabricmc.example.ExampleMod"
    ],
    "jade": [
      "snownee.jade.addon.core.CorePlugin",
      "snownee.jade.addon.vanilla.VanillaPlugin",
      "snownee.jade.addon.fabric.FabricPlugin",
      "net.fabricmc.example.jade.ExamplePlugin"
    ]
  },

This is what the entrpoints should look like according to the documentation, however, "snownee.jade.addon.fabric.FabricPlugin" Does not exist. It is also not mentioned in the jade-addon fabric json file. (I used it as a reference)

Example Component Provider

package net.fabricmc.example.jade;

public enum ExampleComponentProvider implements IBlockComponentProvider {
    INSTANCE;

    @Override
    public void appendTooltip(ITooltip tooltip, BlockAccessor accessor, IPluginConfig config) {
        tooltip.add(Text.translatable("tooltip.examplemod.example"));
    }

    @Override
    public Identifier getUid() {
        return new Identifier("examplemod", "example");
    }
}
commented

Console Output

[16:50:18] [Render thread/INFO] (Jade) Start loading plugin from Example Mod
[16:51:07] [Render thread/INFO] (Jade) Start loading plugin from Jade
[16:51:07] [Render thread/INFO] (Jade) Start loading plugin from Jade
[16:51:07] [Render thread/INFO] (Jade) Start loading plugin from Jade
commented

Looks like @WailaPlugin() doesn't like passed through values.
I've managed to fix the issue by replacing @WailaPlugin(ExampleMod.MOD_ID) with @WailaPlugin()