Jump to content

Recommended Posts

Posted

Hey, I'm having problems with my mod that simply adds a few items with crafting recipes and has vanilla mobs drop them.

 

My crash report is as follows:

 

  Reveal hidden contents

 

 

This happens whenever I try to play in a Single Player world, but not on a Server.

 

If I could have some help on how to solve this, that would be great as the crash report doesn't list any of my classes or processes as creating the problem. Maybe I'm missing a class that handles this stuff?

 

EDIT: I'm aware the problem occurs when the game tries to save the world chunks, but I have no idea how to resolve it.

Posted
  On 3/11/2014 at 2:35 PM, stijnhero said:

Something in your code is null I think can I see some source?

 

HaggisMain.java

 

  Reveal hidden contents

 

 

CustomDrops.java

 

  Reveal hidden contents

 

Posted

Looks normal too me only that you should register the food in the preinit.

 

Do your proxy's have any code?

or is there anything else that could create an error.

I'm always happy to help others!

 

Java is not my main programming language but I have alot experience in PHP/HTML/JS/CSS3/C#/SQL

Posted

Can you provide the full log? (ForgeModLoader-client-0.log / ForgeModLoader-server-0.log)

Don't ask for support per PM! They'll get ignored! | If a post helped you, click the "Thank You" button at the top right corner of said post! |

mah twitter

  Quote

This thread makes me sad because people just post copy-paste-ready code when it's obvious that the OP has little to no programming experience. This is not how learning works.

Posted
  On 3/11/2014 at 2:55 PM, stijnhero said:

Looks normal too me only that you should register the food in the preinit.

 

Do your proxy's have any code?

or is there anything else that could create an error.

 

The food is registered in the PreInit and the proxies are the same as they've always been:

CommonProxy.java

 

  Reveal hidden contents

 

 

ClientProxy.java

 

  Reveal hidden contents

 

 

The only thing I can think of is the fact that my custom drops don't work even though I've now added this line to the PreInit in my main class:

MinecraftForge.EVENT_BUS.register(new CustomDrops());

Posted

you need to put @SubscribeEvent above this line: public void onEntityDrop(LivingDropsEvent event)

I'm always happy to help others!

 

Java is not my main programming language but I have alot experience in PHP/HTML/JS/CSS3/C#/SQL

Posted
  On 3/11/2014 at 3:47 PM, stijnhero said:

you need to put @SubscribeEvent above this line: public void onEntityDrop(LivingDropsEvent event)

 

Thanks, that fixed the problem of the mob drops, but I still have the crashes.

Posted

Sorry that I can't provide a solution but I can provide a quick tip: move the registration of your crafting recipes from the preInit-method to the init-method. It's nothing severe but more common to register advance stuff (things that require items or such already registered) in the init method.

Posted
  On 3/11/2014 at 6:25 PM, WorldsEnder said:

Sorry that I can't provide a solution but I can provide a quick tip: move the registration of your crafting recipes from the preInit-method to the init-method. It's nothing severe but more common to register advance stuff (things that require items or such already registered) in the init method.

 

Do you mean in:

@EventHandler // used in 1.6.2
//@Init       // used in 1.5.2
public void load(FMLInitializationEvent event) {
        proxy.registerRenderers();
}

 

I was registering my stuff in there at first but it didn't actually work until I moved it to PreInit

Posted

I just don't advice registering all your items in your main class file this is how I do it:

@EventHandler
public void preInit(FMLPreInitializationEvent event){
	BlocksItems.InitItems();
	BlocksItems.InitBlocks();
	BlocksItems.WorldGen();
	Config.InitRecipes();
	Config.registerMolecules();
	Config.registerSamples();
	Config.registerMineralProps();
	Config.registerTileEntity();
        proxy.registerRenderers();
}

 

and then in my blockitems file(sorry it's a mess i need to clean it up more)

public class BlocksItems {
//items
public static Item Emptyjar;
public static Item Sample;
public static Item Mineral;

//blocks
public static Block OrePlutonium;
public static Block Evaporite;
public static Block BlockSlowHeatConductant;
public static Block BlockMediumHeatConductant;
public static Block BlockFastHeatConductant;
//	public static Block ResearchTableIdle;
//	public static Block ResearchTableActive;

public static void WorldGen(){
	GameRegistry.registerWorldGenerator(new WorldGen(), 1);

}

public static void InitItems(){
	Emptyjar = new ItemEmptyjar().setUnlocalizedName("Emptyjar").setCreativeTab(MolecularScience.MItems);
        Sample = new ItemSample().setUnlocalizedName("sample");
        Mineral = new ItemMineral().setUnlocalizedName("Mineral");
        
        GameRegistry.registerItem(Emptyjar,"Emptyjar");
        GameRegistry.registerItem(Sample,"Sample");
        GameRegistry.registerItem(Mineral,"Mineral");
}

public static void InitBlocks(){
        OrePlutonium = new BlockOre(Material.rock, 2).setHardness(3.0F).setBlockName("Plutoniumore");
        Evaporite = new BlockEvaporite(Material.rock).setHardness(3.0F).setBlockName("Evaporite");
        BlockSlowHeatConductant = new BlockHeatConductant(Material.rock, 50).setHardness(3.0F).setBlockName("BlockSlowHeatConductant");
        BlockMediumHeatConductant = new BlockHeatConductant(Material.rock, 25).setHardness(3.0F).setBlockName("BlockMediumHeatConductant");
        BlockFastHeatConductant = new BlockHeatConductant(Material.rock, 5).setHardness(3.0F).setBlockName("BlockFastHeatConductant");
//        ResearchTableIdle = new ResearchTable(false).setBlockName("ResearchTableIdle").setCreativeTab(MolecularScience.Blocks);
//        ResearchTableActive = new ResearchTable(true).setBlockName("ResearchTableActive");
        
        GameRegistry.registerBlock(OrePlutonium, "Plutoniumore");
        GameRegistry.registerBlock(Evaporite, "Evaporite");
        GameRegistry.registerBlock(BlockSlowHeatConductant, "BlockSlowHeatConductant");
        GameRegistry.registerBlock(BlockMediumHeatConductant, "BlockMediumHeatConductant");
        GameRegistry.registerBlock(BlockFastHeatConductant, "BlockFastHeatConductant");
//        GameRegistry.registerBlock(ResearchTableIdle, "ResearchTableIdle");
//        GameRegistry.registerBlock(ResearchTableActive, "ResearchTableActive");
}
}

 

I'm always happy to help others!

 

Java is not my main programming language but I have alot experience in PHP/HTML/JS/CSS3/C#/SQL

Posted
  On 3/11/2014 at 8:35 PM, stijnhero said:

I just don't advice registering all your items in your main class file this is how I do it:

@EventHandler
public void preInit(FMLPreInitializationEvent event){
	BlocksItems.InitItems();
	BlocksItems.InitBlocks();
	BlocksItems.WorldGen();
	Config.InitRecipes();
	Config.registerMolecules();
	Config.registerSamples();
	Config.registerMineralProps();
	Config.registerTileEntity();
        proxy.registerRenderers();
}

 

and then in my blockitems file(sorry it's a mess i need to clean it up more)

public class BlocksItems {
//items
public static Item Emptyjar;
public static Item Sample;
public static Item Mineral;

//blocks
public static Block OrePlutonium;
public static Block Evaporite;
public static Block BlockSlowHeatConductant;
public static Block BlockMediumHeatConductant;
public static Block BlockFastHeatConductant;
//	public static Block ResearchTableIdle;
//	public static Block ResearchTableActive;

public static void WorldGen(){
	GameRegistry.registerWorldGenerator(new WorldGen(), 1);

}

public static void InitItems(){
	Emptyjar = new ItemEmptyjar().setUnlocalizedName("Emptyjar").setCreativeTab(MolecularScience.MItems);
        Sample = new ItemSample().setUnlocalizedName("sample");
        Mineral = new ItemMineral().setUnlocalizedName("Mineral");
        
        GameRegistry.registerItem(Emptyjar,"Emptyjar");
        GameRegistry.registerItem(Sample,"Sample");
        GameRegistry.registerItem(Mineral,"Mineral");
}

public static void InitBlocks(){
        OrePlutonium = new BlockOre(Material.rock, 2).setHardness(3.0F).setBlockName("Plutoniumore");
        Evaporite = new BlockEvaporite(Material.rock).setHardness(3.0F).setBlockName("Evaporite");
        BlockSlowHeatConductant = new BlockHeatConductant(Material.rock, 50).setHardness(3.0F).setBlockName("BlockSlowHeatConductant");
        BlockMediumHeatConductant = new BlockHeatConductant(Material.rock, 25).setHardness(3.0F).setBlockName("BlockMediumHeatConductant");
        BlockFastHeatConductant = new BlockHeatConductant(Material.rock, 5).setHardness(3.0F).setBlockName("BlockFastHeatConductant");
//        ResearchTableIdle = new ResearchTable(false).setBlockName("ResearchTableIdle").setCreativeTab(MolecularScience.Blocks);
//        ResearchTableActive = new ResearchTable(true).setBlockName("ResearchTableActive");
        
        GameRegistry.registerBlock(OrePlutonium, "Plutoniumore");
        GameRegistry.registerBlock(Evaporite, "Evaporite");
        GameRegistry.registerBlock(BlockSlowHeatConductant, "BlockSlowHeatConductant");
        GameRegistry.registerBlock(BlockMediumHeatConductant, "BlockMediumHeatConductant");
        GameRegistry.registerBlock(BlockFastHeatConductant, "BlockFastHeatConductant");
//        GameRegistry.registerBlock(ResearchTableIdle, "ResearchTableIdle");
//        GameRegistry.registerBlock(ResearchTableActive, "ResearchTableActive");
}
}

 

You mean set up and register my items in a class and then just call it in the PreInit method?

 

I originally did something like that but decided just to do it in less classes. Was that a bad decision? xD

Posted
  On 3/11/2014 at 9:34 PM, stijnhero said:

No but why would you want that?

 

It bothers me that I can almost spawn in items on a normal bukkit server but nobody can see them and if i try to click or take them out of the inventory GUI they disappear. It just doesn't seem neat or practical. I also don't know many servers that will want to use it as a server mod.

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...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • I checked the hash like you said and it came back as OK each time, also may I ask what you mean by debug mode during installation?  
    • My name is Clara Bennett, and I almost let cryptocurrency destroy me.  Two years ago, after selling my green e-commerce startup, I plunged headfirst into the crypto world. yield farming , I was all in. I believed I wasn’t just investing; I was participating in the next great technological revolution. Within months, my portfolio skyrocketed to $200,000. I even started sketching ideas for a blockchain-based microloan platform to empower small entrepreneurs around the world. Crypto felt like pure freedom and limitless potential. I thought I was untouchable. I thought wrong. It happened through a single email. It looked like a standard security update from my wallet provider polished, routine, and harmless. I interacted with it briefly, thinking it was legitimate. Hours later, I checked my account and realized my entire wallet had been drained. Every token, every coin, gone. I sat there in disbelief, replaying the moment over and over. I had built my career on being cautious with technology, yet somehow, I had still been compromised. The blockchain’s promise of "irreversible transactions" now felt like a cruel joke  .Devastated and desperate, I scoured forums for solutions. Most people told me there was no hope once crypto is gone, it’s gone. Still, I refused to give up. That’s when I stumbled across FUNDS RETRIEVER ENGINEER . I decided to reach out. From the beginning, they were empathetic, and honest about the challenges. They explained their process step-by-step, focusing on tracing transactions, tracking down phishing operators, and leveraging advanced blockchain analytics. It wasn't an overnight fix. It took weeks of meticulous investigation, technical recovery work, and legal coordination .But in the end, their persistence paid off. FUNDS RETRIEVER ENGINEER  was able to trace the stolen funds across multiple wallets and exchanges. Through a combination of technical expertise and strategic action, they managed to recover the full amount I had lost. Today, my crypto portfolio is intact once again. More importantly, I’ve regained my confidence though I am now much wiser and far more cautious. I learned the hard way that while crypto offers incredible opportunities, it also demands extreme vigilance. Thanks to FUNDS RETRIEVER ENGINEER , I recovered my lost funds and  also reclaimed my future in the digital economy. For help  W H A T S A P P:  +1  8  0 2 9 5 2 3 4 7 0 E   m  a I L       F U N D S R  E T R  I E V E R  [@]  E  N  G  I  N  E  E  R.  C  O  M
    • 1. Did you try to remove your system cache or something? 2. Also check jar hash before installing (if it's ok): sha1sum jar_name.jar > jar_name.jar.sha1 sha1sum -c jar_name.jar.sha1 Do this a few times with some interval. This can find out if your hash can be different somehow (garbage files inside).  Also try using sha224sum / sha256sum / sha384sum / sha512sum / shasum. And do you have any debug mode during installation?   UPDATED: and it can be just fixing by chmod'ing jar file. Check its -lZ 
    • I get these errors when trying to install any version (this ones for 47.3.33 for instance):  Processor failed, invalid outputs:     /home/user/.local/share/FreesmLauncher/instances/1.20.1/minecraft/libraries/net/minecraft/server/1.20.1-20230612.114412/server-1.20.1-20230612.114412-slim.jar       Expected: 9e06bdd77ca6d95b2cced0bf372245f753eeb16a       Actual:   f1e5a0cc3c9f7c58f26524a43c5badc06ca0bac4     /home/user/.local/share/FreesmLauncher/instances/1.20.1/minecraft/libraries/net/minecraft/server/1.20.1-20230612.114412/server-1.20.1-20230612.114412-extra.jar       Expected: 13522e3278befd103064d91a199451df4cd2633f       Actual:   eb1dafb7bee2ace5d55d90b65e73c2196b1991f3 I've tried sklauncher and freesm launcher and they throw the same error, tried installing it with the official forge installer too but same error. Also tried different versions of java: 17, 21, 24. Forge for previous versions install fine, I'm on Linux CachyOS.  
  • Topics

×
×
  • Create New...

Important Information

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