AlmostReliable / morejs

A Minecraft mod to extend KubeJS with additional events.
https://www.curseforge.com/minecraft/mc-mods/morejs
GNU Lesser General Public License v3.0
11 stars 1 forks source link

Unable to remove trades from mod `supplementaries` #12

Open LTCatt opened 4 months ago

LTCatt commented 4 months ago

Minecraft Version

1.20.1

Mod Version

0.9.0

Describe the bug!

I modified wanderer trades using the following code, but the supplementaries injected trades still comes up in morejs 0.9.0.

MoreJSEvents.wandererTrades(event => {
    event.removeVanillaTrades(1);
    event.removeVanillaTrades(2);
    event.removeModdedTrades(1);
    event.removeModdedTrades(2);
    event.addTrade(1, ['3x kubejs:ruby'], '6x minecraft:emerald').maxUses(3);
    event.addTrade(1, ['3x kubejs:amethyst'], '6x kubejs:ruby').maxUses(3);
    event.addTrade(2, ['6x minecraft:emerald'], '2x kubejs:ruby').maxUses(3);
    event.addTrade(2, ['6x kubejs:ruby'], '2x kubejs:amethyst').maxUses(3);
});

image

Crash Report

No response

Log

No response

Additions and Modifications

No

Additions and Modifications Description

No response

Did the issue happen in singleplayer or on a server?

Singleplayer

LLytho commented 4 months ago

Hey, when installing supplementaries, there are no extra trades for me with the wanderer. Do I miss something?

LTCatt commented 4 months ago

I looked into it a bit more. Must execute /reload first, then summon a wandering trader. I don't know why :/

LLytho commented 4 months ago

Interesting, will try it. Probably a load order issue. Need to check how easy I can fix it