-
Posts
3 -
Joined
-
Last visited
LoneWoIf's Achievements
Tree Puncher (2/8)
0
Reputation
-
That is totally right and I was totally being dumb
-
I am fucking dumb, thank you ?
-
/** * Annotate a class which will be subscribed to an Event Bus at mod construction time. * Defaults to subscribing the current modid to the {@link MinecraftForge#EVENT_BUS} * on both sides. * * @see Bus */ @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.TYPE) @interface EventBusSubscriber { /** * Annotation to subscribe a method to an {@link Event} * * This annotation can only be applied to single parameter methods, where the single parameter is a subclass of * {@link Event}. * * Use {@link IEventBus#register(Object)} to submit either an Object instance or a {@link Class} to the event bus * for scanning to generate callback {@link IEventListener} wrappers. * * The Event Bus system generates an ASM wrapper that dispatches to the marked method. */ @Retention(value = RUNTIME) @Target(value = METHOD) public @interface SubscribeEvent Sorry, but I still don't see your point. My method is a single parameter method with a subclass of Event. And I use IEventBus#register to submit my Item instance... TurtyWurtys video tutorial. I just was getting myself upgraded from 1.7 to 1.15
-
LoneWoIf joined the community
-
I really don't know what I am doing wrong here. Probably some simple and stupid mistake. I followed along with a small tutorial on how to create Forge Items but somehow my ObjectHolder doesn't seem to work. It just keeps sending this message: [Render thread/DEBUG] [ne.mi.re.ObjectHolderRef/]: Unable to lookup mymod:example_item for public static net.minecraft.item.Item se.lonewolf.mymod.common.items.ItemInit.example_item. This means the object wasn't registered. It's likely just mod options. My ItemInit class: @Mod.EventBusSubscriber(modid = MyMod.MOD_ID, bus = Mod.EventBusSubscriber.Bus.MOD) @ObjectHolder(MyMod.MOD_ID) public class ItemInit { public static final Item example_item = null; @SubscribeEvent public void registerItems(final RegistryEvent.Register<Item> event) { event.getRegistry().register(new Item(new Item.Properties().group(ItemGroup.MATERIALS)).setRegistryName("example_item")); } } Can anyone spot what I was doing wrong here?