Jump to content

blfngl

Members
  • Posts

    87
  • Joined

  • Last visited

Posts posted by blfngl

  1. So I've got this GUI that works fine without the public void initGui() method, however when I add it all of my item slots relocate to a new location outside of the gui. I need it to add buttons though. Help?

     

    The GUI in question:

     

    package blfngl.fallout.gui;
    
    import net.minecraft.client.Minecraft;
    import net.minecraft.client.gui.inventory.GuiContainer;
    import net.minecraft.client.renderer.OpenGlHelper;
    import net.minecraft.client.renderer.RenderHelper;
    import net.minecraft.client.renderer.entity.RenderManager;
    import net.minecraft.entity.EntityLivingBase;
    import net.minecraft.util.ResourceLocation;
    
    import org.lwjgl.opengl.GL11;
    import org.lwjgl.opengl.GL12;
    
    import blfngl.fallout.player.FalloutPlayer;
    import blfngl.fallout.player.inventory.ContainerPipboy;
    import blfngl.fallout.player.inventory.InventoryPipboy;
    
    public class GuiPipboy extends GuiContainer
    {
    private float xSize_lo;
    private float ySize_lo;
    private static final ResourceLocation iconLocation = new ResourceLocation("fallout", "textures/gui/pipboy.png");
    private final InventoryPipboy inventory;
    
    public GuiPipboy(ContainerPipboy containerItem)
    {
    	super(containerItem);
    	this.inventory = containerItem.inventory;
    }
    
    public void drawScreen(int par1, int par2, float par3)
    {
    	super.drawScreen(par1, par2, par3);
    	this.xSize_lo = (float)par1;
    	this.ySize_lo = (float)par2;
    }
    
    protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY)
    {
    	FalloutPlayer props = FalloutPlayer.get(Minecraft.getMinecraft().thePlayer);
    	this.fontRendererObj.drawString("Rads: " + props.getCurrentRads(), width / 5, 6, 4210752);
    }
    
    protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3)
    {
    	GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
    	this.mc.getTextureManager().bindTexture(iconLocation);
    	int k = (this.width - this.xSize) / 2;
    	int l = (this.height - this.ySize) / 2;
    	this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
    	int i1;
    	drawPlayerModel(k + 51, l + 75, 30, (float)(k + 51) - this.xSize_lo, (float)(l + 75 - 50) - this.ySize_lo, this.mc.thePlayer);
    }
    
    public void initGui()
    {
                      //WHEN THIS METHOD IS IN THE CODE EVERYTHING BREAKS
    }
    
    public static void drawPlayerModel(int x, int y, int scale, float yaw, float pitch, EntityLivingBase entity)
    {
    	GL11.glEnable(GL11.GL_COLOR_MATERIAL);
    	GL11.glPushMatrix();
    	GL11.glTranslatef(x, y, 50.0F);
    	GL11.glScalef(-scale, scale, scale);
    	GL11.glRotatef(180.0F, 0.0F, 0.0F, 1.0F);
    	float f2 = entity.renderYawOffset;
    	float f3 = entity.rotationYaw;
    	float f4 = entity.rotationPitch;
    	float f5 = entity.prevRotationYawHead;
    	float f6 = entity.rotationYawHead;
    	GL11.glRotatef(135.0F, 0.0F, 1.0F, 0.0F);
    	RenderHelper.enableStandardItemLighting();
    	GL11.glRotatef(-135.0F, 0.0F, 1.0F, 0.0F);
    	GL11.glRotatef(-((float) Math.atan(pitch / 40.0F)) * 20.0F, 1.0F, 0.0F, 0.0F);
    	entity.renderYawOffset = (float) Math.atan(yaw / 40.0F) * 20.0F;
    	entity.rotationYaw = (float) Math.atan(yaw / 40.0F) * 40.0F;
    	entity.rotationPitch = -((float) Math.atan(pitch / 40.0F)) * 20.0F;
    	entity.rotationYawHead = entity.rotationYaw;
    	entity.prevRotationYawHead = entity.rotationYaw;
    	GL11.glTranslatef(0.0F, (float) entity.getYOffset(), 0.0F);
    	RenderManager rendermanager = Minecraft.getMinecraft().getRenderManager();
    	rendermanager.setPlayerViewY(180.0F);
    	rendermanager.setRenderShadow(false);
    	rendermanager.renderEntityWithPosYaw(entity, 0.0D, 0.0D, 0.0D, 0.0F, 1.0F);
    	rendermanager.setRenderShadow(true);
    	entity.renderYawOffset = f2;
    	entity.rotationYaw = f3;
    	entity.rotationPitch = f4;
    	entity.prevRotationYawHead = f5;
    	entity.rotationYawHead = f6;
    	GL11.glPopMatrix();
    	RenderHelper.disableStandardItemLighting();
    	GL11.glDisable(GL12.GL_RESCALE_NORMAL);
    	OpenGlHelper.setActiveTexture(OpenGlHelper.lightmapTexUnit);
    	GL11.glDisable(GL11.GL_TEXTURE_2D);
    	OpenGlHelper.setActiveTexture(OpenGlHelper.defaultTexUnit);
    }
    }

     

  2. So I've had this problem for a while now and nobody's been able to fix it, including me, so I thought I'd take it here again.

     

    Below, you can see the methods in an item that will fire a projectile when right clicked. The problem is when I was switching the player specific values for the gun, so it would work on servers, the value "clipCount" will be set to the correct amount and then subsequently be set to 0 after each reload. I checked the value while the reload loop was running; it would get set to 1, 2, 3, 4, etc without any zeros in the middle, but after the maximum value was reached and exited the reload loop the value would be set to 0.

     

    Help?

     

     

    @Override
    public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer player)
    {
    	FalloutPlayer props = FalloutPlayer.get(player);
    	float actualDamage = damage * ((50 + (props.getSkillValue("guns") * .5F)) / 100);
    
    	if (player.capabilities.isCreativeMode && !world.isRemote)
    	{
    		if  (itemStack.stackTagCompound.getInteger("currentShotTime") >= shotTime * 20.0)
    		{
    			world.spawnEntityInWorld(new EntityBullet(world, player, actualDamage, spread));
    			world.playSoundAtEntity(player, fireSound, 1.0F, 1);
    			itemStack.stackTagCompound.setInteger("currentShotTime", 0);
    		}
    	}
    
    	else if (itemStack.stackTagCompound.getInteger("clipCount") > 0 && itemStack.stackTagCompound.getInteger("currentShotTime") >= shotTime * 20.0 &&
    			!world.isRemote && itemStack.stackTagCompound.getInteger("currentReloadTime") > (35 * reloadTime))	
    	{
    		if (!Fallout.isReloading)
    		{
    			world.spawnEntityInWorld(new EntityBullet(world, player, actualDamage, spread));
    			world.playSoundAtEntity(player, fireSound, 1.0F, 1);
    			itemStack.stackTagCompound.setInteger("currentShotTime", 0);
    			itemStack.stackTagCompound.setInteger("clipCount", itemStack.stackTagCompound.getInteger("clipCount") - 1);
    		}
    	}
    
    	return itemStack;
    }
    
    @Override
    public void onUpdate(ItemStack itemStack, World world, Entity entity, int metadata, boolean bool)
    {
    	if (itemStack.stackTagCompound == null)
    	{
    		itemStack.stackTagCompound = new NBTTagCompound();
    		itemStack.stackTagCompound.setInteger("clipCount", 0);
    		itemStack.stackTagCompound.setInteger("currentReloadTime", 0);
    		itemStack.stackTagCompound.setInteger("currentShotTime", 0);
    	}
    
    	if (itemStack.stackTagCompound != null)
    	{
    		itemStack.stackTagCompound.setInteger("currentShotTime", itemStack.stackTagCompound.getInteger("currentShotTime") + 1);
    		itemStack.stackTagCompound.setInteger("currentReloadTime", itemStack.stackTagCompound.getInteger("currentReloadTime") + 1);
    
    		if (entity instanceof EntityPlayer)
    		{
    			EntityPlayer player = (EntityPlayer) entity;
    			FalloutPlayer extPlayer = FalloutPlayer.get(player);
    
    			if (itemStack.stackTagCompound.getInteger("clipCount") < clipSize && Fallout.isReloading && player.inventory.hasItem(ammoType))
    			{
    				player.playSound(reloadSound, 1.0F, 1);
    
    				for (int i = 0; i < clipSize; i++)
    				{
    					if (player.inventory.hasItem(ammoType) && itemStack.stackTagCompound.getInteger("clipCount") < clipSize)
    					{
    						int currentClip = itemStack.stackTagCompound.getInteger("clipCount");
    						player.inventory.consumeInventoryItem(ammoType);
    						itemStack.stackTagCompound.setInteger("clipCount", currentClip + 1);
    						System.out.println(itemStack.stackTagCompound.getInteger("clipCount"));
    					}
    				}
    
    				System.out.println(itemStack.stackTagCompound.getInteger("clipCount"));
    				itemStack.stackTagCompound.setInteger("currentReloadTime", 0);
    				Fallout.isReloading = false;
    			}
    		}
    	}
    }
    
    

     

  3. You cannot store any data that is unique per Item in the Item class (do not make fields for it). You must get that data from the ItemStack every time.

    So I removed all of my

    int clip = itemStack.stackTagCompound.getInteger("clip");

    and replaced it with just the itemStack.stackTagCompound line, but I get the same result.

     

    No, not that.  Those are local variables.  He means this chunk and anything that references these:

    	Item ammoType;
    String name;
    double reloadTime;
    double shotTime;
    int clipSize;
    float damage;
    float baseDamage;
    String fireSound;
    String reloadSound;
    int durability;
    
    int currentShotTime = 0;
    int currentReloadTime = 0;

    All of the variables excpet for the two at the bottom are static for everyone and I was going to change the last two once I could figure this out. Does having them effect the NBT data anyways?
  4. So I've made a gun that used to store bullets as a local variable and am now switching it to be NBT stored, however the gun's "clip count" (how many bullets are loaded) keeps reverting to 0 before it ever fires a shot, even after being reloaded. Help?

     

    ItemGun:

    package blfngl.fallout.item.guns;
    
    import java.util.List;
    
    import net.minecraft.client.renderer.texture.IIconRegister;
    import net.minecraft.entity.Entity;
    import net.minecraft.entity.player.EntityPlayer;
    import net.minecraft.item.Item;
    import net.minecraft.item.ItemStack;
    import net.minecraft.nbt.NBTTagCompound;
    import net.minecraft.util.EnumChatFormatting;
    import net.minecraft.world.World;
    import blfngl.fallout.Fallout;
    import blfngl.fallout.entity.projectile.EntityBullet;
    import blfngl.fallout.item.ItemFallout;
    import blfngl.fallout.player.FalloutPlayer;
    import cpw.mods.fml.relauncher.Side;
    import cpw.mods.fml.relauncher.SideOnly;
    
    public class ItemGun extends ItemFallout
    {
    Item ammoType;
    String name;
    double reloadTime;
    double shotTime;
    int clipSize;
    float damage;
    float baseDamage;
    String fireSound;
    String reloadSound;
    int durability;
    
    int currentShotTime = 0;
    int currentReloadTime = 0;
    
    /**
     * @param par1 ammo
     * @param par2 unlocalized name
     * @param par3 reload time
     * @param par4 shot time
     * @param par5 clip size
     * @param par6 damage
     * @param par7 fire sound
     * @param par8 reload sound
     * @param par9 durability
     */
    public ItemGun(Item par1, String par2, double par3, double par4, int par5, float par6, String par7, String par8, int par9)
    {
    	maxStackSize = 1;
    	setCreativeTab(Fallout.tabGuns);
    	name = par2;
    	setUnlocalizedName(name);
    	ammoType = par1;
    	reloadTime = par3;
    	shotTime = par4;
    	clipSize = par5;
    	damage =  4 * par6;
    	baseDamage = damage;
    	fireSound = "fallout:" + par7;
    	reloadSound = "fallout:" + par8;
    	setMaxDamage(par9);
    	durability = par9;
    }
    
    @Override
    public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer player)
    {
    	if (itemStack.stackTagCompound == null)
    	{
    		itemStack.stackTagCompound = new NBTTagCompound();
    		System.out.println("created new tag");
    		itemStack.stackTagCompound.setInteger("clip", 0);
    	}
    
    	FalloutPlayer props = FalloutPlayer.get(player);
    	float actualDamage = damage * ((50 + (props.getSkillValue("guns") * .5F)) / 100);
    	int clipCount = itemStack.stackTagCompound.getInteger("clip");
    
    	if (player.capabilities.isCreativeMode && !world.isRemote)
    	{
    		if  (currentShotTime >= shotTime * 20.0)
    		{
    			world.spawnEntityInWorld(new EntityBullet(world, player, actualDamage));
    			world.playSoundAtEntity(player, fireSound, 1.0F, 1);
    			currentShotTime = 0;
    		}
    	}
    
    	else if (clipCount > 0 && currentShotTime >= shotTime * 20.0 && !world.isRemote && currentReloadTime > (40 * reloadTime)) // && !Fallout.isReloading && extPlayer.getReloadingState() == 0)
    	{
    		if (!Fallout.isReloading)
    		{
    			world.spawnEntityInWorld(new EntityBullet(world, player, actualDamage));
    			world.playSoundAtEntity(player, fireSound, 1.0F, 1);
    			currentShotTime = 0;
    			itemStack.stackTagCompound.setInteger("clip", clipCount - 1);
    			System.out.println("fired");
    			//itemStack.damageItem(1, player);
    		}
    	}
    
    	System.out.println(clipCount);
    	return itemStack;
    }
    
    @Override
    public void onUpdate(ItemStack itemStack, World world, Entity entity, int p_77663_4_, boolean p_77663_5_)
    {
    	if (itemStack.stackTagCompound == null)
    	{
    		itemStack.stackTagCompound = new NBTTagCompound();
    		System.out.println("created new tag");
    		itemStack.stackTagCompound.setInteger("clip", 0);
    	}
    
    	currentShotTime++;
    	currentReloadTime++;
    
    	if (entity instanceof EntityPlayer)
    	{
    		int clipCount = itemStack.stackTagCompound.getInteger("clip");
    
    		EntityPlayer player = (EntityPlayer) entity;
    		FalloutPlayer extPlayer = FalloutPlayer.get(player);
    
    		if (clipCount < clipSize && Fallout.isReloading && player.inventory.hasItem(ammoType)) //extPlayer.getReloadingState() == 1)
    		{
    			player.playSound(reloadSound, 1.0F, 1);
    
    			for (int i = 0; i < clipSize; i++)
    			{
    				if (player.inventory.hasItem(ammoType) && clipCount < clipSize)
    				{
    					player.inventory.consumeInventoryItem(ammoType);
    					clipCount++;
    				}
    			}
    
    			itemStack.stackTagCompound.setInteger("clip", clipCount);
    			currentReloadTime = 0;
    			Fallout.isReloading = false;
    			System.out.println("finishedReload" + clipCount);
    		}
    	}
    }
    
    @Override
    @SideOnly(Side.CLIENT)
    public void addInformation(ItemStack itemStack, EntityPlayer player, List list, boolean p_77624_4_)
    {
    	/**int clipCount;
    
    	if (itemStack.stackTagCompound == null)
    	{
    		itemStack.stackTagCompound = new NBTTagCompound();
    		itemStack.stackTagCompound.setInteger("clip", 0);
    		clipCount = itemStack.stackTagCompound.getInteger("clip");
    	}
    
    	else
    	{
    		clipCount = itemStack.stackTagCompound.getInteger("clip");
    	}
    
    	FalloutPlayer props = FalloutPlayer.get(player);
    	float displayDamage = damage * ((50 + (props.getSkillValue("guns") * .5F)) / 100);
    
    	//list.add("");
    	list.add("\u00A79Damage: " + displayDamage);
    	list.add("\u00A79Ammo Loaded: " + clipCount + " / " + clipSize);
    	list.add("");*/
    	list.add(EnumChatFormatting.RED + "Base Stats:");
    	list.add(EnumChatFormatting.RED + "Damage: " + baseDamage);
    	list.add(EnumChatFormatting.RED + "Ammo Type: " + ammoType.getItemStackDisplayName(new ItemStack(ammoType)));
    	list.add(EnumChatFormatting.RED + "Fire Rate: " + shotTime);
    	list.add(EnumChatFormatting.RED + "Reload Rate: " + reloadTime);
    	//list.add("Durability: " + (durability - getDamage(itemStack)) + " / " + durability);
    }
    
    @Override
    public void registerIcons(IIconRegister iconRegister)
    {
    	itemIcon = iconRegister.registerIcon("fallout:" + getUnlocalizedName().substring(getUnlocalizedName().indexOf(".") + 1));
    }
    
    @Override
    @SideOnly(Side.CLIENT)
    public boolean isFull3D()
    {
    	return true;
    }
    }
    

     

  5. Hi, I'm getting a very strange error after running gradlew jar and trying to test my mod on an actual minecraft client. It works fine in eclipse, but I'm getting this error when I run it in minecraft:

    ---- Minecraft Crash Report ----

    // I bet Cylons wouldn't have this problem.

     

    Time: 11/24/14 10:33 PM

    Description: There was a severe problem during mod loading that has caused the game to fail

     

    cpw.mods.fml.common.LoaderException: java.lang.NoSuchFieldError: maxStackSize

    at cpw.mods.fml.common.LoadController.transition(LoadController.java:162)

    at cpw.mods.fml.common.Loader.initializeMods(Loader.java:692)

    at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:288)

    at net.minecraft.client.Minecraft.func_71384_a(Minecraft.java:541)

    at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:867)

    at net.minecraft.client.main.Main.main(SourceFile:148)

    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:135)

    at net.minecraft.launchwrapper.Launch.main(Launch.java:28)

    Caused by: java.lang.NoSuchFieldError: maxStackSize

    at blfngl.fallout.item.guns.ItemGun.<init>(ItemGun.java:47)

    at blfngl.fallout.init.Misc.init(Misc.java:21)

    at blfngl.fallout.Fallout.init(Fallout.java:160)

    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.EventSubscriber.handleEvent(EventSubscriber.java:74)

    at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)

    at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)

    at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)

    at com.google.common.eventbus.EventBus.post(EventBus.java:275)

    at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java: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.EventSubscriber.handleEvent(EventSubscriber.java:74)

    at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)

    at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)

    at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)

    at com.google.common.eventbus.EventBus.post(EventBus.java:275)

    at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:118)

    at cpw.mods.fml.common.Loader.initializeMods(Loader.java:691)

    ... 10 more

     

     

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

    ---------------------------------------------------------------------------------------

     

    -- System Details --

    Details:

    Minecraft Version: 1.7.10

    Operating System: Windows 8.1 (amd64) version 6.3

    Java Version: 1.8.0_25, Oracle Corporation

    Java VM Version: Java HotSpot 64-Bit Server VM (mixed mode), Oracle Corporation

    Memory: 100398544 bytes (95 MB) / 270061568 bytes (257 MB) up to 1060372480 bytes (1011 MB)

    JVM Flags: 6 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xmx1G -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:-UseAdaptiveSizePolicy -Xmn128M

    AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used

    IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0

    FML: MCP v9.05 FML v7.10.85.1230 Minecraft Forge 10.13.2.1230 4 mods loaded, 4 mods active

    mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized

    FML{7.10.85.1230} [Forge Mod Loader] (forge-1.7.10-10.13.2.1230.jar) Unloaded->Constructed->Pre-initialized->Initialized

    Forge{10.13.2.1230} [Minecraft Forge] (forge-1.7.10-10.13.2.1230.jar) Unloaded->Constructed->Pre-initialized->Initialized

    fallout{[1.7.10] v0.1} [The Fallout Mod] (modid-1.0.jar) Unloaded->Constructed->Pre-initialized->Errored

     

     

    Help?

  6. You are registering your entity on the client side, that is not good.

    Only rendering goes on client side, the other part should be server side.

    I moved the registration to main init method but it didn't change anything.

     

    Could it be my spawn code, as in I'm spawning it but not where I want it?

     

    This is called when you right click:

    world.spawnEntityInWorld(new EntityBullet(world, damage));

     

    And this is the object code:

     

    package blfngl.fallout.entity.projectile;
    
    import net.minecraft.entity.EntityLivingBase;
    import net.minecraft.entity.projectile.EntityThrowable;
    import net.minecraft.util.DamageSource;
    import net.minecraft.util.MovingObjectPosition;
    import net.minecraft.world.World;
    
    public class EntityBullet extends EntityThrowable
    {
    public float damage;
    
    public EntityBullet(World world, float par1)
    {
    	super(world);
    	damage = par1;
    	setSpeed();
    }
    
    @Override
    protected void onImpact(MovingObjectPosition position)
    {
    	if (position.entityHit instanceof EntityLivingBase)
    	{
    		EntityLivingBase entity = (EntityLivingBase) position.entityHit;
    		//entity.setHealth(entity.getHealth() - damage);
    		position.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, this.getThrower()), damage);
    	}
    
    	this.worldObj.createExplosion(this, this.posX, this.posY, this.posZ, 1.0F, true);
    	this.setDead();
    }
    
    @Override
    protected float getGravityVelocity()
    {
    	return 0.0F;
    }
    
    private void setSpeed()
    {
    	setThrowableHeading(this.motionX, this.motionY, this.motionZ, 4.0F, 1.0F);
    }
    }

     

     

    Once again, the problem is the entity is now no longer visible (used to render as a cube) and does not detect when it hits an entity.

  7. Did you register your projectile using EntityRegistry#registerModEntity ?

     

    Are you spawning the entity on the server?

     

    Your Entity should have a constructor with a single World argument as well:

    public YourEntity(World world {

    super(world);

    }

     

    I had forgotten to register the entity :P

    However, before I did this the entity would show up as a cube but now it just doesn't render at all.

     

    I put the code here, in my client proxy:

    package blfngl.fallout.proxy;
    
    import net.minecraft.client.renderer.entity.RenderSnowball;
    import blfngl.fallout.Fallout;
    import blfngl.fallout.entity.projectile.EntityBullet;
    import cpw.mods.fml.client.registry.RenderingRegistry;
    import cpw.mods.fml.common.registry.EntityRegistry;
    import cpw.mods.fml.relauncher.Side;
    import cpw.mods.fml.relauncher.SideOnly;
    
    public class ClientProxy extends CommonProxy
    {
    @Override
    @SideOnly(Side.CLIENT)
    public void initRender()
    {
    	EntityRegistry.registerModEntity(EntityBullet.class, "Bullet", 0, Fallout.instance, 80, 1, true);
    	RenderingRegistry.registerEntityRenderingHandler(EntityBullet.class, new RenderSnowball(Fallout.emptySyringe));
    	LanguageRegistry.instance().addStringLocalization("entity.bullet.fallout.name", "fallout");
    }
    }
    

     

  8. Hi

     

    > the bullet won't ever register hitting an entity. Hits blocks fine though.

     

    Do you mean - the bullet goes right through the block? or it just does no damage?

     

    Have you tried placing a breakpoint in onImpact() on the first line and trying to hit an entity with the bullet?

     

    -TGG

    So I tried your breakpoint idea but it never "stopped" and the onImpact was simply never called, ever, even when it hit the ground.

     

    I also added this line of code to test it in-game, but the explosion only occurred on the block behind the entity and the bullet kept traveling through entities.

    this.worldObj.createExplosion(this, this.posX, this.posY, this.posZ, 1.0F, true);

     

    I've also tried changing the instanceof to different classes, such as Entity, EntityLiving, EntityLivingBase, etc, but none seem to work. Pretty stumped with this one.

  9. So I wrote a simple gun item, but a huge problem with it is that the bullet won't ever register hitting an entity. Hits blocks fine though. Help?

     

    Code:

     

    package blfngl.fallout.entity.projectile;
    
    import net.minecraft.entity.Entity;
    import net.minecraft.entity.EntityLiving;
    import net.minecraft.entity.EntityLivingBase;
    import net.minecraft.entity.projectile.EntityThrowable;
    import net.minecraft.util.DamageSource;
    import net.minecraft.util.MovingObjectPosition;
    import net.minecraft.world.World;
    
    public class EntityBullet extends EntityThrowable
    {
    public float damage;
    
    public EntityBullet(World world, EntityLivingBase entity, float par1)
    {
    	super(world, entity);
    	damage = par1;
    }
    
    @Override
    protected void onImpact(MovingObjectPosition position)
    {
    	if (position.entityHit instanceof Entity)
    	{
    		EntityLiving entity = (EntityLiving) position.entityHit;
    		//entity.setHealth(entity.getHealth() - damage);
    		position.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, this.getThrower()), damage);
    	}
    
    	this.setDead();
    }
    
    @Override
    protected float getGravityVelocity()
    {
    	return 0.0F;
    }
    
    private void setSpeed()
    {
    	setThrowableHeading(this.motionX, this.motionY, this.motionZ, 4.0F, 1.0F);
    }
    }

     

  10. So I've browsed the internet for about 3 hours looking for a fix, and spent another few working on it myself, but I'm stumped. I know (I think) my problem has something to do with how I've written the slots on the table, it's a 5x5, but I can't find the actual problem.

     

    The NPE happens when, in game, you right click on the block.

     

    Container

    package blfngl.fallout.container;
    
    import blfngl.fallout.Fallout;
    import net.minecraft.entity.player.EntityPlayer;
    import net.minecraft.entity.player.InventoryPlayer;
    import net.minecraft.inventory.Container;
    import net.minecraft.inventory.IInventory;
    import net.minecraft.inventory.InventoryCraftResult;
    import net.minecraft.inventory.InventoryCrafting;
    import net.minecraft.inventory.Slot;
    import net.minecraft.inventory.SlotCrafting;
    import net.minecraft.item.ItemStack;
    import net.minecraft.world.World;
    
    public class ContainerPowerWelder extends Container
    {
    
    public InventoryCrafting craftMatrix;
    public IInventory craftResult;
    private World worldObj;
    private int posX;
    private int posY;
    private int posZ;
    
    public ContainerPowerWelder(InventoryPlayer inventoryplayer, World world, int i, int j, int k)
    {
    	craftMatrix = new InventoryCrafting(this, 5, 5);
    	craftResult = new InventoryCraftResult();
    	worldObj = world;
    	posX = i;
    	posY = j;
    	posZ = k;
    	this.addSlotToContainer(new SlotCrafting(inventoryplayer.player, craftMatrix, craftResult, 0, 131, 36));
    	System.out.println("1");
    	for(int l = 0; l < 5; l++)
    	{
    		for(int k1 = 0; k1 < 5; k1++)
    		{
    			this.addSlotToContainer(new Slot(craftMatrix, k1 + l * 5, 4 + k1 * 18, 3 + l * 18));
    		}
    
    	}
    	System.out.println("2");
    	for(int i1 = 0; i1 < 3; i1++)
    	{
    		for(int l1 = 0; l1 < 9; l1++)
    		{
    			this.addSlotToContainer(new Slot(inventoryplayer, l1 + i1 * 9 + 9, 8 + l1 * 18, 94 + i1 * 18));
    		}
    
    	}
    	System.out.println("3");
    	for(int j1 = 0; j1 < 9; j1++)
    	{
    		this.addSlotToContainer(new Slot(inventoryplayer, j1, 8 + j1 * 18, 148));
    	}
    
    	onCraftMatrixChanged(craftMatrix);
    }
    
    public void onCraftMatrixChanged(IInventory iinventory)
    {
    	craftResult.setInventorySlotContents(0, PowerWelderCraftingManager.getInstance().findMatchingRecipe(craftMatrix, worldObj));
    }
    
    public void onContainerClosed(EntityPlayer entityplayer)
    {
    	super.onContainerClosed(entityplayer);
    	if(worldObj.isRemote)
    	{
    		return;
    	}
    	for(int i = 0; i < 25; i++)
    	{
    		ItemStack itemstack = craftMatrix.getStackInSlot(i);
    		if(itemstack != null)
    		{
    			entityplayer.entityDropItem(itemstack, 1.0F);
    		}
    	}
    
    }
    
    public boolean canInteractWith(EntityPlayer entityplayer)
    {
    	if(worldObj.getBlock(posX, posY, posZ) != Fallout.powerArmorWelder)
    	{
    		return false;
    	} else
    	{
    		return entityplayer.getDistanceSq((double)posX + 0.5D, (double)posY + 0.5D, (double)posZ + 0.5D) <= 64D;
    	}
    }
    
    public ItemStack transferStackInSlot(EntityPlayer par1EntityPlayer, int par2)
    {
    	ItemStack itemstack = null;
    	Slot slot = (Slot)inventorySlots.get(par2);
    	if(slot != null && slot.getHasStack())
    	{
    		ItemStack itemstack1 = slot.getStack();
    		itemstack = itemstack1.copy();
    		if(par2 == 0)
    		{
    			if(!mergeItemStack(itemstack1, 10, 46, true))
    			{
    				return null;
    			}
    		} else
    			if(par2 >= 10 && par2 < 37)
    			{
    				if(!mergeItemStack(itemstack1, 37, 46, false))
    				{
    					return null;
    				}
    			} else
    				if(par2 >= 37 && par2 < 46)
    				{
    					if(!mergeItemStack(itemstack1, 10, 37, false))
    					{
    						return null;
    					}
    				} else
    					if(!mergeItemStack(itemstack1, 10, 46, false))
    					{
    						return null;
    					}
    		if(itemstack1.stackSize == 0)
    		{
    			slot.putStack(null);
    		} else
    		{
    			slot.onSlotChanged();
    		}
    		if(itemstack1.stackSize != itemstack.stackSize)
    		{
    			slot.onPickupFromSlot(par1EntityPlayer, itemstack1);
    		} else
    		{
    			return null;
    		}
    	}
    	return itemstack;
    }
    }

     

     

    Block

    package blfngl.fallout.block;
    
    import net.minecraft.block.Block;
    import net.minecraft.block.material.Material;
    import net.minecraft.creativetab.CreativeTabs;
    import net.minecraft.entity.player.EntityPlayer;
    import net.minecraft.tileentity.TileEntity;
    import net.minecraft.world.World;
    import blfngl.fallout.Fallout;
    
    public class BlockPowerWelder extends Block
    {
    public BlockPowerWelder()
    {
    	super(Material.ground);
    	this.setCreativeTab(CreativeTabs.tabBlock);
    }
    
    @Override
    public boolean onBlockActivated(World var1, int var2, int var3, int var4, EntityPlayer player, int var6, float var7, float var8, float var9)
    {
    	TileEntity tileEntity = var1.getTileEntity(var2, var3, var4);
    
    	if (player.isSneaking()) // || tileEntity == null)
    	{
    		return false;
    	}
    	else
    	{		
    		player.openGui(Fallout.fallout, 0, var1, var2, var3, var4);
    		return false;
    	}		
    }
    }

     

     

    This line causes the issues:

    player.openGui(Fallout.fallout, 0, var1, var2, var3, var4);

     

    Error report

    ---- Minecraft Crash Report ----
    // Hi. I'm Minecraft, and I'm a crashaholic.
    
    Time: 7/3/14 1:25 AM
    Description: Unexpected error
    
    java.lang.NullPointerException: Unexpected error
    at cpw.mods.fml.common.network.NetworkRegistry.getLocalGuiContainer(NetworkRegistry.java:263)
    at cpw.mods.fml.common.network.internal.FMLNetworkHandler.openGui(FMLNetworkHandler.java:93)
    at net.minecraft.entity.player.EntityPlayer.openGui(EntityPlayer.java:2515)
    at blfngl.fallout.block.BlockPowerWelder.onBlockActivated(BlockPowerWelder.java:30)
    at net.minecraft.client.multiplayer.PlayerControllerMP.onPlayerRightClick(PlayerControllerMP.java:380)
    at net.minecraft.client.Minecraft.func_147121_ag(Minecraft.java:1499)
    at net.minecraft.client.Minecraft.runTick(Minecraft.java:2012)
    at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:997)
    at net.minecraft.client.Minecraft.run(Minecraft.java:912)
    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 cpw.mods.fml.common.network.NetworkRegistry.getLocalGuiContainer(NetworkRegistry.java:263)
    at cpw.mods.fml.common.network.internal.FMLNetworkHandler.openGui(FMLNetworkHandler.java:93)
    at net.minecraft.entity.player.EntityPlayer.openGui(EntityPlayer.java:2515)
    at blfngl.fallout.block.BlockPowerWelder.onBlockActivated(BlockPowerWelder.java:30)
    at net.minecraft.client.multiplayer.PlayerControllerMP.onPlayerRightClick(PlayerControllerMP.java:380)
    at net.minecraft.client.Minecraft.func_147121_ag(Minecraft.java:1499)
    
    -- Affected level --
    Details:
    Level name: MpServer
    All players: 1 total; [EntityClientPlayerMP['Player988'/366, l='MpServer', x=204.50, y=74.62, z=193.50]]
    Chunk stats: MultiplayerChunkCache: 225, 225
    Level seed: 0
    Level generator: ID 00 - default, ver 1. Features enabled: false
    Level generator options: 
    Level spawn location: World: (208,64,192), Chunk: (at 0,4,0 in 13,12; contains blocks 208,0,192 to 223,255,207), Region: (0,0; contains chunks 0,0 to 31,31, blocks 0,0,0 to 511,255,511)
    Level time: 217753 game time, 38699 day time
    Level dimension: 0
    Level storage version: 0x00000 - Unknown?
    Level weather: Rain time: 0 (now: true), thunder time: 0 (now: false)
    Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: false
    Forced entities: 118 total; [EntityCreeper['Creeper'/273, l='MpServer', x=286.16, y=64.00, z=237.00], EntityCreeper['Creeper'/272, l='MpServer', x=275.75, y=35.00, z=224.94], EntityWitch['Witch'/258, l='MpServer', x=279.50, y=70.00, z=167.50], EntityChicken['Chicken'/256, l='MpServer', x=269.76, y=66.02, z=127.40], EntityBat['Bat'/257, l='MpServer', x=281.56, y=37.23, z=158.45], EntityCreeper['Creeper'/262, l='MpServer', x=278.72, y=22.00, z=207.72], EntityCreeper['Creeper'/263, l='MpServer', x=280.58, y=22.00, z=211.72], EntityZombie['Zombie'/260, l='MpServer', x=284.88, y=31.00, z=197.53], EntityChicken['Chicken'/261, l='MpServer', x=283.47, y=64.00, z=204.53], EntityCreeper['Creeper'/266, l='MpServer', x=282.00, y=22.00, z=210.63], EntityBat['Bat'/267, l='MpServer', x=281.63, y=22.73, z=211.60], EntityCreeper['Creeper'/264, l='MpServer', x=281.00, y=22.00, z=210.94], EntityCreeper['Creeper'/265, l='MpServer', x=281.50, y=22.00, z=214.50], EntityBat['Bat'/270, l='MpServer', x=274.44, y=38.70, z=216.30], EntitySkeleton['Skeleton'/271, l='MpServer', x=276.31, y=36.00, z=229.47], EntityBat['Bat'/268, l='MpServer', x=275.50, y=22.82, z=206.72], EntityZombie['Zombie'/269, l='MpServer', x=279.44, y=35.00, z=220.00], EntityCreeper['Creeper'/76, l='MpServer', x=125.56, y=56.00, z=155.00], EntityCreeper['Creeper'/78, l='MpServer', x=126.50, y=47.00, z=238.50], EntityCreeper['Creeper'/80, l='MpServer', x=126.41, y=23.00, z=244.22], EntityZombie['Zombie'/93, l='MpServer', x=136.69, y=57.00, z=157.50], EntityZombie['Zombie'/92, l='MpServer', x=135.63, y=57.00, z=157.50], EntityChicken['Chicken'/95, l='MpServer', x=131.63, y=56.00, z=152.56], EntityZombie['Zombie'/94, l='MpServer', x=135.38, y=63.00, z=146.50], EntitySquid['Squid'/88, l='MpServer', x=141.40, y=59.26, z=137.19], EntityZombie['Zombie'/102, l='MpServer', x=142.56, y=28.00, z=192.78], EntitySkeleton['Skeleton'/103, l='MpServer', x=141.55, y=38.00, z=252.70], EntityZombie['Zombie'/100, l='MpServer', x=142.34, y=29.00, z=187.94], EntityBat['Bat'/101, l='MpServer', x=133.00, y=28.58, z=205.38], EntityZombie['Zombie'/98, l='MpServer', x=137.16, y=45.00, z=167.44], EntityCreeper['Creeper'/99, l='MpServer', x=138.97, y=22.00, z=179.50], EntitySkeleton['Skeleton'/96, l='MpServer', x=132.44, y=18.00, z=160.06], EntityZombie['Zombie'/97, l='MpServer', x=136.31, y=45.00, z=167.66], EntityChicken['Chicken'/104, l='MpServer', x=133.59, y=64.00, z=250.59], EntityChicken['Chicken'/105, l='MpServer', x=136.63, y=64.00, z=267.59], EntitySquid['Squid'/119, l='MpServer', x=148.33, y=59.00, z=140.04], EntitySquid['Squid'/118, l='MpServer', x=149.18, y=59.38, z=141.63], EntitySquid['Squid'/117, l='MpServer', x=149.32, y=59.00, z=142.74], EntitySquid['Squid'/116, l='MpServer', x=147.53, y=59.32, z=142.13], EntitySquid['Squid'/127, l='MpServer', x=156.89, y=59.13, z=146.50], EntityItem['item.item.dyePowder.black'/126, l='MpServer', x=158.13, y=48.13, z=155.88], EntityItem['item.item.dyePowder.black'/125, l='MpServer', x=152.33, y=29.13, z=147.86], EntityItem['item.item.dyePowder.black'/124, l='MpServer', x=154.91, y=34.13, z=148.13], EntityClientPlayerMP['Player988'/366, l='MpServer', x=204.50, y=74.62, z=193.50], EntityCreeper['Creeper'/123, l='MpServer', x=149.50, y=20.00, z=153.50], EntityCreeper['Creeper'/122, l='MpServer', x=152.50, y=18.00, z=151.41], EntitySkeleton['Skeleton'/121, l='MpServer', x=147.94, y=18.00, z=145.53], EntityZombie['Zombie'/120, l='MpServer', x=157.41, y=14.00, z=155.75], EntitySquid['Squid'/141, l='MpServer', x=159.07, y=57.00, z=139.50], EntityChicken['Chicken'/143, l='MpServer', x=172.82, y=62.27, z=144.53], EntityBat['Bat'/142, l='MpServer', x=157.46, y=16.89, z=150.35], EntityBat['Bat'/129, l='MpServer', x=147.63, y=38.10, z=172.38], EntitySquid['Squid'/128, l='MpServer', x=154.50, y=59.42, z=145.50], EntitySkeleton['Skeleton'/131, l='MpServer', x=150.91, y=13.00, z=179.50], EntitySkeleton['Skeleton'/130, l='MpServer', x=158.59, y=69.00, z=175.94], EntityZombie['Zombie'/133, l='MpServer', x=158.38, y=72.00, z=192.53], EntityZombie['Zombie'/132, l='MpServer', x=147.50, y=26.00, z=186.94], EntityChicken['Chicken'/135, l='MpServer', x=155.41, y=63.00, z=255.47], EntityChicken['Chicken'/134, l='MpServer', x=149.56, y=63.00, z=250.47], EntityChicken['Chicken'/152, l='MpServer', x=178.67, y=72.00, z=172.33], EntityChicken['Chicken'/153, l='MpServer', x=178.44, y=71.00, z=227.47], EntitySkeleton['Skeleton'/154, l='MpServer', x=184.50, y=98.00, z=244.88], EntitySkeleton['Skeleton'/155, l='MpServer', x=183.63, y=98.00, z=247.03], EntityCreeper['Creeper'/156, l='MpServer', x=176.56, y=52.00, z=258.75], EntityCreeper['Creeper'/157, l='MpServer', x=176.34, y=52.00, z=261.09], EntityItem['item.item.dyePowder.black'/144, l='MpServer', x=165.88, y=48.13, z=154.88], EntityZombie['Zombie'/145, l='MpServer', x=165.56, y=23.00, z=252.00], EntityChicken['Chicken'/146, l='MpServer', x=164.47, y=71.00, z=249.66], EntityChicken['Chicken'/151, l='MpServer', x=176.41, y=67.00, z=136.66], EntityChicken['Chicken'/165, l='MpServer', x=202.20, y=78.00, z=266.21], EntityChicken['Chicken'/182, l='MpServer', x=213.59, y=73.00, z=205.41], EntitySkeleton['Skeleton'/181, l='MpServer', x=212.98, y=19.00, z=117.44], EntityChicken['Chicken'/204, l='MpServer', x=225.53, y=72.00, z=257.44], EntityCreeper['Creeper'/201, l='MpServer', x=228.53, y=33.00, z=262.56], EntityBat['Bat'/200, l='MpServer', x=239.38, y=38.10, z=268.34], EntityCreeper['Creeper'/203, l='MpServer', x=227.50, y=41.00, z=262.75], EntityCreeper['Creeper'/202, l='MpServer', x=226.84, y=41.00, z=264.09], EntityBat['Bat'/197, l='MpServer', x=227.65, y=33.92, z=231.66], EntityBat['Bat'/196, l='MpServer', x=228.75, y=35.10, z=222.75], EntityChicken['Chicken'/199, l='MpServer', x=233.44, y=75.00, z=251.44], EntityMinecartChest['entity.MinecartChest.name'/198, l='MpServer', x=236.50, y=41.50, z=255.50], EntityBat['Bat'/193, l='MpServer', x=225.25, y=11.33, z=170.33], EntitySkeleton['Skeleton'/195, l='MpServer', x=234.31, y=20.00, z=216.53], EntitySkeleton['Skeleton'/194, l='MpServer', x=235.69, y=24.00, z=163.75], EntityZombie['Zombie'/223, l='MpServer', x=257.50, y=13.00, z=120.34], EntityChicken['Chicken'/216, l='MpServer', x=254.47, y=65.00, z=195.53], EntityMinecartChest['entity.MinecartChest.name'/217, l='MpServer', x=255.50, y=36.50, z=237.50], EntityChicken['Chicken'/218, l='MpServer', x=245.53, y=70.00, z=224.59], EntityChicken['Chicken'/219, l='MpServer', x=241.60, y=78.00, z=224.47], EntityZombie['Zombie'/212, l='MpServer', x=251.75, y=11.00, z=139.53], EntityZombie['Zombie'/213, l='MpServer', x=247.47, y=33.00, z=131.03], EntityBat['Bat'/214, l='MpServer', x=256.26, y=12.54, z=142.38], EntityCreeper['Creeper'/215, l='MpServer', x=249.64, y=60.00, z=205.78], EntityZombie['Zombie'/211, l='MpServer', x=247.41, y=12.00, z=118.56], EntityZombie['Zombie'/239, l='MpServer', x=267.63, y=38.00, z=214.47], EntityZombie['Zombie'/238, l='MpServer', x=271.72, y=49.00, z=194.44], EntityBat['Bat'/237, l='MpServer', x=276.76, y=23.04, z=207.66], EntitySkeleton['Skeleton'/236, l='MpServer', x=264.88, y=18.00, z=192.47], EntityCreeper['Creeper'/235, l='MpServer', x=268.53, y=22.00, z=207.03], EntityChicken['Chicken'/234, l='MpServer', x=264.81, y=62.62, z=188.56], EntityChicken['Chicken'/233, l='MpServer', x=258.44, y=71.00, z=147.56], EntityChicken['Chicken'/232, l='MpServer', x=261.59, y=71.00, z=146.53], EntityChicken['Chicken'/231, l='MpServer', x=258.41, y=70.00, z=124.68], EntitySkeleton['Skeleton'/230, l='MpServer', x=269.50, y=34.00, z=128.88], EntitySkeleton['Skeleton'/229, l='MpServer', x=275.13, y=33.00, z=128.53], EntityZombie['Zombie'/228, l='MpServer', x=261.34, y=19.00, z=131.03], EntitySkeleton['Skeleton'/227, l='MpServer', x=271.50, y=30.00, z=133.84], EntityBat['Bat'/226, l='MpServer', x=271.29, y=12.20, z=124.44], EntityChicken['Chicken'/225, l='MpServer', x=270.53, y=65.00, z=126.81], EntityZombie['Zombie'/224, l='MpServer', x=271.38, y=30.00, z=117.06], EntityChicken['Chicken'/255, l='MpServer', x=277.06, y=64.41, z=133.22], EntityBat['Bat'/252, l='MpServer', x=274.75, y=5.10, z=133.22], EntityZombie['Zombie'/253, l='MpServer', x=282.94, y=19.00, z=142.50], EntityChicken['Chicken'/251, l='MpServer', x=277.44, y=64.00, z=120.47], EntityZombie['Zombie'/249, l='MpServer', x=275.30, y=3.00, z=127.70], EntitySkeleton['Skeleton'/242, l='MpServer', x=257.50, y=46.00, z=241.69], EntitySkeleton['Skeleton'/240, l='MpServer', x=262.94, y=56.00, z=213.53], EntityChicken['Chicken'/241, l='MpServer', x=267.72, y=67.00, z=232.22]]
    Retry entities: 0 total; []
    Server brand: fml,forge
    Server type: Integrated singleplayer server
    Stacktrace:
    at net.minecraft.client.multiplayer.WorldClient.addWorldInfoToCrashReport(WorldClient.java:412)
    at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Minecraft.java:2524)
    at net.minecraft.client.Minecraft.run(Minecraft.java:941)
    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: 862782072 bytes (822 MB) / 1056309248 bytes (1007 MB) up to 1056309248 bytes (1007 MB)
    JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
    AABB Pool Size: 9779 (547624 bytes; 0 MB) allocated, 2 (112 bytes; 0 MB) used
    IntCache: cache: 0, tcache: 0, allocated: 13, tallocated: 95
    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->Initialized->Post-initialized->Available->Available->Available->Available
    FML{7.2.211.1121} [Forge Mod Loader] (forgeSrc-1.7.2-10.12.2.1121.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
    Forge{10.12.2.1121} [Minecraft Forge] (forgeSrc-1.7.2-10.12.2.1121.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
    PlayerAPI{1.4} [Player API] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
    fallout{v0.3} [The Fallout Mod] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
    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: 3319 (185864 bytes; 0 MB) allocated, 16 (896 bytes; 0 MB) used
    Anisotropic Filtering: Off (1)

     

  11. 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;
            }
        }
    }

     

  12. 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.");
    }
    }
    

     

  13. 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);

     

  14. The item is called ultrajet.

     

    Main Class:

    package blfngl.fallout;
    
    import net.minecraft.creativetab.CreativeTabs;
    import net.minecraft.init.Blocks;
    import net.minecraft.init.Items;
    import net.minecraft.item.Item;
    import net.minecraft.item.ItemStack;
    import blfngl.fallout.init.Consumables;
    import blfngl.fallout.init.Miscellaneous;
    import blfngl.fallout.item.FalloutItem;
    import cpw.mods.fml.common.Mod;
    import cpw.mods.fml.common.Mod.EventHandler;
    import cpw.mods.fml.common.Mod.Instance;
    import cpw.mods.fml.common.event.FMLInitializationEvent;
    import cpw.mods.fml.common.event.FMLPostInitializationEvent;
    import cpw.mods.fml.common.event.FMLPreInitializationEvent;
    import cpw.mods.fml.common.registry.GameRegistry;
    
    @Mod(modid = "fallout", version = "v0.1")
    public class Fallout
    {
    @Instance("fallout")
    public static Fallout instance;
    
    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 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 CreativeTabs tabFood = new FalloutTab(CreativeTabs.getNextID(), "TabFood", Items.iron_axe);
    public static CreativeTabs tabMiscellaneous = new FalloutTab(CreativeTabs.getNextID(), "TabMiscellaneous", Items.iron_axe);
    public static CreativeTabs tabChems = new FalloutTab(CreativeTabs.getNextID(), "TabChems", Items.iron_axe);
    
    @EventHandler
    public void preInit(FMLPreInitializationEvent event)
    {
    	Miscellaneous.init();
    	Consumables.init();
    }
    
    @EventHandler
    public void init(FMLInitializationEvent event)
    {
    
    }
    
    @EventHandler
    public static void postInit(FMLPostInitializationEvent event)
    {
    	System.out.println("Fallout Mod Loaded.");
    }
    }
    

     

     

    Registry:

    ultrajet = new ItemChems(Potion.digSpeed, 240, jetInhaler, 2).setUnlocalizedName("ultrajet");
    	GameRegistry.registerItem(ultrajet, "UltraJet");

     

×
×
  • Create New...

Important Information

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