Eiachh Posted December 24, 2018 Posted December 24, 2018 (edited) Hi! First of all if I am just simply stupid sorry but I just can't get the LootTableLoadEven. I got to the point that I just copied a tutorial line and it still misses it please help or link something to read about it package com.eiachh.mainmod; import org.apache.logging.log4j.Logger; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.world.storage.loot.LootTableList; import com.eiachh.mainmod.proxy.IProxy; import com.eiachh.mainmod.recipes.My_Recipes; import com.eiachh.mainmod.tabs.NewTab; import net.minecraftforge.event.LootTableLoadEvent; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.Mod.EventHandler; import net.minecraftforge.fml.common.SidedProxy; import net.minecraftforge.fml.common.event.FMLInitializationEvent; import net.minecraftforge.fml.common.event.FMLPostInitializationEvent; import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; @Mod(modid = MainModpls.MODID, name = MainModpls.NAME, version = MainModpls.VERSION, acceptedMinecraftVersions = MainModpls.MC_VERSION) public class MainModpls { public static final String MODID = "cutsiemod"; public static final String NAME = "Cutsiemod yaas"; public static final String VERSION = "1.0"; public static final String MC_VERSION = "[1.12.2]"; public static final String CLIENT = "com.eiachh.mainmod.proxy.ClientProxy"; public static final String SERVER = "com.eiachh.mainmod.proxy.ServerProxy"; public static final CreativeTabs TUTORIAL_TAB = new NewTab("mainTab"); String asd ="LULULULLULULULULULULULLULULULULLULULULULULULU"; @SidedProxy(clientSide = MainModpls.CLIENT, serverSide=MainModpls.SERVER) public static IProxy proxy; public static Logger logger; @SubscribeEvent public void onLootTablesLoaded(LootTableLoadEvent event) { System.out.println("GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG"); this.asd="kecske"; if (event.getName().equals(LootTableList.CHESTS_SIMPLE_DUNGEON)) { } } @EventHandler public void preInit(FMLPreInitializationEvent event) { logger = event.getModLog(); proxy.preInit(event); //this.asd="RTRTRTRTRTRTTTRT"; } @EventHandler public void init(FMLInitializationEvent event) { logger.info(MainModpls.NAME + "says hi!"); proxy.init(event); My_Recipes.initSmelting(); } @EventHandler public void postInit(FMLPostInitializationEvent event) { proxy.postInit(event); logger.info(asd); } } It just comletly ignoring the fact that I am trying to catch it. I also tried to put the @subscribe... to a different class but i don't have a better bet than before Init() Edited December 24, 2018 by Eiachh Quote
Eiachh Posted December 24, 2018 Author Posted December 24, 2018 Nvm I just figured out that you have to actually register the @subcribe annotation so it works. But then why don't you have to register the @EventHandler ? Quote
Cadiboo Posted December 25, 2018 Posted December 25, 2018 3 hours ago, Eiachh said: But then why don't you have to register the @EventHandler ? You do, that’s what the @Mod annotation does Quote About Me Spoiler My Discord - Cadiboo#8887 My Website - Cadiboo.github.io My Mods - Cadiboo.github.io/projects My Tutorials - Cadiboo.github.io/tutorials Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support. When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible. Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)
Cadiboo Posted December 25, 2018 Posted December 25, 2018 You probably want a static event subscriber in a different class, then registration is handles the same way as @Mod 1 Quote About Me Spoiler My Discord - Cadiboo#8887 My Website - Cadiboo.github.io My Mods - Cadiboo.github.io/projects My Tutorials - Cadiboo.github.io/tutorials Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support. When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible. Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)
Recommended Posts
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.