Jump to content

[1.7.2]Shapeless Recipe Crashing Game


blfngl

Recommended Posts

Hi all,

I have an item that places a block when right clicked on the ground used in a recipe, however it crashes minecraft before it launches. My normal items work fine but this type doesn't.

 

Error:

 

[21:24:01] [main/INFO]: Loading tweak class name cpw.mods.fml.common.launcher.FMLTweaker
[21:24:02] [main/INFO]: Using primary tweak class name cpw.mods.fml.common.launcher.FMLTweaker
[21:24:02] [main/INFO]: Calling tweak class cpw.mods.fml.common.launcher.FMLTweaker
[21:24:02] [main/INFO]: Forge Mod Loader version 7.2.211.1121 for Minecraft 1.7.2 loading
[21:24:02] [main/INFO]: Java is Java HotSpot(TM) 64-Bit Server VM, version 1.7.0_60, running on Windows 7:amd64:6.1, installed at C:\Program Files\Java\jre7
[21:24:02] [main/INFO]: Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation
[21:24:02] [main/INFO]: Loading tweak class name cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker
[21:24:02] [main/INFO]: Loading tweak class name cpw.mods.fml.common.launcher.FMLDeobfTweaker
[21:24:02] [main/INFO]: Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker
[21:24:02] [main/INFO]: Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker
[21:24:02] [main/INFO]: Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper
[21:24:02] [main/ERROR]: The binary patch set is missing. Either you are in a development environment, or things are not going to work!
[21:24:03] [main/ERROR]: The minecraft jar file:/C:/Users/Nick/.gradle/caches/minecraft/net/minecraftforge/forge/1.7.2-10.12.2.1121/forgeSrc-1.7.2-10.12.2.1121.jar!/net/minecraft/client/ClientBrandRetriever.class appears to be corrupt! There has been CRITICAL TAMPERING WITH MINECRAFT, it is highly unlikely minecraft will work! STOP NOW, get a clean copy and try again!
[21:24:03] [main/ERROR]: FML has been ordered to ignore the invalid or missing minecraft certificate. This is very likely to cause a problem!
[21:24:03] [main/ERROR]: Technical information: ClientBrandRetriever was at jar:file:/C:/Users/Nick/.gradle/caches/minecraft/net/minecraftforge/forge/1.7.2-10.12.2.1121/forgeSrc-1.7.2-10.12.2.1121.jar!/net/minecraft/client/ClientBrandRetriever.class, there were 0 certificates for it
[21:24:03] [main/ERROR]: FML appears to be missing any signature data. This is not a good thing
[21:24:03] [main/INFO]: Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper
[21:24:03] [main/INFO]: Calling tweak class cpw.mods.fml.common.launcher.FMLDeobfTweaker
[21:24:04] [main/INFO]: Launching wrapped minecraft {net.minecraft.client.main.Main}
[21:24:09] [main/INFO]: Setting user: Player770
[21:24:11] [Client thread/INFO]: LWJGL Version: 2.9.0
[21:24:12] [Client thread/INFO]: Attempting early MinecraftForge initialization
[21:24:12] [Client thread/INFO]: MinecraftForge v10.12.2.1121 Initialized
[21:24:12] [Client thread/INFO]: Replaced 182 ore recipies
[21:24:12] [Client thread/INFO]: Completed early MinecraftForge initialization
[21:24:13] [Client thread/INFO]: Searching C:\Users\Nick\Desktop\[1.7.2]Fallout\eclipse\mods for mods
[21:24:13] [Client thread/INFO]: Mod fallout is missing the required element 'name'. Substituting fallout
[21:24:15] [Client thread/ERROR]: FML has detected a mod that is using a package name based on 'net.minecraft.src' : net.minecraft.src.FMLRenderAccessLibrary. This is generally a severe programming error.  There should be no mod code in the minecraft namespace. MOVE YOUR MOD! If you're in eclipse, select your source code and 'refactor' it into a new package. Go on. DO IT NOW!
[21:24:18] [Client thread/INFO]: Forge Mod Loader has identified 4 mods to load
[21:24:19] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:fallout
[21:24:19] [Client thread/INFO]: Processing ObjectHolder annotations
[21:24:19] [Client thread/INFO]: Found 341 ObjectHolder annotations
[21:24:19] [Client thread/INFO]: Configured a dormant chunk cache size of 0
[21:24:19] [Client thread/INFO]: Applying holder lookups
[21:24:19] [Client thread/INFO]: Holder lookups applied
[21:24:19] [Client thread/ERROR]: Fatal errors were detected during the transition from PREINITIALIZATION to INITIALIZATION. Loading cannot continue
[21:24:19] [Client thread/ERROR]: 
mcp{9.03} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized
FML{7.2.211.1121} [Forge Mod Loader] (forgeSrc-1.7.2-10.12.2.1121.jar) Unloaded->Constructed->Pre-initialized
Forge{10.12.2.1121} [Minecraft Forge] (forgeSrc-1.7.2-10.12.2.1121.jar) Unloaded->Constructed->Pre-initialized
fallout{v0.1} [fallout] (bin) Unloaded->Constructed->Errored
[21:24:19] [Client thread/ERROR]: The following problems were captured during this phase
[21:24:19] [Client thread/ERROR]: Caught exception from fallout
java.lang.RuntimeException: Invalid shapeless recipy!
at net.minecraft.item.crafting.CraftingManager.addShapelessRecipe(CraftingManager.java:271) ~[CraftingManager.class:?]
at cpw.mods.fml.common.registry.GameRegistry.addShapelessRecipe(GameRegistry.java:238) ~[GameRegistry.class:?]
at blfngl.fallout.init.Consumables.init(Consumables.java:112) ~[Consumables.class:?]
at blfngl.fallout.Fallout.preInit(Fallout.java:134) ~[Fallout.class:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_60]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_60]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_60]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_60]
at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:513) ~[FMLModContainer.class:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_60]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_60]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_60]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_60]
at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74) ~[guava-15.0.jar:?]
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:47) ~[guava-15.0.jar:?]
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314) ~[guava-15.0.jar:?]
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296) ~[guava-15.0.jar:?]
at com.google.common.eventbus.EventBus.post(EventBus.java:267) ~[guava-15.0.jar:?]
at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:208) ~[LoadController.class:?]
at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:187) ~[LoadController.class:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_60]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_60]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_60]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_60]
at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74) ~[guava-15.0.jar:?]
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:47) ~[guava-15.0.jar:?]
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314) ~[guava-15.0.jar:?]
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296) ~[guava-15.0.jar:?]
at com.google.common.eventbus.EventBus.post(EventBus.java:267) ~[guava-15.0.jar:?]
at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:118) [LoadController.class:?]
at cpw.mods.fml.common.Loader.preinitializeMods(Loader.java:512) [Loader.class:?]
at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:239) [FMLClientHandler.class:?]
at net.minecraft.client.Minecraft.startGame(Minecraft.java:522) [Minecraft.class:?]
at net.minecraft.client.Minecraft.run(Minecraft.java:892) [Minecraft.class:?]
at net.minecraft.client.main.Main.main(Main.java:112) [Main.class:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_60]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_60]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_60]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_60]
at net.minecraft.launchwrapper.Launch.launch(Launch.java:134) [launchwrapper-1.9.jar:?]
at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.9.jar:?]
---- Minecraft Crash Report ----
// Don't be sad, have a hug! <3

Time: 6/27/14 9:24 PM
Description: Initializing game

java.lang.RuntimeException: Invalid shapeless recipy!
at net.minecraft.item.crafting.CraftingManager.addShapelessRecipe(CraftingManager.java:271)
at cpw.mods.fml.common.registry.GameRegistry.addShapelessRecipe(GameRegistry.java:238)
at blfngl.fallout.init.Consumables.init(Consumables.java:112)
at blfngl.fallout.Fallout.preInit(Fallout.java:134)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:513)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:47)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
at com.google.common.eventbus.EventBus.post(EventBus.java:267)
at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:208)
at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:187)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:47)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
at com.google.common.eventbus.EventBus.post(EventBus.java:267)
at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:118)
at cpw.mods.fml.common.Loader.preinitializeMods(Loader.java:512)
at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:239)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:522)
at net.minecraft.client.Minecraft.run(Minecraft.java:892)
at net.minecraft.client.main.Main.main(Main.java:112)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at net.minecraft.launchwrapper.Launch.launch(Launch.java:134)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)


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

-- Head --
Stacktrace:
at net.minecraft.item.crafting.CraftingManager.addShapelessRecipe(CraftingManager.java:271)
at cpw.mods.fml.common.registry.GameRegistry.addShapelessRecipe(GameRegistry.java:238)
at blfngl.fallout.init.Consumables.init(Consumables.java:112)
at blfngl.fallout.Fallout.preInit(Fallout.java:134)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:513)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:47)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
at com.google.common.eventbus.EventBus.post(EventBus.java:267)
at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:208)
at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:187)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:47)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
at com.google.common.eventbus.EventBus.post(EventBus.java:267)
at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:118)
at cpw.mods.fml.common.Loader.preinitializeMods(Loader.java:512)
at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:239)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:522)

-- Initialization --
Details:
Stacktrace:
at net.minecraft.client.Minecraft.run(Minecraft.java:892)
at net.minecraft.client.main.Main.main(Main.java:112)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at net.minecraft.launchwrapper.Launch.launch(Launch.java:134)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)

-- System Details --
Details:
Minecraft Version: 1.7.2
Operating System: Windows 7 (amd64) version 6.1
Java Version: 1.7.0_60, Oracle Corporation
Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
Memory: 964979432 bytes (920 MB) / 1056309248 bytes (1007 MB) up to 1056309248 bytes (1007 MB)
JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
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.03 FML v7.2.211.1121 Minecraft Forge 10.12.2.1121 4 mods loaded, 4 mods active
mcp{9.03} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized
FML{7.2.211.1121} [Forge Mod Loader] (forgeSrc-1.7.2-10.12.2.1121.jar) Unloaded->Constructed->Pre-initialized
Forge{10.12.2.1121} [Minecraft Forge] (forgeSrc-1.7.2-10.12.2.1121.jar) Unloaded->Constructed->Pre-initialized
fallout{v0.1} [fallout] (bin) Unloaded->Constructed->Errored
Launched Version: 1.6
LWJGL: 2.9.0
OpenGL: AMD Radeon(TM) HD 6480G GL version 4.1.10600 Compatibility Profile Context, ATI Technologies Inc.
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)
Vec3 Pool Size: ~~ERROR~~ NullPointerException: null
Anisotropic Filtering: Off (1)
#@!@# Game crashed! Crash report saved to: #@!@# C:\Users\Nick\Desktop\[1.7.2]Fallout\eclipse\.\crash-reports\crash-2014-06-27_21.24.19-client.txt

 

 

Cave Fungus registry:

 

caveFungus = new ItemCaveFungus().setUnlocalizedName("caveFungus");
	GameRegistry.registerItem(caveFungus, "CaveFungus");

 

 

ItemCaveFungus:

 

package blfngl.fallout.item.plants;

import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import blfngl.fallout.Fallout;
import blfngl.fallout.item.FalloutItem;

public class ItemCaveFungus extends FalloutItem
{
    public ItemCaveFungus()
    {
        setCreativeTab(Fallout.tabFood);
    }

    /**
     * Callback for item usage. If the item does something special on right clicking, he will have one of those. Return
     * True if something happen and false if it don't. This is for ITEMS, not BLOCKS
     */
    public boolean onItemUse(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World par3World, int par4, int par5, int par6, int par7, float par8, float par9, float par10)
    {
        if (par3World.getBlock(par4, par5, par6) != Blocks.snow_layer)
        {
            if (par7 == 0)
            {
                --par5;
            }

            if (par7 == 1)
            {
                ++par5;
            }

            if (par7 == 2)
            {
                --par6;
            }

            if (par7 == 3)
            {
                ++par6;
            }

            if (par7 == 4)
            {
                --par4;
            }

            if (par7 == 5)
            {
                ++par4;
            }

            if (!par3World.isAirBlock(par4, par5, par6))
            {
                return false;
            }
        }

        if (!par2EntityPlayer.canPlayerEdit(par4, par5, par6, par7, par1ItemStack))
        {
            return false;
        }
        else
        {
            if (Fallout.caveFungusB.canPlaceBlockAt(par3World, par4, par5, par6))
            {
                --par1ItemStack.stackSize;
                par3World.setBlock(par4, par5, par6, Fallout.caveFungusB);
            }

            return true;
        }
    }
}

 

 

FalloutItem:

 

package blfngl.fallout.item;

import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.item.Item;
import blfngl.fallout.Fallout;

public class FalloutItem extends Item
{
public FalloutItem()
{
	super();
	this.setCreativeTab(Fallout.tabMiscellaneous);
}

@Override
public void registerIcons(IIconRegister iconRegister)
{
	itemIcon = iconRegister.registerIcon("fallout:" + this.getUnlocalizedName().substring(this.getUnlocalizedName().indexOf(".") + 1));
}
}

 

 

Recipe:

GameRegistry.addShapelessRecipe(new ItemStack(healingPoultice), caveFungus); //, nevadaFruit, xanderRoot, brocFlower);

 

Link to comment
Share on other sites

I should clarify something, when I tried the new ItemStack(caveFungus) the game wouldn't crash but the recipe just simply wouldn't work.

 

Main:

 

package blfngl.fallout;

import net.minecraft.block.Block;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemArmor.ArmorMaterial;
import net.minecraft.item.ItemStack;
import net.minecraftforge.common.util.EnumHelper;
import blfngl.fallout.gui.GuiPowerArmorWelder;
import blfngl.fallout.init.Armor;
import blfngl.fallout.init.Consumables;
import blfngl.fallout.init.FBlocks;
import blfngl.fallout.init.Guns;
import blfngl.fallout.init.Miscellaneous;
import blfngl.fallout.init.Plants;
import blfngl.fallout.proxy.CommonProxy;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.SidedProxy;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;

@Mod(modid = "fallout", version = "v0.1")
public class Fallout
{
@SidedProxy(clientSide = "blfngl.fallout.proxy.ClientProxy", serverSide = "blfngl.fallout.proxy.CommonProxy") 
public static CommonProxy proxy;
//@Instance("fallout")
public static Fallout instance;
private GuiPowerArmorWelder guiPowerArmorWelder = new GuiPowerArmorWelder();

public static Block powerArmorWelder;

public static Item antEgg;
public static Item antMeat;
public static Item barrelCactusFruit;
public static Item bananaYuccaFruit;
public static Item bighornerMeat;
public static Item bighornerSteak;
public static Item blackBloodSausage;
public static Item blamCoMac;
public static Item bloatflyMeat;
public static Item bloatflySlider;
public static Item bloodSausage;
public static Item brahminMeat;
public static Item brahminSteak;
public static Item mutantFungus;
public static Item salientGreen;

public static Item antQueenPheremones;
public static Item antivenom;
public static Item antNectar;
public static Item autoStimpak;
public static Item autoSuperStimpak;
public static Item bloodShield;
public static Item buffout;
public static Item cateye;
public static Item coyoteChew;
public static Item daturaAntivenom;
public static Item daturaHide;
public static Item dixonJet;
public static Item doctorsBag;
public static Item fieryPurgative;
public static Item fireAntNectar;
public static Item ghostSight;
public static Item healingPoultice;
public static Item healingPowder;
public static Item hydra;
public static Item jet;
public static Item medEx;
public static Item medicalSupplies;
public static Item mentats;
public static Item partyMentats;
public static Item psycho;
public static Item radaway;
public static Item rebound;
public static Item rocket;
public static Item rushingWater;
public static Item slasher;
public static Item steady;
public static Item stimpak;
public static Item superStimpak;
public static Item turbo;
public static Item ultrajet;
public static Item weaponBinding;

public static Item plasticBottle;
public static Item jetInhaler;
public static Item syringe;
public static Item syringeBloody;

public static Item pistol357;

public static Item hellfireHelm;
public static Item hellfireChest;
public static Item hellfirePants;
public static Item hellfireBoots;
public static Item t51Helm;
public static Item t51Chest;
public static Item t51Pants;
public static Item t51Boots;
public static Item wT51Helm;
public static Item wT51Chest;
public static Item wT51Pants;
public static Item wT51Boots;
public static Item enclavePowerHelm;
public static Item enclavePowerChest;
public static Item enclavePowerPants;
public static Item enclavePowerBoots;

public static Item cazadorGland;
public static Item nightstalkerBlood;
public static Item wonderglue;
public static Item forceps;
public static Item medicalBrace;
public static Item surgicalTubing;
public static Item scalpel;
public static Item radscorpionGland;
public static Item detergent;

public static Item sacredDaturaRoot;
public static Item caveFungus;
public static Item xanderRoot;
public static Item brocFlower;
public static Item nevadaFruit;
public static Item bananaFruit;

public static Block sacredDaturaPlant;
public static Block caveFungusB;
public static Block xanderPlant;
public static Block brocPlant;
public static Block nevadaPlant;
public static Block bananaPlant;

public static Item nukaCola;
public static Item sunsetSass;
public static Item nukaHome;
public static Item nukaVictory;
public static Item nukaQuartz;
public static Item quantumNuka;
public static Item atomicCocktail;
public static Item battleBrew;
public static Item vodka;

public static CreativeTabs tabPistols = new FalloutTab(CreativeTabs.getNextID(), "TabPistols", Items.bow);
public static CreativeTabs tabFood = new FalloutTab(CreativeTabs.getNextID(), "TabFood", Items.apple);
public static CreativeTabs tabMiscellaneous = new FalloutTab(CreativeTabs.getNextID(), "TabMiscellaneous", Items.iron_ingot);
public static CreativeTabs tabChems = new FalloutTab(CreativeTabs.getNextID(), "TabChems", Items.blaze_powder);
public static CreativeTabs tabArmor = new FalloutTab(CreativeTabs.getNextID(), "TabArmor", Items.iron_helmet);
public static CreativeTabs tabBlocks = new FalloutTab(CreativeTabs.getNextID(), "TabBlocks", Item.getItemFromBlock(Blocks.dirt));

//TODO Change armor rating
public static ArmorMaterial HELLFIRE = EnumHelper.addArmorMaterial("hellfire", 50, new int[]{10, 10, 10, 10}, 0);

@EventHandler
public void preInit(FMLPreInitializationEvent event)
{
	Miscellaneous.init();
	Consumables.init();
	Guns.init();
	Armor.init();
	FBlocks.init();
	Plants.init();
}

@EventHandler
public void init(FMLInitializationEvent event)
{
	proxy.registerRenderThings();
}

@EventHandler
public static void postInit(FMLPostInitializationEvent event)
{
	System.out.println("Fallout Mod Loaded.");
}
}

 

Link to comment
Share on other sites

You asked for my main file :/ I'm trying to be helpful :P

 

I'll try to make it as clear as possible on this post.

 

My issue is that whenever I try to add a recipe with my item called caveFungus like this:

GameRegistry.addShapelessRecipe(new ItemStack(healingPoultice), caveFungus);

 

or

 

GameRegistry.addShapelessRecipe(new ItemStack(healingPoultice), new Object [] {caveFungus});

 

or

 

GameRegistry.addRecipe(new ItemStack(healingPoultice), new Object [] {"X", 'X', caveFungus});

 

eclipse registers no errors, but when I hit the launch button it throws an error:

 

This is the shaped recipe error

---- Minecraft Crash Report ----
// Oops.

Time: 6/29/14 10:11 AM
Description: Initializing game

java.lang.NullPointerException: Initializing game
at net.minecraft.item.crafting.CraftingManager.addRecipe(CraftingManager.java:236)
at cpw.mods.fml.common.registry.GameRegistry.addShapedRecipe(GameRegistry.java:233)
at cpw.mods.fml.common.registry.GameRegistry.addRecipe(GameRegistry.java:228)
at blfngl.fallout.init.Consumables.init(Consumables.java:153)
at blfngl.fallout.Fallout.preInit(Fallout.java:163)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:513)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:47)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
at com.google.common.eventbus.EventBus.post(EventBus.java:267)
at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:208)
at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:187)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:47)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
at com.google.common.eventbus.EventBus.post(EventBus.java:267)
at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:118)
at cpw.mods.fml.common.Loader.preinitializeMods(Loader.java:512)
at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:239)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:522)
at net.minecraft.client.Minecraft.run(Minecraft.java:892)
at net.minecraft.client.main.Main.main(Main.java:112)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at net.minecraft.launchwrapper.Launch.launch(Launch.java:134)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)


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

-- Head --
Stacktrace:
at net.minecraft.item.crafting.CraftingManager.addRecipe(CraftingManager.java:236)
at cpw.mods.fml.common.registry.GameRegistry.addShapedRecipe(GameRegistry.java:233)
at cpw.mods.fml.common.registry.GameRegistry.addRecipe(GameRegistry.java:228)
at blfngl.fallout.init.Consumables.init(Consumables.java:153)
at blfngl.fallout.Fallout.preInit(Fallout.java:163)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:513)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:47)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
at com.google.common.eventbus.EventBus.post(EventBus.java:267)
at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:208)
at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:187)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:47)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
at com.google.common.eventbus.EventBus.post(EventBus.java:267)
at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:118)
at cpw.mods.fml.common.Loader.preinitializeMods(Loader.java:512)
at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:239)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:522)

-- Initialization --
Details:
Stacktrace:
at net.minecraft.client.Minecraft.run(Minecraft.java:892)
at net.minecraft.client.main.Main.main(Main.java:112)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at net.minecraft.launchwrapper.Launch.launch(Launch.java:134)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)

-- System Details --
Details:
Minecraft Version: 1.7.2
Operating System: Windows 7 (amd64) version 6.1
Java Version: 1.7.0_60, Oracle Corporation
Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
Memory: 934233680 bytes (890 MB) / 1056309248 bytes (1007 MB) up to 1056309248 bytes (1007 MB)
JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
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.03 FML v7.2.211.1121 Minecraft Forge 10.12.2.1121 5 mods loaded, 5 mods active
mcp{9.03} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized
FML{7.2.211.1121} [Forge Mod Loader] (forgeSrc-1.7.2-10.12.2.1121.jar) Unloaded->Constructed->Pre-initialized
Forge{10.12.2.1121} [Minecraft Forge] (forgeSrc-1.7.2-10.12.2.1121.jar) Unloaded->Constructed->Pre-initialized
PlayerAPI{1.4} [Player API] (minecraft.jar) Unloaded->Constructed->Pre-initialized
fallout{v0.1} [fallout] (bin) Unloaded->Constructed->Errored
Launched Version: 1.6
LWJGL: 2.9.0
OpenGL: AMD Radeon(TM) HD 6480G GL version 4.1.10600 Compatibility Profile Context, ATI Technologies Inc.
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)
Vec3 Pool Size: ~~ERROR~~ NullPointerException: null
Anisotropic Filtering: Off (1)

 

 

And then the shapeless recipe error

Main:
[spoiler][code]---- Minecraft Crash Report ----
// Hi. I'm Minecraft, and I'm a crashaholic.

Time: 6/29/14 10:19 AM
Description: Initializing game

java.lang.RuntimeException: Invalid shapeless recipy!
at net.minecraft.item.crafting.CraftingManager.addShapelessRecipe(CraftingManager.java:271)
at cpw.mods.fml.common.registry.GameRegistry.addShapelessRecipe(GameRegistry.java:238)
at blfngl.fallout.init.Consumables.init(Consumables.java:153)
at blfngl.fallout.Fallout.preInit(Fallout.java:163)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:513)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:47)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
at com.google.common.eventbus.EventBus.post(EventBus.java:267)
at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:208)
at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:187)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:47)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
at com.google.common.eventbus.EventBus.post(EventBus.java:267)
at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:118)
at cpw.mods.fml.common.Loader.preinitializeMods(Loader.java:512)
at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:239)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:522)
at net.minecraft.client.Minecraft.run(Minecraft.java:892)
at net.minecraft.client.main.Main.main(Main.java:112)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at net.minecraft.launchwrapper.Launch.launch(Launch.java:134)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)


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

-- Head --
Stacktrace:
at net.minecraft.item.crafting.CraftingManager.addShapelessRecipe(CraftingManager.java:271)
at cpw.mods.fml.common.registry.GameRegistry.addShapelessRecipe(GameRegistry.java:238)
at blfngl.fallout.init.Consumables.init(Consumables.java:153)
at blfngl.fallout.Fallout.preInit(Fallout.java:163)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:513)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:47)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
at com.google.common.eventbus.EventBus.post(EventBus.java:267)
at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:208)
at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:187)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:47)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
at com.google.common.eventbus.EventBus.post(EventBus.java:267)
at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:118)
at cpw.mods.fml.common.Loader.preinitializeMods(Loader.java:512)
at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:239)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:522)

-- Initialization --
Details:
Stacktrace:
at net.minecraft.client.Minecraft.run(Minecraft.java:892)
at net.minecraft.client.main.Main.main(Main.java:112)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at net.minecraft.launchwrapper.Launch.launch(Launch.java:134)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)

-- System Details --
Details:
Minecraft Version: 1.7.2
Operating System: Windows 7 (amd64) version 6.1
Java Version: 1.7.0_60, Oracle Corporation
Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
Memory: 928628392 bytes (885 MB) / 1056309248 bytes (1007 MB) up to 1056309248 bytes (1007 MB)
JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
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.03 FML v7.2.211.1121 Minecraft Forge 10.12.2.1121 5 mods loaded, 5 mods active
mcp{9.03} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized
FML{7.2.211.1121} [Forge Mod Loader] (forgeSrc-1.7.2-10.12.2.1121.jar) Unloaded->Constructed->Pre-initialized
Forge{10.12.2.1121} [Minecraft Forge] (forgeSrc-1.7.2-10.12.2.1121.jar) Unloaded->Constructed->Pre-initialized
PlayerAPI{1.4} [Player API] (minecraft.jar) Unloaded->Constructed->Pre-initialized
fallout{v0.1} [fallout] (bin) Unloaded->Constructed->Errored
Launched Version: 1.6
LWJGL: 2.9.0
OpenGL: AMD Radeon(TM) HD 6480G GL version 4.1.10600 Compatibility Profile Context, ATI Technologies Inc.
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)
Vec3 Pool Size: ~~ERROR~~ NullPointerException: null
Anisotropic Filtering: Off (1)

 

 

It also doesn't work if I try this:

GameRegistry.addShapelessRecipe(new ItemStack(healingPoultice), new ItemStack(caveFungus));

 

or

 

GameRegistry.addShapelessRecipe(new ItemStack(healingPoultice), new Object [] {"X", 'X', new ItemStack(caveFungus)});

 

the game will run but the recipe won't be added.

 

Main File

package blfngl.fallout;

import net.minecraft.block.Block;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemArmor.ArmorMaterial;
import net.minecraftforge.common.util.EnumHelper;
import blfngl.fallout.gui.GuiPowerArmorWelder;
import blfngl.fallout.init.Armor;
import blfngl.fallout.init.Consumables;
import blfngl.fallout.init.FBlocks;
import blfngl.fallout.init.Guns;
import blfngl.fallout.init.Miscellaneous;
import blfngl.fallout.init.Plants;
import blfngl.fallout.proxy.CommonProxy;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.SidedProxy;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;

@Mod(modid = "fallout", version = "v0.1")
public class Fallout
{
@SidedProxy(clientSide = "blfngl.fallout.proxy.ClientProxy", serverSide = "blfngl.fallout.proxy.CommonProxy") 
public static CommonProxy proxy;
//@Instance("fallout")
public static Fallout instance;
private GuiPowerArmorWelder guiPowerArmorWelder = new GuiPowerArmorWelder();

public static Block powerArmorWelder;

public static Item antEgg;
public static Item antMeat;
public static Item barrelCactusFruit;
public static Item bananaYuccaFruit;
public static Item bighornerMeat;
public static Item bighornerSteak;
public static Item blackBloodSausage;
public static Item blamCoMac;
public static Item bloatflyMeat;
public static Item bloatflySlider;
public static Item bloodSausage;
public static Item brahminMeat;
public static Item brahminSteak;
public static Item mutantFungus;
public static Item salientGreen;

public static Item antQueenPheremones;
public static Item antivenom;
public static Item antNectar;
public static Item autoStimpak;
public static Item autoSuperStimpak;
public static Item bloodShield;
public static Item buffout;
public static Item cateye;
public static Item coyoteChew;
public static Item daturaAntivenom;
public static Item daturaHide;
public static Item dixonJet;
public static Item doctorsBag;
public static Item fieryPurgative;
public static Item fireAntNectar;
public static Item ghostSight;
public static Item healingPoultice;
public static Item healingPowder;
public static Item hydra;
public static Item jet;
public static Item medEx;
public static Item medicalSupplies;
public static Item mentats;
public static Item partyMentats;
public static Item psycho;
public static Item radaway;
public static Item rebound;
public static Item rocket;
public static Item rushingWater;
public static Item slasher;
public static Item steady;
public static Item stimpak;
public static Item superStimpak;
public static Item turbo;
public static Item ultrajet;
public static Item weaponBinding;

public static Item plasticBottle;
public static Item jetInhaler;
public static Item syringe;
public static Item syringeBloody;

public static Item pistol357;

public static Item hellfireHelm;
public static Item hellfireChest;
public static Item hellfirePants;
public static Item hellfireBoots;
public static Item t51Helm;
public static Item t51Chest;
public static Item t51Pants;
public static Item t51Boots;
public static Item wT51Helm;
public static Item wT51Chest;
public static Item wT51Pants;
public static Item wT51Boots;
public static Item enclavePowerHelm;
public static Item enclavePowerChest;
public static Item enclavePowerPants;
public static Item enclavePowerBoots;
public static Item valenceAccentuator;
public static Item triValenceAccentuator;

public static Item cazadorGland;
public static Item nightstalkerBlood;
public static Item wonderglue;
public static Item forceps;
public static Item medicalBrace;
public static Item surgicalTubing;
public static Item scalpel;
public static Item radscorpionGland;
public static Item detergent;

public static Item sacredDaturaRoot;
public static Item caveFungus;
public static Item xanderRoot;
public static Item brocFlower;
public static Item nevadaFruit;
public static Item bananaFruit;

public static Block sacredDaturaPlant;
public static Block caveFungusB;
public static Block xanderPlant;
public static Block brocPlant;
public static Block nevadaPlant;
public static Block bananaPlant;

public static Item nukaCola;
public static Item sunsetSass;
public static Item nukaHome;
public static Item nukaVictory;
public static Item nukaQuartz;
public static Item quantumNuka;
public static Item atomicCocktail;
public static Item battleBrew;
public static Item vodka;

public static CreativeTabs tabPistols = new FalloutTab(CreativeTabs.getNextID(), "TabPistols", Items.bow);
public static CreativeTabs tabFood = new FalloutTab(CreativeTabs.getNextID(), "TabFood", Items.apple);
public static CreativeTabs tabMiscellaneous = new FalloutTab(CreativeTabs.getNextID(), "TabMiscellaneous", Items.iron_ingot);
public static CreativeTabs tabChems = new FalloutTab(CreativeTabs.getNextID(), "TabChems", Items.blaze_powder);
public static CreativeTabs tabArmor = new FalloutTab(CreativeTabs.getNextID(), "TabArmor", Items.iron_helmet);
public static CreativeTabs tabBlocks = new FalloutTab(CreativeTabs.getNextID(), "TabBlocks", Item.getItemFromBlock(Blocks.dirt));

//TODO Change armor rating
public static ArmorMaterial HELLFIRE = EnumHelper.addArmorMaterial("hellfire", 50, new int[]{10, 10, 10, 10}, 0);

@EventHandler
public void preInit(FMLPreInitializationEvent event)
{
	Miscellaneous.init();
	Consumables.init();
	Guns.init();
	Armor.init();
	FBlocks.init();
	Plants.init();
}

@EventHandler
public void init(FMLInitializationEvent event)
{
	proxy.registerRenderThings();
	//ClientPlayerAPI.register("fallout", FalloutClientPlayerBase.class);
	//ServerPlayerAPI.register("fallout", FalloutServerPlayerBase.class);
}

@EventHandler
public static void postInit(FMLPostInitializationEvent event)
{
	System.out.println("Fallout Mod Loaded.");
}
}

 

 

Registering caveFungus

package blfngl.fallout.init;

import net.minecraft.block.material.Material;
import net.minecraftforge.common.EnumPlantType;
import blfngl.fallout.Fallout;
import blfngl.fallout.block.BlockFPlant;
import blfngl.fallout.item.plants.ItemBananaFruit;
import blfngl.fallout.item.plants.ItemBrocFlower;
import blfngl.fallout.item.plants.ItemCaveFungus;
import blfngl.fallout.item.plants.ItemNevadaFruit;
import blfngl.fallout.item.plants.ItemSacredDaturaRoot;
import blfngl.fallout.item.plants.ItemXanderRoot;
import cpw.mods.fml.common.registry.GameRegistry;

public class Plants extends Fallout
{
public static void init()
{
	sacredDaturaRoot = new ItemSacredDaturaRoot().setUnlocalizedName("sacredDaturaRoot");
	GameRegistry.registerItem(sacredDaturaRoot, "SacredDaturaRoot");

	sacredDaturaPlant = new BlockFPlant(Material.plants, sacredDaturaRoot, EnumPlantType.Desert).setBlockName("sacredDaturaPlant");
	GameRegistry.registerBlock(sacredDaturaPlant, "SacredDaturaPlant");

	caveFungus = new ItemCaveFungus().setUnlocalizedName("caveFungus");
	GameRegistry.registerItem(caveFungus, "CaveFungus");

	caveFungusB = new BlockFPlant(Material.plants, caveFungus, EnumPlantType.Cave).setBlockName("caveFungusB");
	GameRegistry.registerBlock(caveFungusB, "CaveFungusB");

	brocFlower = new ItemBrocFlower().setUnlocalizedName("brocFlower");
	GameRegistry.registerItem(brocFlower, "BrocFlower");

	brocPlant = new BlockFPlant(Material.plants, brocFlower, EnumPlantType.Desert).setBlockName("brocPlant");
	GameRegistry.registerBlock(brocPlant, "BrocPlant");

	nevadaFruit = new ItemNevadaFruit().setUnlocalizedName("nevadaFruit");
	GameRegistry.registerItem(nevadaFruit, "NevadaFruit");

	nevadaPlant = new BlockFPlant(Material.plants, nevadaFruit, EnumPlantType.Desert).setBlockName("nevadaPlant");
	GameRegistry.registerBlock(nevadaPlant, "NevadaPlant");

	xanderRoot = new ItemXanderRoot().setUnlocalizedName("xanderRoot");
	GameRegistry.registerItem(xanderRoot, "XanderRoot");

	xanderPlant = new BlockFPlant(Material.plants, xanderRoot, EnumPlantType.Desert).setBlockName("xanderPlant");
	GameRegistry.registerBlock(xanderPlant, "XanderPlant");

	bananaFruit = new ItemBananaFruit().setUnlocalizedName("bananaFruit");
	GameRegistry.registerItem(bananaFruit, "BananaFruit");

	bananaPlant = new BlockFPlant(Material.plants, bananaFruit, EnumPlantType.Desert).setBlockName("bananaPlant");
	GameRegistry.registerBlock(bananaPlant, "BananaPlant");
}
}

 

 

ItemCaveFungus

package blfngl.fallout.item.plants;

import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import blfngl.fallout.Fallout;
import blfngl.fallout.item.FalloutItem;

public class ItemCaveFungus extends FalloutItem
{
    public ItemCaveFungus()
    {
    	super();
        setCreativeTab(Fallout.tabFood);
    }

    /**
     * Callback for item usage. If the item does something special on right clicking, he will have one of those. Return
     * True if something happen and false if it don't. This is for ITEMS, not BLOCKS
     */
    public boolean onItemUse(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World par3World, int par4, int par5, int par6, int par7, float par8, float par9, float par10)
    {
        if (par3World.getBlock(par4, par5, par6) != Blocks.snow_layer)
        {
            if (par7 == 0)
            {
                --par5;
            }

            if (par7 == 1)
            {
                ++par5;
            }

            if (par7 == 2)
            {
                --par6;
            }

            if (par7 == 3)
            {
                ++par6;
            }

            if (par7 == 4)
            {
                --par4;
            }

            if (par7 == 5)
            {
                ++par4;
            }

            if (!par3World.isAirBlock(par4, par5, par6))
            {
                return false;
            }
        }

        if (!par2EntityPlayer.canPlayerEdit(par4, par5, par6, par7, par1ItemStack))
        {
            return false;
        }
        else
        {
            if (Fallout.caveFungusB.canPlaceBlockAt(par3World, par4, par5, par6))
            {
                --par1ItemStack.stackSize;
                par3World.setBlock(par4, par5, par6, Fallout.caveFungusB);
            }

            return true;
        }
    }
}

 

Link to comment
Share on other sites

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

    • They were already updated, and just to double check I even did a cleanup and fresh update from that same page. I'm quite sure drivers are not the problem here. 
    • i tried downloading the drivers but it says no AMD graphics hardware has been detected    
    • Update your AMD/ATI drivers - get the drivers from their website - do not update via system  
    • As the title says i keep on crashing on forge 1.20.1 even without any mods downloaded, i have the latest drivers (nvidia) and vanilla minecraft works perfectly fine for me logs: https://pastebin.com/5UR01yG9
    • Hello everyone, I'm making this post to seek help for my modded block, It's a special block called FrozenBlock supposed to take the place of an old block, then after a set amount of ticks, it's supposed to revert its Block State, Entity, data... to the old block like this :  The problem I have is that the system breaks when handling multi blocks (I tried some fix but none of them worked) :  The bug I have identified is that the function "setOldBlockFields" in the item's "setFrozenBlock" function gets called once for the 1st block of multiblock getting frozen (as it should), but gets called a second time BEFORE creating the first FrozenBlock with the data of the 1st block, hence giving the same data to the two FrozenBlock :   Old Block Fields set BlockState : Block{minecraft:black_bed}[facing=east,occupied=false,part=head] BlockEntity : net.minecraft.world.level.block.entity.BedBlockEntity@73681674 BlockEntityData : id:"minecraft:bed",x:3,y:-60,z:-6} Old Block Fields set BlockState : Block{minecraft:black_bed}[facing=east,occupied=false,part=foot] BlockEntity : net.minecraft.world.level.block.entity.BedBlockEntity@6d1aa3da BlockEntityData : {id:"minecraft:bed",x:2,y:-60,z:-6} Frozen Block Entity set BlockState : Block{minecraft:black_bed}[facing=east,occupied=false,part=foot] BlockPos{x=3, y=-60, z=-6} BlockEntity : net.minecraft.world.level.block.entity.BedBlockEntity@6d1aa3da BlockEntityData : {id:"minecraft:bed",x:2,y:-60,z:-6} Frozen Block Entity set BlockState : Block{minecraft:black_bed}[facing=east,occupied=false,part=foot] BlockPos{x=2, y=-60, z=-6} BlockEntity : net.minecraft.world.level.block.entity.BedBlockEntity@6d1aa3da BlockEntityData : {id:"minecraft:bed",x:2,y:-60,z:-6} here is the code inside my custom "freeze" item :    @Override     public @NotNull InteractionResult useOn(@NotNull UseOnContext pContext) {         if (!pContext.getLevel().isClientSide() && pContext.getHand() == InteractionHand.MAIN_HAND) {             BlockPos blockPos = pContext.getClickedPos();             BlockPos secondBlockPos = getMultiblockPos(blockPos, pContext.getLevel().getBlockState(blockPos));             if (secondBlockPos != null) {                 createFrozenBlock(pContext, secondBlockPos);             }             createFrozenBlock(pContext, blockPos);             return InteractionResult.SUCCESS;         }         return super.useOn(pContext);     }     public static void createFrozenBlock(UseOnContext pContext, BlockPos blockPos) {         BlockState oldState = pContext.getLevel().getBlockState(blockPos);         BlockEntity oldBlockEntity = oldState.hasBlockEntity() ? pContext.getLevel().getBlockEntity(blockPos) : null;         CompoundTag oldBlockEntityData = oldState.hasBlockEntity() ? oldBlockEntity.serializeNBT() : null;         if (oldBlockEntity != null) {             pContext.getLevel().removeBlockEntity(blockPos);         }         BlockState FrozenBlock = setFrozenBlock(oldState, oldBlockEntity, oldBlockEntityData);         pContext.getLevel().setBlockAndUpdate(blockPos, FrozenBlock);     }     public static BlockState setFrozenBlock(BlockState blockState, @Nullable BlockEntity blockEntity, @Nullable CompoundTag blockEntityData) {         BlockState FrozenBlock = BlockRegister.FROZEN_BLOCK.get().defaultBlockState();         ((FrozenBlock) FrozenBlock.getBlock()).setOldBlockFields(blockState, blockEntity, blockEntityData);         return FrozenBlock;     }  
  • Topics

×
×
  • Create New...

Important Information

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