Spartan Weaponry

Spartan Weaponry

34M Downloads

DeferredRegister incompatibility

KreloX opened this issue ยท 3 comments

commented

When I use DeferredRegister to register spartan weapons then both .register and .createKatana methods set a registry name and that causes an exception.

public static final Item katanaFiery = SpartanWeaponryAPI.createKatana(FIERY, ItemGroup.TAB_COMBAT);

public static final RegistryObject KATANA_FIERY = ITEMS.register("katana_fiery", () -> katanaFiery);

commented

Yeah, sorry. This was made before DeferredRegister was even a thing.
I plan on adding a boolean flag to the API methods to create the weapons that prevents automatically setting the registry name to prevent this from happening. This should hopefully make it more compatible with DeferredRegister

commented

I've just released a mod and API update which adds compatibility for DeferredRegister. Atm it has a bug which causes a crash (see issue #9). Once that is fixed, it should be safe to use

commented

It works since the update, no need for this being open.