ValkyrienSkies / Eureka

Basically Archimedes Ships, but with VS2 as the backend
Apache License 2.0
53 stars 31 forks source link

carryon compatibilty #209

Open Rubydesic opened 1 year ago

Rubydesic commented 1 year ago

carryon disable pickup ship helm

millennIumAMbiguity commented 1 year ago

Should be as simple as doing the following in EurekaModForge. But did not work for me. Forge has a useful example where they show how to use InterModComms but it looks to me like carryon does not catch the messages even tho they say it should work like this here. Looks like they handle the event in ModBusEvents.java.

  1. Import net.minecraftforge.fml.InterModComms and net.minecraftforge.fml.event.lifecycle.InterModEnqueueEvent.
  2. In EurekaModForge() add MOD_BUS.addListener(this::enqueueIMC);
  3. Add the following method:

    private void enqueueIMC(final InterModEnqueueEvent event)
    {
    // Carry on mod support
    var exclusions = new String[] {
            "vs_eureka:oak_ship_helm",
            "vs_eureka:spruce_ship_helm",
            "vs_eureka:birch_ship_helm",
            "vs_eureka:jungle_ship_helm",
            "vs_eureka:acacia_ship_helm",
            "vs_eureka:dark_oak_ship_helm",
            "vs_eureka:crimson_ship_helm",
            "vs_eureka:warped_ship_helm"
    };
    
    for (String item: exclusions) {
        InterModComms.sendTo("carryon", "blacklistBlock", () -> item);
    }
    }

Edit: looks like this would work on 1.17. but no longer works because carry on is using the wrong event. Their fabric version is new and only supports 1.19+ Found a way to add Forge MC 1.19 support (#217) by calling the IMC.sendMessage in init.

Zhincore commented 1 year ago

I believe carryOn checks forge:immovable tag or similar