Posted September 11, 201510 yr Hi, I've build my mod many times and have never had this error before. After running gradlew build, my mod crashes the game on startup. There is no problem in my eclipse workspace, and the class the game crashed on is in fact in the correct path in the jar. Full crash report: ---- Minecraft Crash Report ---- // I just don't know what went wrong Time: 9/11/15 4:44 PM Description: There was a severe problem during mod loading that has caused the game to fail cpw.mods.fml.common.LoaderException: java.lang.NoClassDefFoundError: net/divinerpg/entities/vanilla/EntityJackOMan at cpw.mods.fml.common.LoadController.transition(LoadController.java:163) at cpw.mods.fml.common.Loader.preinitializeMods(Loader.java:559) at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:243) at net.minecraft.client.Minecraft.func_71384_a(Minecraft.java:480) at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:878) at net.minecraft.client.main.Main.main(SourceFile:148) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) Caused by: java.lang.NoClassDefFoundError: net/divinerpg/entities/vanilla/EntityJackOMan at net.divinerpg.utils.entities.VanillaEntityRegistry.init(VanillaEntityRegistry.java:114) at net.divinerpg.utils.proxies.CommonProxy.preInitServer(CommonProxy.java:141) at net.divinerpg.DivineRPG.preInit(DivineRPG.java:46) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:532) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) at com.google.common.eventbus.EventBus.post(EventBus.java:275) at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:212) at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:190) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) at com.google.common.eventbus.EventBus.post(EventBus.java:275) at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:119) at cpw.mods.fml.common.Loader.preinitializeMods(Loader.java:556) ... 10 more Caused by: java.lang.ClassNotFoundException: net.divinerpg.entities.vanilla.EntityJackOMan at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:191) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ... 40 more Caused by: java.lang.NoClassDefFoundError: net/divinerpg/entities/base/EntityDivineRPGVillager at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:760) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:182) ... 42 more Caused by: java.lang.ClassNotFoundException: net.divinerpg.entities.base.EntityDivineRPGVillager at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:101) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ... 46 more A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- System Details -- Details: Minecraft Version: 1.7.10 Operating System: Mac OS X (x86_64) version 10.10.5 Java Version: 1.8.0_51, Oracle Corporation Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 102598568 bytes (97 MB) / 307130368 bytes (292 MB) up to 8576565248 bytes (8179 MB) JVM Flags: 5 total; -Xmx8G -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:-UseAdaptiveSizePolicy -Xmn128M AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0 FML: MCP v9.05 FML v7.10.99.99 Minecraft Forge 10.13.4.1448 Optifine OptiFine_1.7.10_HD_C1 6 mods loaded, 6 mods active States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored UCH mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) UCH FML{7.10.99.99} [Forge Mod Loader] (forge-1.7.10-10.13.4.1448-1.7.10.jar) UCH Forge{10.13.4.1448} [Minecraft Forge] (forge-1.7.10-10.13.4.1448-1.7.10.jar) UCE divinerpg{1.4.1-Pre} [DivineRPG] ([1.7.10][sMP]DivineRPG-1.4.1.jar) UCH DamageIndicatorsMod{3.2.0} [Damage Indicators] ([1.7.10]DamageIndicatorsMod-3.2.0.jar) UCH BetterFoliage{1.0.13} [better Foliage] (BetterFoliage-mc1.7-1.0.13.jar) GL info: ' Vendor: 'NVIDIA Corporation' Version: '2.1 NVIDIA-10.5.2 346.02.03f01' Renderer: 'NVIDIA GeForce GTX 960 OpenGL Engine' Check out my mod, Realms of Chaos, here. If I helped you, be sure to press the "Thank You" button!
September 12, 201510 yr Author Yep, and already tried doing that several times. So, I fixed the crash by removing my overridden verifySellingItem in EntityDivineRPGVillager. No idea why that'd made it crash. EntityDivineRPGVillager in case it's relevant: public abstract class EntityDivineRPGVillager extends EntityVillager { private int randomTickDivider; private Village villageObj; private String lastBuyingPlayer; private EntityPlayer buyingPlayer; private MerchantRecipeList buyingList; private int timeUntilReset; private boolean needsInitilization; private int wealth; private String buyersName; private float buying; public EntityDivineRPGVillager(World var1) { super(var1); this.setSize(1.0F, 2.0F); this.randomTickDivider = 0; this.villageObj = null; this.getNavigator().setBreakDoors(true); this.getNavigator().setAvoidsWater(true); this.tasks.addTask(1, new EntityAIAvoidEntity(this, EntityZombie.class, 8.0F, 0.3F, 0.35F)); this.tasks.addTask(1, new EntityAITradePlayer(this)); this.tasks.addTask(1, new EntityAILookAtTradePlayer(this)); this.tasks.addTask(2, new EntityAIMoveIndoors(this)); this.tasks.addTask(3, new EntityAIRestrictOpenDoor(this)); this.tasks.addTask(4, new EntityAIOpenDoor(this, true)); this.tasks.addTask(5, new EntityAIWatchClosest2(this, EntityPlayer.class, 3.0F, 1.0F)); this.tasks.addTask(5, new EntityAIWander(this, EntityStats.modVillagerSpeed)); setProfession(1234); } @Override protected void applyEntityAttributes() { super.applyEntityAttributes(); this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(net.divinerpg.entities.base.EntityStats.modVillagerHealth); this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(net.divinerpg.entities.base.EntityStats.modVillagerSpeed); this.getEntityAttribute(SharedMonsterAttributes.followRange).setBaseValue(net.divinerpg.entities.base.EntityStats.modVillagerFollowRange); } @Override public boolean isAIEnabled() { return true; } @Override protected boolean canDespawn() { return false; } @Override protected String getLivingSound() { return null; } @Override protected String getDeathSound() { return null; } @Override protected String getHurtSound() { return null; } @Override public void setProfession(int i) { super.setProfession(12345); } @Override protected void updateAITick() { if (this.randomTickDivider-- <= 0) { this.randomTickDivider = 70 + this.rand.nextInt(50); this.villageObj = this.worldObj.villageCollectionObj.findNearestVillage(MathHelper.floor_double(this.posX), MathHelper.floor_double(this.posY), MathHelper.floor_double(this.posZ), 32); if (this.villageObj == null) { this.detachHome(); } else { this.villageObj.setDefaultPlayerReputation(30); } } if (this.timeUntilReset > 0) { if (this.timeUntilReset <= 0) { if (this.buyingList.size() > 1) { Iterator iterator = this.buyingList.iterator(); if (needsInitilization) { while (iterator.hasNext()) { MerchantRecipe merchantrecipe = (MerchantRecipe) iterator.next(); if (merchantrecipe.isRecipeDisabled()) { merchantrecipe.func_82783_a(this.rand.nextInt(6) + this.rand.nextInt(6) + 2); } } } this.addDefaultEquipmentAndRecipies(75); this.needsInitilization = false; if (this.villageObj != null && this.lastBuyingPlayer != null) { this.villageObj.setReputationForPlayer(this.lastBuyingPlayer, 30); } } this.addPotionEffect(new PotionEffect(Potion.regeneration.id, 200, 0)); } } super.updateAITick(); } @Override public boolean interact(EntityPlayer var1) { if (!this.worldObj.isRemote) { extraInteract(var1); var1.openGui(DivineRPG.instance, guiID(), this.worldObj, getEntityId(), 0, 0); return true; } else { return super.interact(var1); } } public abstract void extraInteract(EntityPlayer p); public abstract int guiID(); public abstract void addRecipies(MerchantRecipeList list); @Override public void writeEntityToNBT(NBTTagCompound var1) { super.writeEntityToNBT(var1); var1.setInteger("Profession", 1234); var1.setInteger("Riches", this.wealth); if (this.buyingList != null) { var1.setTag("Offers", this.buyingList.getRecipiesAsTags()); } } @Override public void readEntityFromNBT(NBTTagCompound var1) { super.readEntityFromNBT(var1); this.setProfession(1234); this.wealth = var1.getInteger("Riches"); if (var1.hasKey("Offers")) { NBTTagCompound var2 = var1.getCompoundTag("Offers"); if (this instanceof EntityTheHunger || this instanceof EntityWorkshopTinkerer || this instanceof EntityWorkshopMerchant) this.buyingList = new InfiniteTradeList(var2); else this.buyingList = new MerchantRecipeList(var2); } } @Override public void useRecipe(MerchantRecipe var1) { var1.incrementToolUses(); if (var1.hasSameIDsAs((MerchantRecipe) this.buyingList.get(this.buyingList.size() - 1))) { this.timeUntilReset = 40; this.needsInitilization = true; if (this.buyingPlayer != null) { this.buyersName = this.buyingPlayer.getCommandSenderName(); } else { this.buyersName = null; } } if (var1.getItemToBuy().getItem() == Items.emerald) { this.wealth += var1.getItemToBuy().stackSize; } } public void func_110297_a_(ItemStack par1ItemStack) {} @Override public MerchantRecipeList getRecipes(EntityPlayer var1) { if (this.buyingList == null) { this.addDefaultEquipmentAndRecipies(75); } return this.buyingList; } //@Override //public void verifySellingItem(ItemStack stack) {} private void addDefaultEquipmentAndRecipies(int par1) { if (this.buyingList != null) { this.buying = MathHelper.sqrt_float(this.buyingList.size()) * 0.2F; } else { this.buying = 0.0F; } MerchantRecipeList rec = new MerchantRecipeList(); addRecipies(rec); if (this.buyingList == null) { this.buyingList = new MerchantRecipeList(); } for (int var3 = 0; var3 < par1 && var3 < rec.size(); ++var3) { this.buyingList.add((MerchantRecipe) rec.get(var3)); } } public abstract String mobName(); } Check out my mod, Realms of Chaos, here. If I helped you, be sure to press the "Thank You" button!
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.