Jump to content

Recommended Posts

Posted

Hey guys,

Well first and for most I get this error on my custom food item

[iNFO] [ForgeModLoader] Configured a dormant chunk cache size of 0

 

the code highlighted for the error is:

		RawLambChop = new RawLambChopFood(5006, 3, 4.0F, true).setUnlocalizedName("Raw Lamb Chop");

 

Here is my whole main class:

package assassinhero.parallelworlds;

import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.item.EnumToolMaterial;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraftforge.common.EnumHelper;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.event.entity.living.LivingDropsEvent;
import assassinhero.parallelworlds.client.ClientPacketHandler;
import assassinhero.parallelworlds.common.CommonProxy;
import assassinhero.parallelworlds.common.ServerPacketHandler;
import assassinhero.parallelworlds.common.blocks.BlockArcticiteBlock;
import assassinhero.parallelworlds.common.blocks.BlockAscariteBlock;
import assassinhero.parallelworlds.common.blocks.BlockHelliteBlock;
import assassinhero.parallelworlds.common.blocks.BlockNightOre;
import assassinhero.parallelworlds.common.blocks.BlockNightiumBlock;
import assassinhero.parallelworlds.common.blocks.BlockSapphireBlock;
import assassinhero.parallelworlds.common.blocks.BlockTimeOre;
import assassinhero.parallelworlds.common.blocks.BlockTiminiumBlock;
import assassinhero.parallelworlds.common.items.CookedLambChopFood;
import assassinhero.parallelworlds.common.items.ItemHellShardItem;
import assassinhero.parallelworlds.common.items.ItemHellSoulsItem;
import assassinhero.parallelworlds.common.items.ItemIceGemItem;
import assassinhero.parallelworlds.common.items.ItemNightGemItem;
import assassinhero.parallelworlds.common.items.ItemPureSoulsItem;
import assassinhero.parallelworlds.common.items.ItemPurityGemItem;
import assassinhero.parallelworlds.common.items.ItemSapphireItem;
import assassinhero.parallelworlds.common.items.ItemTimeGemItem;
import assassinhero.parallelworlds.common.items.ItemTimeShardItem;
import assassinhero.parallelworlds.common.items.RawLambChopFood;
import assassinhero.parallelworlds.common.items.TimeAxe;
import assassinhero.parallelworlds.common.items.TimeBlade;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.Init;
import cpw.mods.fml.common.Mod.Instance;
import cpw.mods.fml.common.SidedProxy;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.network.NetworkMod;
import cpw.mods.fml.common.network.NetworkMod.SidedPacketHandler;
import cpw.mods.fml.common.network.NetworkRegistry;
import cpw.mods.fml.common.registry.GameRegistry;

@NetworkMod(clientSideRequired=true,serverSideRequired=false, 
clientPacketHandlerSpec = @SidedPacketHandler(channels = {"ParallelWorlds" }, packetHandler = ClientPacketHandler.class),
serverPacketHandlerSpec = @SidedPacketHandler(channels = {"ParallelWorlds"}, packetHandler = ServerPacketHandler.class)) 
@Mod(modid="AssassinHero_ParallelWorlds",name="ParallelWorlds",version="1.0") 
public class ParallelWorldsMain { 

@Instance("ParallelWorlds") 
public static ParallelWorldsMain instance = new ParallelWorldsMain();

@SidedProxy(clientSide = "assassinhero.parallelworlds.client.ClientProxy", serverSide = "assassinhero.parallelworlds.common.CommonProxy") 
public static CommonProxy proxy;

public static Block NightOre;
public static Block Nightium;
public static Item NightGem;
public static Block TimeOre;
public static Block Timinium;
public static Item TimeGem;
public static Block Arcticite;
public static Block Hellite;
public static Item HellShard;
public static Block Ascarite;
public static Item HellSoul;
public static Item PureSoul;
public static Item PurityGem;
public static Block SapphireBlock;
public static Item RawLambChop;
public static Item TimePickaxe;
public static Item Sapphire;
public static Item IceGem;
public static Item TimeBlade;
public static Item TimeShard;
public static Item CookedLambChop;
public static Item TimeShovel;
public static Item TimeAxe;

@cpw.mods.fml.common.Mod.PreInit
public void PreInit(FMLPreInitializationEvent event){
	Nightium = new BlockNightiumBlock(3000, Material.iron).setUnlocalizedName("Nightium");
	NightOre = new BlockNightOre(3001, Material.rock).setUnlocalizedName("Night Ore");
	TimeOre = new BlockTimeOre(3003, Material.rock).setUnlocalizedName("Time Ore");
	Timinium = new BlockTiminiumBlock(3004, Material.iron).setUnlocalizedName("Timinium");
	Arcticite = new BlockArcticiteBlock(3005, Material.iron).setUnlocalizedName("Arcticite");
	Hellite = new BlockHelliteBlock(3006, Material.iron).setUnlocalizedName("Hellite");
	Ascarite = new BlockAscariteBlock(3007, Material.iron).setUnlocalizedName("Ascarite");
	SapphireBlock = new BlockSapphireBlock(3008, Material.iron).setUnlocalizedName("Sapphire Block");
	NightGem = new ItemNightGemItem(5000).setUnlocalizedName("Night Gem");
	TimeGem = new ItemTimeGemItem(5001).setUnlocalizedName("Time Gem");
	HellShard = new ItemHellShardItem(5002).setUnlocalizedName("Hell Shard");
	HellSoul = new ItemHellSoulsItem(5003).setUnlocalizedName("Hell Soul");
	PureSoul = new ItemPureSoulsItem(5004).setUnlocalizedName("Pure Soul");
	PurityGem = new ItemPurityGemItem(5005).setUnlocalizedName("Purity Gem");
	RawLambChop = new RawLambChopFood(5006, 3, 4.0F, true).setUnlocalizedName("Raw Lamb Chop");
	Sapphire = new ItemSapphireItem(5007).setUnlocalizedName("Sapphire");
	IceGem = new ItemIceGemItem(5008).setUnlocalizedName("IceGem");
	TimeShard = new ItemTimeShardItem(5009).setUnlocalizedName("Time Shard");
	CookedLambChop = new CookedLambChopFood(5010, 8, 8.0F, true).setUnlocalizedName("Cooked Lamb Chop");
	TimeBlade = new TimeBlade(15000, EnumToolMaterial.TIME).setUnlocalizedName("Time Blade");
	TimePickaxe = new assassinhero.parallelworlds.common.items.TimePickaxe(15001, EnumToolMaterial.TIME).setUnlocalizedName("Time Pickaxe");
	TimeShovel = new assassinhero.parallelworlds.common.items.TimeShovel(15002, EnumToolMaterial.TIME).setUnlocalizedName("Time Shovel");
	TimeAxe = new TimeAxe(15003, EnumToolMaterial.TIME).setUnlocalizedName("TimeAxe");
}


@Init
public void Init(FMLInitializationEvent event){ 
	proxy.registerBlocks();
	proxy.registerItems();
	NetworkRegistry.instance().registerGuiHandler(this, proxy);
	craftingRecipes();
	smeltingRecipes();
	BlockHarvestLevel();
	MinecraftForge();
	EnumToolMaterial();


}

public void craftingRecipes(){
	GameRegistry.addRecipe(new ItemStack(ParallelWorldsMain.Nightium, 1), "XX", "XX", Character.valueOf('X'), ParallelWorldsMain.NightGem);
	GameRegistry.addRecipe(new ItemStack(ParallelWorldsMain.Timinium, 1), "XX", "XX", Character.valueOf('X'), ParallelWorldsMain.TimeGem);
	GameRegistry.addRecipe(new ItemStack(ParallelWorldsMain.Arcticite, 1), "XX", "XX", Character.valueOf('X'), Block.blockSnow);
	GameRegistry.addRecipe(new ItemStack(ParallelWorldsMain.Hellite, 1), "XX", "XX", Character.valueOf('X'), ParallelWorldsMain.HellShard);
	GameRegistry.addRecipe(new ItemStack(ParallelWorldsMain.SapphireBlock, 1), "XXX", "XXX", "XXX", Character.valueOf('X'), ParallelWorldsMain.Sapphire);
	GameRegistry.addRecipe(new ItemStack(ParallelWorldsMain.Ascarite, 1), "XXX", "XXX", "XXX", Character.valueOf('X'), ParallelWorldsMain.PureSoul);
	GameRegistry.addRecipe(new ItemStack(ParallelWorldsMain.TimePickaxe, 1), "XXX", " A ", " A ", Character.valueOf('X'), ParallelWorldsMain.TimeGem, Character.valueOf('A'), Item.stick);
	GameRegistry.addRecipe(new ItemStack(ParallelWorldsMain.TimeGem, 1), "XXX", "XXX", "XXX", Character.valueOf('X'), ParallelWorldsMain.TimeShard);
	GameRegistry.addRecipe(new ItemStack(ParallelWorldsMain.TimeShovel, 1), " X ", " A ", " A ", Character.valueOf('X'), ParallelWorldsMain.TimeGem, Character.valueOf('A'), Item.stick);
	GameRegistry.addRecipe(new ItemStack(ParallelWorldsMain.TimeAxe, 1), "XX ", "XA ", " A ", Character.valueOf('X'), ParallelWorldsMain.TimeGem, Character.valueOf('A'), Item.stick);
	GameRegistry.addShapelessRecipe(new ItemStack(ParallelWorldsMain.PureSoul, 1), new Object[]{ParallelWorldsMain.HellSoul, ParallelWorldsMain.PurityGem});



}

public void smeltingRecipes(){
	GameRegistry.addSmelting(NightOre.blockID, new ItemStack(NightGem, 1), 0.5F);
	GameRegistry.addSmelting(TimeOre.blockID, new ItemStack(TimeShard, 1), 0.5F);

}

public void BlockHarvestLevel(){
	MinecraftForge.setBlockHarvestLevel(Nightium, "pickaxe", 2);
	MinecraftForge.setBlockHarvestLevel(NightOre, "pickaxe", 2);
	MinecraftForge.setBlockHarvestLevel(TimeOre, "pickaxe", 2);
	MinecraftForge.setBlockHarvestLevel(Timinium, "pickaxe", 2);
	MinecraftForge.setBlockHarvestLevel(Arcticite, "pickaxe", 2);
	MinecraftForge.setBlockHarvestLevel(Hellite, "pickaxe", 2);
	MinecraftForge.setBlockHarvestLevel(Ascarite, "pickaxe", 2);
	MinecraftForge.setBlockHarvestLevel(SapphireBlock, "pickaxe", 2);


}

public void MinecraftForge(){
	MinecraftForge.EVENT_BUS.register(new LivingDropsEvent(null, null, null, 0, false, 0));
}

public void EnumToolMaterial(){
	EnumToolMaterial toolTime = EnumHelper.addToolMaterial("Time", 2, 2000, 10.0F, 8, 15);
}


}

 

 

I know the MinecraftFoege.EVENT_BUS is not correct I am working on fixing that...

 

Any solutions?

STOP CRUCIFYING NEW MODDERS!!!!

Posted

That error is unrelated to your mod.

 

This might help (all hail the power of googling your error:

http://www.minecraftforum.net/topic/1641920-minecraft-freezes-in-eclipse-forgemodloader/

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted

Hey guys,

Well first and for most I get this error on my custom food item

[iNFO] [ForgeModLoader] Configured a dormant chunk cache size of 0

 

the code highlighted for the error is:

		RawLambChop = new RawLambChopFood(5006, 3, 4.0F, true).setUnlocalizedName("Raw Lamb Chop");

....

 

What's the error? Code for the RawLambChopFood class?

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

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

Hey guys,

Well first and for most I get this error on my custom food item

[iNFO] [ForgeModLoader] Configured a dormant chunk cache size of 0

 

the code highlighted for the error is:

		RawLambChop = new RawLambChopFood(5006, 3, 4.0F, true).setUnlocalizedName("Raw Lamb Chop");

....

 

What's the error? Code for the RawLambChopFood class?

 

package assassinhero.parallelworlds.common.items;

import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.ItemFood;

public class RawLambChopFood extends ItemFood{

public RawLambChopFood(int par1, int par2, float par3, boolean par4) {
	super(par1, par2, par3, par4);
	setCreativeTab(CreativeTabs.tabFood);
}

public void updateIcons(IconRegister par1iconregister){
	this.itemIcon = par1iconregister.registerIcon("ParallelWorlds:RawLambChop");
}


}

 

Thats the code for the raw lamb chop class

 

i dont get an error all i get is what i have provided

STOP CRUCIFYING NEW MODDERS!!!!

Posted

I am not sure, but my food works fine all i do is

 

// My food
public static Item BlueberryMuffin; 

@Init
public void load(FMLInitializationEvent ev)
{	
//Notice that i used new ItemFood not ItemBlueBerryMuffin or whatever, i don't have a class for such because it's simply not needed.

BlueberryMuffin = 		(new ItemFood(1150,3,4F,false).setUnlocalizedName("Blueberry_muffin"));
				ModLoader.addName(BlueberryMuffin,"Blueberry Muffin");
// Recipe :
GameRegistry.addRecipe(new ItemStack(this.BlueberryMuffin, 2), new Object[]
				    				{
				    		"WWW", "YBY", "SEM",  'W', Item.wheat , 'Y', this.BlueberryBushel, 'B', Item.bowlEmpty , 'S', Item.sugar , 'E', Item.egg , 'M', Item.bucketMilk		//Crafting Line  
				    				});
}	

 

I hope it helped

Posted

To make your imports easier to overview you could just import all of your items at once:

import assassinhero.parallelworlds.common.items.*;

PM's regarding modding questions should belong in the Modder Support sub-forum and won't be answered.

Posted

Bump, Still getting this error....

What error? You never posted any error log.

 

There is no error log,

[iNFO] [ForgeModLoader] Configured a dormant chunk cache size of 0

 

That's all I get.

STOP CRUCIFYING NEW MODDERS!!!!

Posted

I can't tell you why it's crashing if you do not post the goddamn crash report (= stacktrace).

 

How many times do i have to say this?

 

There is NO crash report.

 

That is the only thing I ever get -.-

STOP CRUCIFYING NEW MODDERS!!!!

Posted

If there is no crash report its not crashing.

Edit: and that "thing" is normal. Just like the minecraft version message.

 

But the thing is it actually crashes but doesnt have a message D: It's so confusing

STOP CRUCIFYING NEW MODDERS!!!!

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

    • that happens every time I enter a new dimension.
    • This is the last line before the crash: [ebwizardry]: Synchronising spell emitters for PixelTraveler But I have no idea what this means
    • What in particular? I barely used that mod this time around, and it's never been a problem in the past.
    • Im trying to build my mod using shade since i use the luaj library however i keep getting this error Reason: Task ':reobfJar' uses this output of task ':shadowJar' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. So i try adding reobfJar.dependsOn shadowJar  Could not get unknown property 'reobfJar' for object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler. my gradle file plugins { id 'eclipse' id 'idea' id 'maven-publish' id 'net.minecraftforge.gradle' version '[6.0,6.2)' id 'com.github.johnrengelman.shadow' version '7.1.2' id 'org.spongepowered.mixin' version '0.7.+' } apply plugin: 'net.minecraftforge.gradle' apply plugin: 'org.spongepowered.mixin' apply plugin: 'com.github.johnrengelman.shadow' version = mod_version group = mod_group_id base { archivesName = mod_id } // Mojang ships Java 17 to end users in 1.18+, so your mod should target Java 17. java.toolchain.languageVersion = JavaLanguageVersion.of(17) //jarJar.enable() println "Java: ${System.getProperty 'java.version'}, JVM: ${System.getProperty 'java.vm.version'} (${System.getProperty 'java.vendor'}), Arch: ${System.getProperty 'os.arch'}" minecraft { mappings channel: mapping_channel, version: mapping_version copyIdeResources = true runs { configureEach { workingDirectory project.file('run') property 'forge.logging.markers', 'REGISTRIES' property 'forge.logging.console.level', 'debug' arg "-mixin.config=derp.mixin.json" mods { "${mod_id}" { source sourceSets.main } } } client { // Comma-separated list of namespaces to load gametests from. Empty = all namespaces. property 'forge.enabledGameTestNamespaces', mod_id } server { property 'forge.enabledGameTestNamespaces', mod_id args '--nogui' } gameTestServer { property 'forge.enabledGameTestNamespaces', mod_id } data { workingDirectory project.file('run-data') args '--mod', mod_id, '--all', '--output', file('src/generated/resources/'), '--existing', file('src/main/resources/') } } } sourceSets.main.resources { srcDir 'src/generated/resources' } repositories { flatDir { dirs './libs' } maven { url = "https://jitpack.io" } } configurations { shade implementation.extendsFrom shade } dependencies { minecraft "net.minecraftforge:forge:${minecraft_version}-${forge_version}" implementation 'org.luaj:luaj-jse-3.0.2' implementation fg.deobf("com.github.Virtuoel:Pehkui:${pehkui_version}") annotationProcessor 'org.spongepowered:mixin:0.8.5:processor' minecraftLibrary 'luaj:luaj-jse:3.0.2' shade 'luaj:luaj-jse:3.0.2' } // Example for how to get properties into the manifest for reading at runtime. tasks.named('jar', Jar).configure { manifest { attributes([ 'Specification-Title' : mod_id, 'Specification-Vendor' : mod_authors, 'Specification-Version' : '1', // We are version 1 of ourselves 'Implementation-Title' : project.name, 'Implementation-Version' : project.jar.archiveVersion, 'Implementation-Vendor' : mod_authors, 'Implementation-Timestamp': new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"), "TweakClass" : "org.spongepowered.asm.launch.MixinTweaker", "TweakOrder" : 0, "MixinConfigs" : "derp.mixin.json" ]) } rename 'mixin.refmap.json', 'derp.mixin-refmap.json' } shadowJar { archiveClassifier = '' configurations = [project.configurations.shade] finalizedBy 'reobfShadowJar' } assemble.dependsOn shadowJar reobf { re shadowJar {} } publishing { publications { mavenJava(MavenPublication) { artifact jar } } repositories { maven { url "file://${project.projectDir}/mcmodsrepo" } } } my entire project:https://github.com/kevin051606/DERP-Mod/tree/Derp-1.0-1.20
  • Topics

×
×
  • Create New...

Important Information

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