Posted February 27, 20196 yr So i've just started modding minecraft as i'm more use to sponge so i'm trying to piece things together...can someone explain why @Mod("asuramagica") public class Main { public static Main instance; public static String modid = "asuramagica"; private static final Logger logger = LogManager.getLogger(modid); public Main() { instance = this; FMLJavaModLoadingContext.get().getModEventBus().addListener(this::arrowNocked); FMLJavaModLoadingContext.get().getModEventBus().addListener(this::setup); FMLJavaModLoadingContext.get().getModEventBus().addListener(this::clientRegistries); MinecraftForge.EVENT_BUS.register(this); } public void arrowNocked(PlayerEvent.PlayerLoggedInEvent event) { System.out.println("Testing"); } private static void init(final FMLServerAboutToStartEvent event){ } private void setup(final FMLCommonSetupEvent event){ logger.info("Setup method registered."); } private void clientRegistries(final FMLClientSetupEvent event){ logger.info("clientRegistries method registered."); } } is not pushing out Testing to the console....when a Player joins the server? i've tried both this way and @Mod("asuramagica") public class Main { public static Main instance; public static String modid = "asuramagica"; private static final Logger logger = LogManager.getLogger(modid); public Main() { instance = this; FMLJavaModLoadingContext.get().getModEventBus().addListener(this::setup); FMLJavaModLoadingContext.get().getModEventBus().addListener(this::clientRegistries); MinecraftForge.EVENT_BUS.register(this); } @SubscribedEvent public static void arrowNocked(PlayerEvent.PlayerLoggedInEvent event) { System.out.println("Testing"); } private static void init(final FMLServerAboutToStartEvent event){ } private void setup(final FMLCommonSetupEvent event){ logger.info("Setup method registered."); } private void clientRegistries(final FMLClientSetupEvent event){ logger.info("clientRegistries method registered."); } }
February 27, 20196 yr Author Thanks that solved it. I'm still trying to figure out the whole server side client side portion....but i understood that i just simply needed to add a @SubscribedEvent to make 'Thanks' appear.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.