Jump to content

Recommended Posts

Posted

I am getting very irritated because I was happy while modding and I add three new objects and BOOM! It starts crashing on me and saying: 1 device not closed! I deleted everything to do with those objects and it won't stop crashing!

 

Here is the crash report:

---- Minecraft Crash Report ----
// Don't do that.

Time: 3/27/19 7:46 PM
Description: Initializing game

java.lang.StringIndexOutOfBoundsException: String index out of range: 8
    at java.lang.String.charAt(String.java:658)
    at net.minecraft.item.crafting.CraftingManager.addRecipe(CraftingManager.java:266)
    at net.minecraftforge.fml.common.registry.GameRegistry.addShapedRecipe(GameRegistry.java:242)
    at mymod.Main.init(Main.java:461)
    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:498)
    at net.minecraftforge.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:537)
    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:498)
    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 net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:212)
    at net.minecraftforge.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:498)
    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 net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:119)
    at net.minecraftforge.fml.common.Loader.initializeMods(Loader.java:731)
    at net.minecraftforge.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:315)
    at net.minecraft.client.Minecraft.startGame(Minecraft.java:528)
    at net.minecraft.client.Minecraft.run(Minecraft.java:356)
    at net.minecraft.client.main.Main.main(Main.java:117)
    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:498)
    at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
    at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
    at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source)
    at GradleStart.main(Unknown Source)


A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- Head --
Stacktrace:
    at java.lang.String.charAt(String.java:658)
    at net.minecraft.item.crafting.CraftingManager.addRecipe(CraftingManager.java:266)
    at net.minecraftforge.fml.common.registry.GameRegistry.addShapedRecipe(GameRegistry.java:242)
    at mymod.Main.init(Main.java:461)
    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:498)
    at net.minecraftforge.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:537)
    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:498)
    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 net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:212)
    at net.minecraftforge.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:498)
    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 net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:119)
    at net.minecraftforge.fml.common.Loader.initializeMods(Loader.java:731)
    at net.minecraftforge.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:315)
    at net.minecraft.client.Minecraft.startGame(Minecraft.java:528)

-- Initialization --
Details:
Stacktrace:
    at net.minecraft.client.Minecraft.run(Minecraft.java:356)
    at net.minecraft.client.main.Main.main(Main.java:117)
    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:498)
    at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
    at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
    at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source)
    at GradleStart.main(Unknown Source)

-- System Details --
Details:
    Minecraft Version: 1.8
    Operating System: Windows 10 (amd64) version 10.0
    Java Version: 1.8.0_92, Oracle Corporation
    Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
    Memory: 853090392 bytes (813 MB) / 1056309248 bytes (1007 MB) up to 1056309248 bytes (1007 MB)
    JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
    IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
    FML: MCP v9.10 FML v8.0.99.99 Minecraft Forge 11.14.3.1450 4 mods loaded, 4 mods active
    States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored
    UCHI    mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) 
    UCHI    FML{8.0.99.99} [Forge Mod Loader] (forgeSrc-1.8-11.14.3.1450.jar) 
    UCHI    Forge{11.14.3.1450} [Minecraft Forge] (forgeSrc-1.8-11.14.3.1450.jar) 
    UCHE    foundations{1.0} [Hunger Games Mod] (bin) 
    Loaded coremods (and transformers): 
    GL info: ' Vendor: 'ATI Technologies Inc.' Version: '4.5.13399 Compatibility Profile Context 15.201.1151.1008' Renderer: 'AMD Radeon HD 8370D'
    Launched Version: 1.8
    LWJGL: 2.9.1
    OpenGL: AMD Radeon HD 8370D GL version 4.5.13399 Compatibility Profile Context 15.201.1151.1008, ATI Technologies Inc.
    GL Caps: Using GL 1.3 multitexturing.
Using GL 1.3 texture combiners.
Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported.
Shaders are available because OpenGL 2.1 is supported.
VBOs are available because OpenGL 1.5 is supported.

    Using VBOs: No
    Is Modded: Definitely; Client brand changed to 'fml,forge'
    Type: Client (map_client.txt)
    Resource Packs: []
    Current Language: English (US)
    Profiler Position: N/A (disabled)

Posted (edited)

1. "mymod" not a good mod id.

2. We cannot see what is wrong with your code unless you post your code (especially mymod.Main.init(Main.java:461)).

Edited by DavidM

Some tips:

Spoiler

Modder Support:

Spoiler

1. Do not follow tutorials on YouTube, especially TechnoVision (previously called Loremaster) and HarryTalks, due to their promotion of bad practice and usage of outdated code.

2. Always post your code.

3. Never copy and paste code. You won't learn anything from doing that.

4. 

Quote

Programming via Eclipse's hotfixes will get you nowhere

5. Learn to use your IDE, especially the debugger.

6.

Quote

The "picture that's worth 1000 words" only works if there's an obvious problem or a freehand red circle around it.

Support & Bug Reports:

Spoiler

1. Read the EAQ before asking for help. Remember to provide the appropriate log(s).

2. Versions below 1.11 are no longer supported due to their age. Update to a modern version of Minecraft to receive support.

 

 

Posted (edited)
7 hours ago, DavidM said:

1. "mymod" not a good mod id.

2. We cannot see what is wrong with your code unless you post your code (especially mymod.Main.init(Main.java:461)).

Here is the code:

Spoiler

 

package mymod;

import Food.BeefStrip;
import Food.CookedMeat;
import Food.CustomBerry;
import Food.CustomCracker;
import Food.District10Bread;
import Food.District11Bread;
import Food.District12Bread;
import Food.District1Bread;
import Food.District2Bread;
import Food.District3Bread;
import Food.District4Bread;
import Food.District5Bread;
import Food.District6Bread;
import Food.District7Bread;
import Food.District8Bread;
import Food.District9Bread;
import myStuff.Baton;
import myStuff.Bush;
import myStuff.CustomAxe;
import myStuff.CustomBlock;
import myStuff.CustomPin;
import myStuff.DeadlySpear;
import myStuff.IronMace;
import myStuff.Rock;
import mymod.CodakidFiles.BossModelWolf;
import mymod.CodakidFiles.Codakid;
import mymod._01_ChapterOne_ForgeYourSword.CustomMonster;
import mymod._01_ChapterOne_ForgeYourSword.CustomSword;
import mymod._02_ChapterTwo_StrikeTheEarth.CustomPickaxe;
import mymod._03_ChapterThree_PowerArmor.CloveArmor;
import mymod._03_ChapterThree_PowerArmor.CustomArmor;
import mymod._03_ChapterThree_PowerArmor.FoxArmor;
import mymod._03_ChapterThree_PowerArmor.GlimmerArmor;
import mymod._03_ChapterThree_PowerArmor.RueArmor;
import mymod._03_ChapterThree_PowerArmor.TrainingArmor;
import mymod._03_ChapterThree_PowerArmor.TreeArmor;
import mymod._04_ChapterFour_MakeSomeMonsters.CKModelBat;
import mymod._04_ChapterFour_MakeSomeMonsters.CKModelRabbit;
import mymod._04_ChapterFour_MakeSomeMonsters.CKModelWither;
import mymod._04_ChapterFour_MakeSomeMonsters.CustomMob;
import mymod._04_ChapterFour_MakeSomeMonsters.Squirrel;
import mymod._05_ChapterFive_RareLoot.ChanceBlock;
import mymod._07_ChapterSeven_ExplosionsAndSpecialEffects.CustomGrenade;
import mymod._07_ChapterSeven_ExplosionsAndSpecialEffects.EntityGrenade;
import mymod._07_ChapterSeven_ExplosionsAndSpecialEffects.EntityKnife;
import mymod._07_ChapterSeven_ExplosionsAndSpecialEffects.EntityRock;
import mymod._07_ChapterSeven_ExplosionsAndSpecialEffects.EntitySpear;
import mymod._07_ChapterSeven_ExplosionsAndSpecialEffects.Knife;
import mymod._07_ChapterSeven_ExplosionsAndSpecialEffects.Spear;
import mymod._07_ChapterSeven_ExplosionsAndSpecialEffects.ThrowingRock;
import mymod._08_ChapterEight_CustomStructures.StructureBlock;
import mymod._09_ChapterNine_WorldGeneration.CustomWorldGen;
import mymod._10_ChapterTen_EpicWeapons.EntityFireBall;
import mymod._10_ChapterTen_EpicWeapons.EntityLavaTrail;
import mymod._10_ChapterTen_EpicWeapons.FireBall;
import mymod._10_ChapterTen_EpicWeapons.LavaLauncher;
import net.minecraft.block.Block;
import net.minecraft.client.model.ModelBat;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.EnumCreatureType;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.Item.ToolMaterial;
import net.minecraft.item.ItemArmor.ArmorMaterial;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.item.ItemCoal;
import net.minecraft.item.ItemFood;
import net.minecraft.item.ItemStack;
import net.minecraft.potion.Potion;
import net.minecraftforge.common.BiomeManager;
import net.minecraftforge.common.BiomeManager.BiomeEntry;
import net.minecraftforge.common.BiomeManager.BiomeType;
import net.minecraftforge.common.util.EnumHelper;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.Mod.EventHandler;
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.registry.EntityRegistry;
import net.minecraftforge.fml.common.registry.GameRegistry;

@Mod(modid = Main.MODID, name = Main.MODNAME, version = Main.VERSION)
public class Main
{
    public static final String MODNAME = "Hunger Games Mod";
    public static final String MODID = "foundations";
    public static final String VERSION = "1.0";

    //DECLARE VARIABLES
    public static ArmorMaterial myArmorMaterial;
    public static ArmorMaterial trainingArmor;
    public static ArmorMaterial glimmerArmor;
    public static ArmorMaterial cloveArmor;
    public static ArmorMaterial foxArmor;
    public static ArmorMaterial rueArmor;
    public static ArmorMaterial treeArmor;
    public static ArmorMaterial mudArmor;
    public static ToolMaterial batonMaterial;
    public static ToolMaterial myToolMaterial;
    public static ToolMaterial coolSpear;
    public static ArmorMaterial HGArmor;
    public static ToolMaterial deadlyAxe;
    public static ToolMaterial knifeMaterial;
    public static CreativeTabs myTab;
    final CreativeTabs Creative_Tab = new CustomTab();
    public static Item mockingjayPin;
    public static Item nightLock;
    public static Block myBlock;
    public static Item cracker;
    public static Item beefStrip;
    public static Item squirrelMeat;
    public static Item cookedMeat;
    public static Item myLavaLauncher;
    public static Item fireBall;
    public static Item ironMace;
    public static Block bush;
    //Armor
    public static Item myHelmet;
    public static Item myChestplate;
    public static Item myLeggings;
    public static Item myBoots;
    public static Item trainingHat;
    public static Item trainingChest;
    public static Item trainingLeggings;
    public static Item trainingBoots;
    public static Item glimmer1;
    public static Item glimmer2;
    public static Item glimmer3;
    public static Item clove1;
    public static Item clove2;
    public static Item clove3;
    public static Item fox1;
    public static Item fox2;
    public static Item fox3;
    public static Item rue1;
    public static Item rue2;
    public static Item rue3;
    public static Item jo1;
    public static Item jo2;
    public static Item jo3;
    public static Item hg1;
    public static Item hg2;
    public static Item hg3;
    //New Weapons
    public static Item meanAxe;
    public static Item myGrenade;
    public static Item baton;
    public static Item knife;
    public static Block rock;
    public static Item meanRock;
    public static Item spear;
    public static Item throwingRock;
    public static Item district1Bread;
    public static Item district2Bread;
    public static Item district3Bread;
    public static Item district4Bread;
    public static Item district5Bread;
    public static Item district6Bread;
    public static Item district7Bread;
    public static Item district8Bread;
    public static Item district9Bread;
    public static Item district10Bread;
    public static Item district11Bread;
    public static Item district12Bread;

    @EventHandler
    public void preinit(FMLPreInitializationEvent event)
    {

        //INITIALIZE VARIABLES
        myArmorMaterial = EnumHelper.addArmorMaterial("Armor Material", MODID + ":myArmor", 80, new int[]{4, 8, 6, 3}, 40);
        trainingArmor = EnumHelper.addArmorMaterial("Armor Material", MODID + ":trainingArmor", 80, new int[]{4, 8, 6, 3}, 40);
        glimmerArmor = EnumHelper.addArmorMaterial("Armor Material", MODID + ":glimmerArmor", 80, new int[]{4, 8, 6, 3}, 40);
        cloveArmor = EnumHelper.addArmorMaterial("Armor Material", MODID + ":cloveArmor", 80, new int[]{4, 8, 6, 3}, 40);
        rueArmor = EnumHelper.addArmorMaterial("Armor Material", MODID + ":rueArmor", 80, new int[]{4, 8, 6, 3}, 40);
        foxArmor = EnumHelper.addArmorMaterial("Armor Material", MODID + ":foxArmor", 80, new int[]{4, 8, 6, 3}, 40);
        HGArmor = EnumHelper.addArmorMaterial("Armor Material", MODID + ":hGArmor", 80, new int[]{1, 1, 1, 1}, 40);
        treeArmor = EnumHelper.addArmorMaterial("Armor Material", MODID + ":treeArmor", 80, new int[]{4, 8, 6, 3}, 40);
        deadlyAxe = EnumHelper.addToolMaterial("Mean Axe", 0, 3000, 20F, 15F, 50);
        myToolMaterial = EnumHelper.addToolMaterial("Iron Mace", 0, 2000, 10F, 10F, 30);
        coolSpear = EnumHelper.addToolMaterial("Cool Spear", 0, 2000, 10F, 12F, 30);
        batonMaterial = EnumHelper.addToolMaterial("Baton", 0, 2000, 10F, 13F, 30);
        knifeMaterial = EnumHelper.addToolMaterial("Knife", 0, 2000, 10F, 6F, 30);        
        myTab = new CustomTab();
        mockingjayPin = new CustomPin();
        nightLock = new CustomBerry();
        myBlock = new CustomBlock();
        cracker = new CustomCracker();
        beefStrip = new BeefStrip();
        squirrelMeat = new Food.squirrelMeat();
        cookedMeat = new CookedMeat();
        myLavaLauncher = new LavaLauncher();
        fireBall = new FireBall();
        ironMace = new IronMace();
        bush = new Bush();
        //Armor
        myHelmet = new CustomArmor("myHelmet", 1, 0);
        myChestplate = new CustomArmor("myChestplate", 1, 1);
        myLeggings= new CustomArmor("myLeggings", 2, 2);
        myBoots = new CustomArmor("myBoots", 1, 3);
        trainingHat = new TrainingArmor("trainingHat", 1, 0);
        trainingChest = new TrainingArmor("trainingChest", 1, 1);
        trainingLeggings= new TrainingArmor("trainingLeggings", 2, 2);
        trainingBoots = new TrainingArmor("trainingBoots", 1, 3);
        glimmer1 = new GlimmerArmor("glimmer1", 1, 1);
        glimmer2= new GlimmerArmor("glimmer2", 2, 2);
        glimmer3 = new GlimmerArmor("glimmer3", 1, 3);
        clove1 = new CloveArmor("clove1", 1, 1);
        clove2= new CloveArmor("clove2", 2, 2);
        clove3 = new CloveArmor("clove3", 1, 3);
        fox1 = new FoxArmor("fox1", 1, 1);
        fox2= new FoxArmor("fox2", 2, 2);
        fox3 = new FoxArmor("fox3", 1, 3);
        rue1 = new RueArmor("rue1", 1, 1);
        rue2= new RueArmor("rue2", 2, 2);
        rue3 = new RueArmor("rue3", 1, 3);
        jo1 = new TreeArmor("jo1", 1, 1);
        jo2 = new TreeArmor("jo2", 2, 2);
        jo3 = new TreeArmor("jo3", 1, 3);
        hg1 = new mymod._03_ChapterThree_PowerArmor.HGArmor("hg1", 1, 1);
        hg2 = new mymod._03_ChapterThree_PowerArmor.HGArmor("hg2", 2, 2);
        hg3 = new mymod._03_ChapterThree_PowerArmor.HGArmor("hg3", 1, 3);
        rock = new Rock();       
        //New Weapons
        meanAxe = new CustomAxe();
        myGrenade = new CustomGrenade();
        spear = new Spear();
        baton = new Baton();
        knife = new Knife();
        throwingRock = new ThrowingRock();
        district1Bread = new District1Bread();
        district2Bread = new District2Bread();
        district3Bread = new District3Bread();
        district4Bread = new District4Bread();
        district5Bread = new District5Bread();
        district6Bread = new District6Bread();
        district7Bread = new District7Bread();
        district8Bread = new District8Bread();
        district9Bread = new District9Bread();
        district10Bread = new District10Bread();
        district11Bread = new District11Bread();
        district12Bread = new District12Bread();
        
        

        //REGISTER ITEMS AND BLOCKS
        GameRegistry.registerItem(mockingjayPin, "mockingjayPin");
        GameRegistry.registerItem(nightLock, "nightLock");
        GameRegistry.registerBlock(myBlock, "myBlock");
        GameRegistry.registerItem(cracker, "cracker");
        GameRegistry.registerItem(beefStrip, "beefStrip");
        GameRegistry.registerItem(squirrelMeat, "squirrelMeat");
        GameRegistry.registerItem(cookedMeat, "cookedMeat");
        GameRegistry.registerItem(myLavaLauncher, "lavaLauncher");
        GameRegistry.registerItem(fireBall, "fireBall");
        GameRegistry.registerItem(ironMace, "ironMace");
        GameRegistry.registerBlock(bush, "bush");
        //Armor
        GameRegistry.registerItem(myHelmet, "myHelmet");
        GameRegistry.registerItem(myChestplate, "myChestplate");
        GameRegistry.registerItem(myLeggings, "myLeggings");
        GameRegistry.registerItem(myBoots, "myBoots");
        GameRegistry.registerItem(trainingHat, "trainingHat");
        GameRegistry.registerItem(trainingChest, "trainingChest");
        GameRegistry.registerItem(trainingLeggings, "trainingLeggings");
        GameRegistry.registerItem(trainingBoots, "trainingBoots");
        GameRegistry.registerItem(glimmer1, "glimmer1");
        GameRegistry.registerItem(glimmer2, "glimmer2");
        GameRegistry.registerItem(glimmer3, "glimmer3");
        GameRegistry.registerItem(clove1, "clove1");
        GameRegistry.registerItem(clove2, "clove2");
        GameRegistry.registerItem(clove3, "clove3");
        GameRegistry.registerItem(fox1, "fox1");
        GameRegistry.registerItem(fox2, "fox2");
        GameRegistry.registerItem(fox3, "fox3");
        GameRegistry.registerItem(rue1, "rue1");
        GameRegistry.registerItem(rue2, "rue2");
        GameRegistry.registerItem(rue3, "rue3");
        GameRegistry.registerItem(jo1, "jo1");
        GameRegistry.registerItem(jo2, "jo2");
        GameRegistry.registerItem(jo3, "jo3");
        GameRegistry.registerItem(hg1, "hg1");
        GameRegistry.registerItem(hg2, "hg2");
        GameRegistry.registerItem(hg3, "hg3");
        //New Weapons
        GameRegistry.registerItem(meanAxe, "meanAxe");
        GameRegistry.registerItem(myGrenade, "myGrenade");
        GameRegistry.registerItem(spear, "spear");
        GameRegistry.registerItem(baton, "baton");
        GameRegistry.registerItem(knife, "knife");
        GameRegistry.registerBlock(rock, "rock");
        GameRegistry.registerItem(throwingRock, "throwingRock");
        GameRegistry.registerItem(district1Bread, "district1Bread");
        GameRegistry.registerItem(district2Bread, "district2Bread");
        GameRegistry.registerItem(district3Bread, "district3Bread");
        GameRegistry.registerItem(district4Bread, "district4Bread");
        GameRegistry.registerItem(district5Bread, "district5Bread");
        GameRegistry.registerItem(district6Bread, "district6Bread");
        GameRegistry.registerItem(district7Bread, "district7Bread");
        GameRegistry.registerItem(district8Bread, "district8Bread");
        GameRegistry.registerItem(district9Bread, "district9Bread");
        GameRegistry.registerItem(district10Bread, "district10Bread");
        GameRegistry.registerItem(district11Bread, "district11Bread");
        GameRegistry.registerItem(district12Bread, "district12Bread");


    }

    @EventHandler
    public void init(FMLInitializationEvent event)
    {

        //REGISTER TEXTURES
        Codakid.registerItemTexture(mockingjayPin);
        Codakid.registerItemTexture(nightLock);
        Codakid.registerBlockTexture(myBlock);
        Codakid.registerItemTexture(cracker);
        Codakid.registerItemTexture(beefStrip);
        Codakid.registerItemTexture(cookedMeat);
        Codakid.registerItemTexture(squirrelMeat);
        Codakid.makeInvisible(EntityLavaTrail.class);
        Codakid.makeInvisible(EntityFireBall.class);
        Codakid.registerItemTexture(fireBall);
        Codakid.registerItemTexture(myLavaLauncher);
        Codakid.registerItemTexture(ironMace);
        Codakid.registerBlockTexture(bush);
        //Armor
        Codakid.registerItemTexture(myHelmet);
        Codakid.registerItemTexture(myChestplate);
        Codakid.registerItemTexture(myLeggings);
        Codakid.registerItemTexture(myBoots);
        Codakid.registerItemTexture(trainingHat);
        Codakid.registerItemTexture(trainingChest);
        Codakid.registerItemTexture(trainingLeggings);
        Codakid.registerItemTexture(trainingBoots);
        Codakid.registerItemTexture(glimmer1);
        Codakid.registerItemTexture(glimmer2);
        Codakid.registerItemTexture(glimmer3);
        Codakid.registerItemTexture(clove1);
        Codakid.registerItemTexture(clove2);
        Codakid.registerItemTexture(clove3);
        Codakid.registerItemTexture(fox1);
        Codakid.registerItemTexture(fox2);
        Codakid.registerItemTexture(fox3);
        Codakid.registerItemTexture(rue1);
        Codakid.registerItemTexture(rue2);
        Codakid.registerItemTexture(rue3);
        Codakid.registerItemTexture(jo1);
        Codakid.registerItemTexture(jo2);
        Codakid.registerItemTexture(jo3);
        Codakid.registerItemTexture(hg1);
        Codakid.registerItemTexture(hg2);
        Codakid.registerItemTexture(hg3);
        //New Weapons
        Codakid.registerItemTexture(meanAxe);
        Codakid.registerGrenadeTexture(myGrenade, EntityGrenade.class);
        Codakid.registerGrenadeTexture(knife, EntityKnife.class);
        Codakid.registerGrenadeTexture(spear, EntitySpear.class);
        Codakid.registerItemTexture(spear);
        Codakid.registerItemTexture(baton);
        Codakid.registerItemTexture(knife);
        //
        Codakid.registerBlockTexture(rock);
        Codakid.registerGrenadeTexture(throwingRock, EntityRock.class);
        Codakid.registerItemTexture(district1Bread);
        Codakid.registerItemTexture(district2Bread);
        Codakid.registerItemTexture(district3Bread);
        Codakid.registerItemTexture(district4Bread);
        Codakid.registerItemTexture(district5Bread);
        Codakid.registerItemTexture(district6Bread);
        Codakid.registerItemTexture(district7Bread);
        Codakid.registerItemTexture(district8Bread);
        Codakid.registerItemTexture(district9Bread);
        Codakid.registerItemTexture(district10Bread);
        Codakid.registerItemTexture(district11Bread);
        Codakid.registerItemTexture(district12Bread);

        //ADD RECIPES
        GameRegistry.addSmelting(Main.squirrelMeat, new ItemStack(Main.cookedMeat, 1), 1f);
        
        GameRegistry.addShapedRecipe(new ItemStack(cracker), 
                "   ",
                " W ",
                "   ",
                'W', Items.wheat);
        
        GameRegistry.addShapedRecipe(new ItemStack(beefStrip), 
                " B ",
                " B ",
                " B ",
                'B', Items.beef);
        
        GameRegistry.addShapedRecipe(new ItemStack(mockingjayPin), 
                " G ",
                "GGG",
                " G ",
                'G', Items.gold_ingot);
        
        GameRegistry.addShapedRecipe(new ItemStack(ironMace), 
                " I ",
                "III",
                " S ",
                'I', Blocks.iron_block,
                'S', Items.stick);
        
        GameRegistry.addShapedRecipe(new ItemStack(meanAxe), 
                "III",
                "IS ",
                " S ",
                'I', Blocks.iron_block,
                'S', Items.stick);
        
        GameRegistry.addShapedRecipe(new ItemStack(myGrenade), 
                "III",
                "IGI",
                "III",
                'I', Items.iron_ingot,
                'G', Items.gunpowder);
        
        GameRegistry.addShapedRecipe(new ItemStack(spear), 
                " I ",
                " S ",
                " S ",
                'I', Items.iron_ingot,
                'S', Items.stick);
        
        GameRegistry.addShapedRecipe(new ItemStack(spear), 
                " C ",
                " C ",
                " C ",
                'C', Blocks.coal_block,
                'S', Items.stick);
        
        GameRegistry.addShapedRecipe(new ItemStack(knife), 
                "   ",
                " I ",
                " S ",
                'I', Items.iron_ingot,
                'S', Items.stick);
        
        GameRegistry.addShapedRecipe(new ItemStack(district1Bread), 
                " C ",
                "WWW",
                "   ",
                'W', Items.wheat,
                'C', Items.cookie);
        
        GameRegistry.addShapedRecipe(new ItemStack(district2Bread), 
                "WW",
                "WWW",
                " W ",
                'W', Items.wheat,
                'C', Items.cookie);
        
        
        GameRegistry.addShapedRecipe(new ItemStack(district3Bread), 
                "WWW",
                "WWW",
                "W  ",
                'W', Items.wheat,
                'C', Items.cookie);
        
        
        GameRegistry.addShapedRecipe(new ItemStack(district4Bread), 
                "   ",
                "WFW",
                "   ",
                'W', Items.wheat,
                'F', Items.cooked_fish);
        
        
        GameRegistry.addShapedRecipe(new ItemStack(district5Bread), 
                " WW",
                "WWW",
                "W  ",
                'W', Items.wheat,
                'C', Items.cookie);
        
        
        GameRegistry.addShapedRecipe(new ItemStack(district6Bread), 
                " W ",
                "WWW",
                " W ",
                'W', Items.wheat,
                'C', Items.cookie);
        
        
        GameRegistry.addShapedRecipe(new ItemStack(district7Bread), 
                " L ",
                "WWW",
                "   ",
                'W', Items.wheat,
                'L', Blocks.leaves);
        
        
        GameRegistry.addShapedRecipe(new ItemStack(district8Bread), 
                " WW",
                "WWW",
                "WWW",
                'W', Items.wheat,
                'C', Items.cookie);
        
        
        
        GameRegistry.addShapedRecipe(new ItemStack(district9Bread), 
                "WWW",
                "WWW",
                "   ",
                'W', Items.wheat,
                'C', Items.cookie);
        
        
        
        GameRegistry.addShapedRecipe(new ItemStack(district10Bread), 
                "   ",
                "WMW",
                "   ",
                'W', Items.wheat,
                'M', Items.cooked_mutton);
        
        
        
        
        GameRegistry.addShapedRecipe(new ItemStack(district11Bread), 
                "   ",
                "WWW",
                "W W",
                'W', Items.wheat,
                'C', Items.cookie);
        
        
        
        GameRegistry.addShapedRecipe(new ItemStack(district12Bread), 
                "   ",
                "WWW",
                "   ",
                'W', Items.wheat_seeds);
        
        
        


        //REGISTER MOBS
        EntityRegistry.registerGlobalEntityID(CustomMob.class, "trackerJacker", EntityRegistry.findGlobalUniqueEntityId(), 0xFFD149, 0x000000);
        Codakid.registerEntity(CustomMob.class, new CKModelBat(), "bat");
        
        EntityRegistry.addSpawn(CustomMob.class, 10, 1, 2, EnumCreatureType.MONSTER, new BiomeGenBase[]{
                BiomeGenBase.plains
        });
        
        EntityRegistry.registerGlobalEntityID(Squirrel.class, "squirrel", EntityRegistry.findGlobalUniqueEntityId(), 0x5E3718, 0x5E3718);
        Codakid.registerEntity(Squirrel.class, new CKModelRabbit(), "squirrel");
        
        EntityRegistry.addSpawn(CustomMob.class, 10, 1, 2, EnumCreatureType.CREATURE, new BiomeGenBase[]{
                BiomeGenBase.plains,
                BiomeGenBase.forest,
                BiomeGenBase.river,
                BiomeGenBase.birchForest
        });
        
    

        //REGISTER BIOMES
        GameRegistry.registerWorldGenerator(new CustomWorldGen(), 0);


    }

    @EventHandler
    public void postinit(FMLPostInitializationEvent event)
    {

    }

}

 

 

Edited by diesieben07
spoiler
Posted

Please post your code as a GitHub repo rather than just tossing it in a post. (More info on GitHub repos can be found in my signature)

This is my Forum Signature, I am currently attempting to transform it into a small guide for fixing easier issues using spoiler blocks to keep things tidy.

 

As the most common issue I feel I should put this outside the main bulk:

The only official source for Forge is https://files.minecraftforge.net, and the only site I trust for getting mods is CurseForge.

If you use any site other than these, please take a look at the StopModReposts project and install their browser extension, I would also advise running a virus scan.

 

For players asking for assistance with Forge please expand the spoiler below and read the appropriate section(s) in its/their entirety.

Spoiler

Logs (Most issues require logs to diagnose):

Spoiler

Please post logs using one of the following sites (Thank you Lumber Wizard for the list):

https://gist.github.com/100MB Requires member (Free)

https://pastebin.com/: 512KB as guest, 10MB as Pro ($$$)

https://hastebin.com/: 400KB

Do NOT use sites like Mediafire, Dropbox, OneDrive, Google Drive, or a site that has a countdown before offering downloads.

 

What to provide:

...for Crashes and Runtime issues:

Minecraft 1.14.4 and newer:

Post debug.log

Older versions:

Please update...

 

...for Installer Issues:

Post your installer log, found in the same place you ran the installer

This log will be called either installer.log or named the same as the installer but with .log on the end

Note for Windows users:

Windows hides file extensions by default so the installer may appear without the .jar extension then when the .log is added the log will appear with the .jar extension

 

Where to get it:

Mojang Launcher: When using the Mojang launcher debug.log is found in .minecraft\logs.

 

Curse/Overwolf: If you are using the Curse Launcher, their configurations break Forge's log settings, fortunately there is an easier workaround than I originally thought, this works even with Curse's installation of the Minecraft launcher as long as it is not launched THROUGH Twitch:

Spoiler
  1. Make sure you have the correct version of Forge installed (some packs are heavily dependent on one specific build of Forge)
  2. Make a launcher profile targeting this version of Forge.
  3. Set the launcher profile's GameDir property to the pack's instance folder (not the instances folder, the folder that has the pack's name on it).
  4. Now launch the pack through that profile and follow the "Mojang Launcher" instructions above.

Video:

Spoiler

 

 

 

or alternately, 

 

Fallback ("No logs are generated"):

If you don't see logs generated in the usual place, provide the launcher_log.txt from .minecraft

 

Server Not Starting:

Spoiler

If your server does not start or a command window appears and immediately goes away, run the jar manually and provide the output.

 

Reporting Illegal/Inappropriate Adfocus Ads:

Spoiler

Get a screenshot of the URL bar or copy/paste the whole URL into a thread on the General Discussion board with a description of the Ad.

Lex will need the Ad ID contained in that URL to report it to Adfocus' support team.

 

Posting your mod as a GitHub Repo:

Spoiler

When you have an issue with your mod the most helpful thing you can do when asking for help is to provide your code to those helping you. The most convenient way to do this is via GitHub or another source control hub.

When setting up a GitHub Repo it might seem easy to just upload everything, however this method has the potential for mistakes that could lead to trouble later on, it is recommended to use a Git client or to get comfortable with the Git command line. The following instructions will use the Git Command Line and as such they assume you already have it installed and that you have created a repository.

 

  1. Open a command prompt (CMD, Powershell, Terminal, etc).
  2. Navigate to the folder you extracted Forge’s MDK to (the one that had all the licenses in).
  3. Run the following commands:
    1. git init
    2. git remote add origin [Your Repository's URL]
      • In the case of GitHub it should look like: https://GitHub.com/[Your Username]/[Repo Name].git
    3. git fetch
    4. git checkout --track origin/master
    5. git stage *
    6. git commit -m "[Your commit message]"
    7. git push
  4. Navigate to GitHub and you should now see most of the files.
    • note that it is intentional that some are not synced with GitHub and this is done with the (hidden) .gitignore file that Forge’s MDK has provided (hence the strictness on which folder git init is run from)
  5. Now you can share your GitHub link with those who you are asking for help.

[Workaround line, please ignore]

 

Posted
Just now, DaemonUmbra said:

Please post your code as a GitHub repo rather than just tossing it in a post. (More info on GitHub repos can be found in my signature)

A what?

  • Guest locked this topic
Guest
This topic is now closed to further replies.

Announcements



×
×
  • Create New...

Important Information

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