Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

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 by Eiachh

  • Author

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 ? 

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

About Me

Spoiler

My Discord - Cadiboo#8887

My WebsiteCadiboo.github.io

My ModsCadiboo.github.io/projects

My TutorialsCadiboo.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)

You probably want a static event subscriber in a different class, then registration is handles the same way as @Mod

About Me

Spoiler

My Discord - Cadiboo#8887

My WebsiteCadiboo.github.io

My ModsCadiboo.github.io/projects

My TutorialsCadiboo.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)

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.