-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Labels
bugSomething isn't workingSomething isn't working
Description
The DeferredRegister is never registered to the modBus, with no compiler errors or warnings.
Here's the item class and its compiled output:
@CompileStatic
final class CoinItems {
@Registroid
public static final DeferredRegister<Item> ITEMS = DeferredRegister.create(ForgeRegistries.ITEMS, NinjasCash.MOD_ID)
static final Item ONE_PENCE = NinjasCash.newBasicItem()
}public final class CoinItems implements GroovyObject {
public static final DeferredRegister<Item> ITEMS;
@Generated
private static final RegistryObject<Item> $registryObjectForONE_PENCE;
static {
DeferredRegister var0 = DeferredRegister.create(ForgeRegistries.ITEMS, NinjasCash.MOD_ID);
ITEMS = var0;
RegistryObject var1 = ITEMS.register("one_pence", () -> {
return NinjasCash.newBasicItem();
});
$registryObjectForONE_PENCE = var1;
}
@Generated
private static Item getONE_PENCE() {
return (Item)$registryObjectForONE_PENCE.get();
}
}And here's the main mod entrypoint class:
@CompileStatic
@GMod(NinjasCash.MOD_ID)
final class NinjasCash {
@PackageScope static final String MOD_ID = 'ninjascash'
NinjasCash() {}
@PackageScope static Item newBasicItem() {
return new Item(new Item.Properties())
}
}@GMod("ninjascash")
public final class NinjasCash implements GroovyObject {
static final String MOD_ID = "ninjascash";
private final GModEventBus modBus;
private final IEventBus forgeBus;
public NinjasCash() {
GModEventBus var1 = GMLModLoadingContext.get().getModEventBus();
this.modBus = var1;
IEventBus var2 = MinecraftForge.EVENT_BUS;
this.forgeBus = var2;
}
static Item newBasicItem() {
return new Item(new Item.Properties());
}
@Generated
public GModEventBus getModBus() {
return this.modBus;
}
@Generated
public IEventBus getForgeBus() {
return this.forgeBus;
}
}Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working