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

Ello,

I have been updating a mod of mine recently, and it's almost done, however when I recompile the mod, reobufscate it and try to run in in minecraft, it fails with the following error:

2012-10-28 22:19:17 [iNFO] [sTDERR] Exception in thread "Minecraft main thread" java.lang.NoClassDefFoundError: moDrinks/common/BlockPlant
2012-10-28 22:19:17 [iNFO] [sTDERR]     at java.lang.Class.forName0(Native Method)
2012-10-28 22:19:17 [iNFO] [sTDERR]     at java.lang.Class.forName(Unknown Source)
2012-10-28 22:19:17 [iNFO] [sTDERR]     at cpw.mods.fml.common.FMLModContainer.constructMod(FMLModContainer.java:341)
2012-10-28 22:19:17 [iNFO] [sTDERR]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2012-10-28 22:19:17 [iNFO] [sTDERR]     at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
2012-10-28 22:19:17 [iNFO] [sTDERR]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
2012-10-28 22:19:17 [iNFO] [sTDERR]     at java.lang.reflect.Method.invoke(Unknown Source)
2012-10-28 22:19:17 [iNFO] [sTDERR]     at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:69)
2012-10-28 22:19:17 [iNFO] [sTDERR]     at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
2012-10-28 22:19:17 [iNFO] [sTDERR]     at com.google.common.eventbus.EventBus.dispatch(EventBus.java:317)
2012-10-28 22:19:17 [iNFO] [sTDERR]     at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:300)
2012-10-28 22:19:17 [iNFO] [sTDERR]     at com.google.common.eventbus.EventBus.post(EventBus.java:268)
2012-10-28 22:19:17 [iNFO] [sTDERR]     at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:124)
2012-10-28 22:19:17 [iNFO] [sTDERR]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2012-10-28 22:19:17 [iNFO] [sTDERR]     at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
2012-10-28 22:19:17 [iNFO] [sTDERR]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
2012-10-28 22:19:17 [iNFO] [sTDERR]     at java.lang.reflect.Method.invoke(Unknown Source)
2012-10-28 22:19:17 [iNFO] [sTDERR]     at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:69)
2012-10-28 22:19:17 [iNFO] [sTDERR]     at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
2012-10-28 22:19:17 [iNFO] [sTDERR]     at com.google.common.eventbus.EventBus.dispatch(EventBus.java:317)
2012-10-28 22:19:17 [iNFO] [sTDERR]     at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:300)
2012-10-28 22:19:17 [iNFO] [sTDERR]     at com.google.common.eventbus.EventBus.post(EventBus.java:268)
2012-10-28 22:19:17 [iNFO] [sTDERR]     at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:81)
2012-10-28 22:19:17 [iNFO] [sTDERR]     at cpw.mods.fml.common.Loader.loadMods(Loader.java:458)
2012-10-28 22:19:17 [iNFO] [sTDERR]     at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:144)
2012-10-28 22:19:17 [iNFO] [sTDERR]     at net.minecraft.client.Minecraft.a(Minecraft.java:405)
2012-10-28 22:19:17 [iNFO] [sTDERR]     at net.minecraft.client.Minecraft.run(Minecraft.java:737)
2012-10-28 22:19:17 [iNFO] [sTDERR]     at java.lang.Thread.run(Unknown Source)
2012-10-28 22:19:17 [iNFO] [sTDERR] Caused by: java.lang.ClassNotFoundException: moDrinks.common.BlockPlant
2012-10-28 22:19:17 [iNFO] [sTDERR]     at cpw.mods.fml.relauncher.RelaunchClassLoader.findClass(RelaunchClassLoader.java:125)
2012-10-28 22:19:17 [iNFO] [sTDERR]     at java.lang.ClassLoader.loadClass(Unknown Source)
2012-10-28 22:19:17 [iNFO] [sTDERR]     at java.lang.ClassLoader.loadClass(Unknown Source)
2012-10-28 22:19:17 [iNFO] [sTDERR]     ... 28 more
2012-10-28 22:19:17 [iNFO] [sTDERR] Caused by: java.lang.NoClassDefFoundError: net/minecraftforge/common/IPlantable
2012-10-28 22:19:17 [iNFO] [sTDERR]     at java.lang.ClassLoader.defineClass1(Native Method)
2012-10-28 22:19:17 [iNFO] [sTDERR]     at java.lang.ClassLoader.defineClass(Unknown Source)
2012-10-28 22:19:17 [iNFO] [sTDERR]     at java.lang.ClassLoader.defineClass(Unknown Source)
2012-10-28 22:19:17 [iNFO] [sTDERR]     at cpw.mods.fml.relauncher.RelaunchClassLoader.findClass(RelaunchClassLoader.java:119)
2012-10-28 22:19:17 [iNFO] [sTDERR]     ... 30 more
2012-10-28 22:19:17 [iNFO] [sTDERR] Caused by: java.lang.ClassNotFoundException: net.minecraftforge.common.IPlantable
2012-10-28 22:19:17 [iNFO] [sTDERR]     at cpw.mods.fml.relauncher.RelaunchClassLoader.findClass(RelaunchClassLoader.java:125)
2012-10-28 22:19:17 [iNFO] [sTDERR]     at java.lang.ClassLoader.loadClass(Unknown Source)
2012-10-28 22:19:17 [iNFO] [sTDERR]     at java.lang.ClassLoader.loadClass(Unknown Source)
2012-10-28 22:19:17 [iNFO] [sTDERR]     ... 34 more
2012-10-28 22:19:17 [iNFO] [sTDERR] Caused by: java.lang.NullPointerException
2012-10-28 22:19:17 [iNFO] [sTDERR]     at org.objectweb.asm.ClassReader.<init>(Unknown Source)
2012-10-28 22:19:17 [iNFO] [sTDERR]     at cpw.mods.fml.common.asm.transformers.SideTransformer.transform(SideTransformer.java:27)
2012-10-28 22:19:17 [iNFO] [sTDERR]     at cpw.mods.fml.relauncher.RelaunchClassLoader.runTransformers(RelaunchClassLoader.java:167)
2012-10-28 22:19:17 [iNFO] [sTDERR]     at cpw.mods.fml.relauncher.RelaunchClassLoader.findClass(RelaunchClassLoader.java:118)
2012-10-28 22:19:17 [iNFO] [sTDERR]     ... 36 more

 

Here is my Code for the BlockPlant file:

package moDrinks.common;

import java.util.Random;

import net.minecraft.src.Block;
import net.minecraft.src.BlockFlower;
import net.minecraft.src.CreativeTabs;
import net.minecraft.src.Material;
import net.minecraft.src.World;
import net.minecraftforge.common.IPlantable;

public class BlockPlant extends BlockFlower implements IPlantable
{	
//Main
protected BlockPlant(int par1, int par2, Material par3Material)
{
	super(par1 + 256, par2, par3Material);
	this.blockIndexInTexture = par2;
	this.setTickRandomly(true);
	float var4 = 0.4F;
        this.setBlockBounds(0.5F - var4, 0.0F, 0.5F - var4, 0.5F + var4, var4 * 2.5F, 0.5F + var4);
	this.setCreativeTab(CreativeTabs.tabDecorations);
}	
protected BlockPlant(int par1, int par2)
{
	this(par1, par2, Material.plants);
}

//Can be on
protected boolean canThisPlantGrowOnThisBlockID(int par1)
{
	return par1 == Block.grass.blockID || par1 == Block.dirt.blockID;
}
        public String getTextureFile()
        {
	return "/Eastonium/MoDrinksBlocks.png";
}
}

 

Please let me know if you can help!

You didn't reobfuscate properly.

 

In eclipse, copy all your package files into the 'Minecraft' project (into either the common folder or the src folder),

and THEN run recompile and reobfuscated. Your working mod will be outputted into rebof/minecraft

Protip: try and find answers yourself before asking on the forum.

It's pretty likely that there is an answer.

 

Was I helpful? Give me a thank you!

 

 

width=635 height=903http://bit.ly/HZ03zy[/img]

 

 

Tired of waiting for mods to port to bukkit?

use BukkitForge! (now with a working version of WorldEdit!)

  • Author

Could you please explain better? I tried to do what you said and i just resulted in me having to re-create MCP.

Guest
This topic is now closed to further replies.

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.