Jump to content

Coding a gun problems [RENDERING]


MinecraftWero

Recommended Posts

hey guys i know im really annoying but i just want to finish the gun. So i made this mod called The bacon mod

link: http://www.minecraftforum.net/topic/1499035-132-bacon-mod-v10-forge/

 

and i want to add a "Bacon Gun" so i decided to give it a try and it works pretty well, it has sounds, and it hurts the mobs but the problem is the bullet i dont know how to render it i have try with alot of stuff, i tried using render arrow.class and it didnt work it was still invisible, 3 modders helped me but no one could tell me what the problem was so i hope you guys tell me how to do it, if you can here is my skype name: weeroo96

 

and here are the codes:

ItemBaconGun.class

 

 

package minecraftwero.common; //CHANGE THIS

import cpw.mods.fml.common.Side;
import cpw.mods.fml.common.asm.SideOnly;
import net.minecraft.src.CreativeTabs;
import net.minecraft.src.EntityPlayer;
import net.minecraft.src.Item;
import net.minecraft.src.ItemStack;
import net.minecraft.src.World;

public class ItemBaconGun extends Item{

//These are all of our base variables for our gun
private int damage; //Damage in half-hearts
private int reloadtick; //The current value of our reloading timer
private int reloadmax; //The value that the reloadtick variable needs to be in order for the gun to reload
private int clipid; //The item id of our clip
private int ammo; //The amount of ammo avaliable per clip (used in setting durability)
private int firetick; //The current value of our shooting timer
private int firemax; //The value that the firetick variable needs to be in order for the gun to fire
//Fire delay is completely ignored when firemax is set to 0
private String firesound; //The String that notch uses in his code to figure out what sound to play when we shoot our gun
private String reloadsound; //Firesound but with reloading

//The parameters for our constructor are:
//int i (the id), int damage (damage in half-hearts), int ammo (how much ammo per clip)
//int clipid (the item id of the clip this gun uses), int firedelay (the value of firemax)
//String firesound (the value of firesound), String reloadsound (the value of reloadsound)
public ItemBaconGun(int i, int damage, int ammo, int clipid, int firedelay, String firesound, String reloadsound){

  super(i); //calls the Item.java constructor and passes in the item id for a parameter
this.damage = damage; //sets the damage value
  firemax = firedelay; //sets the firemax value
  firetick = firemax; //sets the firetick value equal to firemax (so you don't need to wait for the delay on the first shot)
  reloadmax = 2; //sets the reload max
  reloadtick = 0; //sets the reloadtick to 0
  this.ammo = ammo; //sets the ammo
  this.clipid = clipid; //sets the clipid
  this.firesound = firesound; //sets the firesound
  this.reloadsound = reloadsound; //sets the reloadsound
  setMaxStackSize(1); //sets the max stack size to one
  setMaxDamage(ammo + 1); //sets the durability of our gun to the ammo count + 1
  this.setTabToDisplayOn(CreativeTabs.tabCombat);
}

public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer){

  //Checks if the player has enough ammo
  if(!par2World.isRemote && par1ItemStack.getItemDamage() < ammo){
  
   //if the firemax isn't 0, and the fireing counter is done, then this is true
   if(firetick == firemax && firemax != 0){
   
        //spawns the bullet
        par2World.spawnEntityInWorld(new EntityBullet(par2World, par3EntityPlayer, damage, 1));
        //plays the sound effect
        par2World.playSoundAtEntity(par3EntityPlayer, firesound, 1F, 1F);
        //damages the gun
        par1ItemStack.damageItem(1, par3EntityPlayer);
        //resets the fire delay counter
        firetick = 0;
   
   }else{
   
        //if the fire delay counter isn't done, then this is called, which increases the fire delay counter
        ++firetick;
   }
  
   //if firemax is 0 none of  the above was called, so call this instead
   if(firemax == 0){
   
        par2World.spawnEntityInWorld(new EntityBullet(par2World, par3EntityPlayer, damage, 1));
        par2World.playSoundAtEntity(par3EntityPlayer, firesound, 1F, 1F);
        par1ItemStack.damageItem(1, par3EntityPlayer);
        //already explained...
   }
  
  //If the player is out of ammo in the current clip, and the player has the correct clip, run this code
  }else if(!par2World.isRemote && par3EntityPlayer.inventory.hasItem(clipid) && par1ItemStack.getItemDamage() == ammo){
  
   //checks for the reload timer to complete
   if(reloadtick == reloadmax){
   
        //resets the reload timer
        reloadtick = 0;
        //plays the reload sound
        par2World.playSoundAtEntity(par3EntityPlayer, reloadsound, 1F, 1F);
        //consumes the item of the clipid
        par3EntityPlayer.inventory.consumeInventoryItem(clipid);
        //resets the ammo of the gun
        par1ItemStack.setItemDamage(0);
   
   }else{
   
        //just like with firetick and firemax...
        ++reloadtick;
   }
  }

  //just some housekeeping stuff
  return par1ItemStack;
}

public void onPlayerStoppedUsing(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer, int i){

  //this resets the firetick. I originally planned on using this method for non-automatic weapons
  //but the method didn't seem to end up being called at all... if someone could clarify why this is
  //happening I would appreciate it...
  firetick = firemax;
}

//CHANGE THIS TO YOUR BLOCK/IMAGE SPRITE
@SideOnly(Side.CLIENT)
public String getTextureFile(){
return "/BaconTextures/baconTex.png";
}


}

 

 

 

EntityBullet.class

 

 

package minecraftwero.common; //CHANGE THIS
import java.util.List;
import java.util.Random;
import net.minecraft.client.Minecraft;
import net.minecraft.src.AxisAlignedBB;
import net.minecraft.src.Block;
import net.minecraft.src.Entity;
import net.minecraft.src.EntityDamageSource;
import net.minecraft.src.EntityLiving;
import net.minecraft.src.EntityPlayer;
import net.minecraft.src.Item;
import net.minecraft.src.ItemStack;
import net.minecraft.src.MathHelper;
import net.minecraft.src.MovingObjectPosition;
import net.minecraft.src.NBTTagCompound;
import net.minecraft.src.Vec3;
import net.minecraft.src.Vec3Pool;
import net.minecraft.src.World;
public class EntityBullet extends Entity
{
                private int xTile;
                private int yTile;
                private int zTile;
                private int inTile;
                private boolean inGround;
                public int arrowShake;
                public EntityLiving shootingEntity;
                private int timeTillDeath;
                private int flyTime;
                private EntityPlayer owner;
                private int damage;
                private final float size = 1F;
           
                public EntityBullet(World world)
                {
                                super(world);
                                xTile = -1;
                                yTile = -1;
                                zTile = -1;
                                inTile = 0;
                                inGround = false;
                                arrowShake = 0;
                                flyTime = 0;
                                setSize(size, size);
                }
                public EntityBullet(World world, double d, double d1, double d2,
                                                double d3, double d4, double d5, EntityPlayer entityplayer)
                {
                                super(world);
                                xTile = -1;
                                yTile = -1;
                                zTile = -1;
                                inTile = 0;
                                inGround = false;
                                arrowShake = 0;
                                flyTime = 0;
                                setSize(size, size);
                                setPosition(d, d1, d2);
                                yOffset = 0.0F;
                                setVelocity(d3, d4, d5);
                                owner = entityplayer;
                }
                public EntityBullet(World world, double d, double d1, double d2)
                {
                                super(world);
                                xTile = -1;
                                yTile = -1;
                                zTile = -1;
                                inTile = 0;
                                inGround = false;
                                arrowShake = 0;
                                flyTime = 0;
                                setSize(size, size);
                                setPosition(d, d1, d2);
                                yOffset = 0.0F;
                }
                public EntityBullet(World world, EntityLiving entityliving, int damage, int accuracy)
                {
                                super(world);
                                this.damage = damage;
                                xTile = -1;
                                yTile = -1;
                                zTile = -1;
                                inTile = 0;
                                inGround = false;
                                arrowShake = 0;
                                flyTime = 0;
                                shootingEntity = entityliving;
                                setSize(size, size);
                                setLocationAndAngles(entityliving.posX, entityliving.posY + (double)entityliving.getEyeHeight(), entityliving.posZ, entityliving.rotationYaw, entityliving.rotationPitch);
                                posX -= MathHelper.cos((rotationYaw / 180F) * 3.141593F) * 0.16F;
                                posY -= 0.10000000149011612D;
                                posZ -= MathHelper.sin((rotationYaw / 180F) * 3.141593F) * 0.16F;
                                setPosition(posX, posY, posZ);
                                yOffset = 0.0F;
                                motionX = 1000F * -MathHelper.sin((rotationYaw / 180F) * 3.141593F) * MathHelper.cos((rotationPitch / 180F) * 3.141593F);
                                motionZ = 1000F * MathHelper.cos((rotationYaw / 180F) * 3.141593F) * MathHelper.cos((rotationPitch / 180F) * 3.141593F);
                                motionY = 1000F * -MathHelper.sin((rotationPitch / 180F) * 3.141593F);
                                setArrowHeading(motionX, motionY, motionZ, 200.0F, 1.5F, accuracy);
                }
                protected void entityInit()
                {
                }
                public void setArrowHeading(double d, double d1, double d2, float f,
                                                float f1, int i)
                {
                                float f2 = MathHelper.sqrt_double(d * d + d1 * d1 + d2 * d2);
                                d /= f2;
                                d1 /= f2;
                                d2 /= f2;
                                d += rand.nextGaussian() * 0.0034999998323619365D * (double)f1 * (double)i / 5;
                                d1 += rand.nextGaussian() * 0.0034999998323619365D * (double)f1 * (double)i / 5;
                                d2 += rand.nextGaussian() * 0.0034999998323619365D * (double)f1 * (double)i / 5;
                                d *= f;
                                d1 *= f;
                                d2 *= f;
                                motionX = d;
                                motionY = d1;
                                motionZ = d2;
                                float f3 = MathHelper.sqrt_double(d * d + d2 * d2);
                                prevRotationYaw = rotationYaw = (float)((Math.atan2(d, d2) * 180D) / 3.1415927410125732D);
                                prevRotationPitch = rotationPitch = (float)((Math.atan2(d1, f3) * 180D) / 3.1415927410125732D);
                                timeTillDeath = 0;
                }
                public void setVelocity(double d, double d1, double d2)
                {
                                motionX = d;
                                motionY = d1;
                                motionZ = d2;
                                if (prevRotationPitch == 0.0F && prevRotationYaw == 0.0F)
                                {
                                                float f = MathHelper.sqrt_double(d * d + d2 * d2);
                                                prevRotationYaw = rotationYaw = (float)((Math.atan2(d, d2) * 180D) / 3.1415927410125732D);
                                                prevRotationPitch = rotationPitch = (float)((Math.atan2(d1, f) * 180D) / 3.1415927410125732D);
                                }
                }
                public void onUpdate()
                {
                                super.onUpdate();
                                if (flyTime > 1000)
                                {
                                                setDead();
                                }
                                if (prevRotationPitch == 0.0F && prevRotationYaw == 0.0F)
                                {
                                                float f = MathHelper.sqrt_double(motionX * motionX + motionZ * motionZ);
                                                prevRotationYaw = rotationYaw = (float)((Math.atan2(motionX, motionZ) * 180D) / 3.1415927410125732D);
                                                prevRotationPitch = rotationPitch = (float)((Math.atan2(motionY, f) * 180D) / 3.1415927410125732D);
                                }
                                if (arrowShake > 0)
                                {
                                                arrowShake--;
                                }
                                if (inGround)
                                {
                                                int i = worldObj.getBlockId(xTile, yTile, zTile);
                                                if (i != inTile)
                                                {
                                                                inGround = false;
                                                                motionX *= rand.nextFloat() * 0.2F;
                                                                motionY *= rand.nextFloat() * 0.2F;
                                                                motionZ *= rand.nextFloat() * 0.2F;
                                                                timeTillDeath = 0;
                                                                flyTime = 0;
                                                }
                                                else
                                                {
                                                                timeTillDeath++;
                                                                if (timeTillDeath == 1200)
                                                                {
                                                                                setDead();
                                                                }
                                                                return;
                                                }
                                }
                                else
                                {
                                                flyTime++;
                                }
                                Vec3 vec3d = Vec3.getVec3Pool().getVecFromPool(posX, posY, posZ);
                                Vec3 vec3d1 = Vec3.getVec3Pool().getVecFromPool(posX + motionX, posY + motionY, posZ + motionZ);
                                MovingObjectPosition movingobjectposition = worldObj.rayTraceBlocks(vec3d, vec3d1);
                                vec3d = Vec3.getVec3Pool().getVecFromPool(posX, posY, posZ);
                                vec3d1 = Vec3.getVec3Pool().getVecFromPool(posX + motionX, posY + motionY, posZ + motionZ);
                                if (movingobjectposition != null)
                                {
                                                vec3d1 = Vec3.getVec3Pool().getVecFromPool(movingobjectposition.hitVec.xCoord, movingobjectposition.hitVec.yCoord, movingobjectposition.hitVec.zCoord);
                                }
                                Entity entity = null;
                                List list = worldObj.getEntitiesWithinAABBExcludingEntity(this, boundingBox.addCoord(motionX, motionY, motionZ).expand(1.0D, 1.0D, 1.0D));
                                double d = 0.0D;
                                for (int j = 0; j < list.size(); j++)
                                {
                                                Entity entity1 = (Entity)list.get(j);
                                                if (!entity1.canBeCollidedWith() || entity1 == shootingEntity && flyTime < 5)
                                                {
                                                                continue;
                                                }
                                                float f4 = 0.3F;
                                                AxisAlignedBB axisalignedbb = entity1.boundingBox.expand(f4, f4, f4);
                                                MovingObjectPosition movingobjectposition1 = axisalignedbb.calculateIntercept(vec3d, vec3d1);
                                                if (movingobjectposition1 == null)
                                                {
                                                                continue;
                                                }
                                                double d1 = vec3d.distanceTo(movingobjectposition1.hitVec);
                                                if (d1 < d || d == 0.0D)
                                                {
                                                                entity = entity1;
                                                                d = d1;
                                                }
                                }
                                if (entity != null)
                                {
                                                movingobjectposition = new MovingObjectPosition(entity);
                                }
                                if (movingobjectposition != null)
                                {
                                                if (movingobjectposition.entityHit != null)
                                                {
                                                                if (movingobjectposition.entityHit.attackEntityFrom(new EntityDamageSource("player", owner), damage))
                                                                {
                                                                                worldObj.playSoundAtEntity(this, "BulletHit", 1.0F, 1.2F / (rand.nextFloat() * 0.2F + 0.9F));
                                                                                setDead();
                                                                }
                                                                else
                                                                {
                                                                                motionX *= 0.10000000149011612D;
                                                                                motionY *= 0.10000000149011612D;
                                                                                motionZ *= 0.10000000149011612D;
                                                                                flyTime = 0;
                                                                                setDead();
                                                                }
                                                }
                                                else
                                                {
                                                                xTile = movingobjectposition.blockX;
                                                                yTile = movingobjectposition.blockY;
                                                                zTile = movingobjectposition.blockZ;
                                                                inTile = worldObj.getBlockId(xTile, yTile, zTile);
                                                                if (inTile == Block.glass.blockID || inTile == Block.glowStone.blockID || inTile == Block.leaves.blockID)
                                                                {
                                                                                Block block = Block.blocksList[inTile];
                                                                                //ModLoader.getMinecraftInstance().sndManager.playSound(block.stepSound.stepSoundDir(), (float)xTile + 0.5F, (float)yTile + 0.5F, (float)zTile + 0.5F, (block.stepSound.getVolume() + 1.0F) / 2.0F, block.stepSound.getPitch() * 0.8F);
                                                                                worldObj.setBlockWithNotify(xTile, yTile, zTile, 0);
                                                                }
                                                                else
                                                                {
                                                                                motionX = (float)(movingobjectposition.hitVec.xCoord - posX);
                                                                                motionY = (float)(movingobjectposition.hitVec.yCoord - posY);
                                                                                motionZ = (float)(movingobjectposition.hitVec.zCoord - posZ);
                                                                                float f1 = MathHelper.sqrt_double(motionX * motionX + motionY * motionY + motionZ * motionZ);
                                                                                posX -= (motionX / (double)f1) * 0.05000000074505806D;
                                                                                posY -= (motionY / (double)f1) * 0.05000000074505806D;
                                                                                posZ -= (motionZ / (double)f1) * 0.05000000074505806D;
                                                                                worldObj.playSoundAtEntity(this, "Bullet2Hit", 1.0F, 1.2F / (rand.nextFloat() * 0.2F + 0.9F));
                                                                                setDead();
                                                                }
                                                }
                                }
                                posX += motionX * 3D;
                                posY += motionY * 3D;
                                posZ += motionZ * 3D;
                                float f2 = MathHelper.sqrt_double(motionX * motionX + motionZ * motionZ);
                                rotationYaw = (float)((Math.atan2(motionX, motionZ) * 180D) / 3.1415927410125732D);
                                for (rotationPitch = (float)((Math.atan2(motionY, f2) * 180D) / 3.1415927410125732D); rotationPitch - prevRotationPitch < -180F; prevRotationPitch -= 360F) { }
                                for (; rotationPitch - prevRotationPitch >= 180F; prevRotationPitch += 360F) { }
                                for (; rotationYaw - prevRotationYaw < -180F; prevRotationYaw -= 360F) { }
                                for (; rotationYaw - prevRotationYaw >= 180F; prevRotationYaw += 360F) { }
                                rotationPitch = prevRotationPitch + (rotationPitch - prevRotationPitch) * 0.2F;
                                rotationYaw = prevRotationYaw + (rotationYaw - prevRotationYaw) * 0.2F;
                                float f3 = 0.99F;
                                float f5 = 0.03F;
                                if (handleWaterMovement())
                                {
                                                for (int k = 0; k < 4; k++)
                                                {
                                                                float f6 = 0.25F;
                                                                worldObj.spawnParticle("bubble", posX - motionX * (double)f6, posY - motionY * (double)f6, posZ - motionZ * (double)f6, motionX, motionY, motionZ);
                                                }
                                                f3 = 0.8F;
                                }
                                motionX *= f3;
                                motionY *= f3;
                                motionZ *= f3;
                                setPosition(posX, posY, posZ);
                }
                public void writeEntityToNBT(NBTTagCompound nbttagcompound)
                {
                                nbttagcompound.setShort("xTile", (short)xTile);
                                nbttagcompound.setShort("yTile", (short)yTile);
                                nbttagcompound.setShort("zTile", (short)zTile);
                                nbttagcompound.setByte("inTile", (byte)inTile);
                                nbttagcompound.setByte("shake", (byte)arrowShake);
                                nbttagcompound.setByte("inGround", (byte)(inGround ? 1 : 0));
                }
                public void readEntityFromNBT(NBTTagCompound nbttagcompound)
                {
                                xTile = nbttagcompound.getShort("xTile");
                                yTile = nbttagcompound.getShort("yTile");
                                zTile = nbttagcompound.getShort("zTile");
                                inTile = nbttagcompound.getByte("inTile") & 0xff;
                                arrowShake = nbttagcompound.getByte("shake") & 0xff;
                                inGround = nbttagcompound.getByte("inGround") == 1;
                }
                public void onCollideWithPlayer(EntityPlayer entityplayer)
                {
                                if (worldObj.isRemote)
                                {
                                                return;
                                }
                                if (inGround && shootingEntity == entityplayer && arrowShake <= 0 && entityplayer.inventory.addItemStackToInventory(new ItemStack(Item.arrow, 1)))
                                {
                                                worldObj.playSoundAtEntity(this, "random.pop", 0.2F, ((rand.nextFloat() - rand.nextFloat()) * 0.7F + 1.0F) * 2.0F);
                                                entityplayer.onItemPickup(this, 1);
                                                setDead();
                                }
                }
                
                
                public float getShadowSize()
                {
                                return 0.0F;
                }
}

 

 

Link to comment
Share on other sites

We need your main class (BaconMod.java or similar), your Common Proxy and Client Proxy class in order to help you.

Don't ask for support per PM! They'll get ignored! | If a post helped you, click the "Thank You" button at the top right corner of said post! |

mah twitter

This thread makes me sad because people just post copy-paste-ready code when it's obvious that the OP has little to no programming experience. This is not how learning works.

Link to comment
Share on other sites

We need your main class (BaconMod.java or similar), your Common Proxy and Client Proxy class in order to help you.

 

here:

 

BaconMod.java

 

 

package minecraftwero.common;

import java.io.File;

import net.minecraft.client.Minecraft;
import net.minecraft.src.BiomeCache;
import net.minecraft.src.BiomeGenBase;
import net.minecraft.src.BiomeGenForest;
import net.minecraft.src.Block;
import net.minecraft.src.BlockCake;
import net.minecraft.src.BlockFlower;
import net.minecraft.src.CreativeTabs;
import net.minecraft.src.Entity;
import net.minecraft.src.EnumArmorMaterial;
import net.minecraft.src.EnumCreatureType;
import net.minecraft.src.EnumToolMaterial;
import net.minecraft.src.Item;
import net.minecraft.src.ItemBucket;
import net.minecraft.src.ItemFood;
import net.minecraft.src.ItemStack;
import net.minecraft.src.ModLoader;
import net.minecraft.src.Potion;
import net.minecraftforge.common.Configuration;
import net.minecraftforge.common.EnumHelper;
import net.minecraftforge.common.MinecraftForge;
import cpw.mods.fml.client.registry.RenderingRegistry;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.Init;
import cpw.mods.fml.common.Mod.PreInit;
import cpw.mods.fml.common.SidedProxy;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.registry.EntityRegistry;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.LanguageRegistry;

@Mod(modid = "MinecraftWero", name = "Bacon Mod", version = "1.0.0")
public class BaconMod {

public static Item baconGun;
public static Item baconClip;
public static BlockFlower baconFlower;
public static Block cornCrop;
public static Item baconHelmet;
public static Item baconPlate;
public static Item baconLegs;
public static Item baconBoots;
public static Block baconOre;
public static Item baconStick;
public static Item baconSword;
public static Item baconHoe;
public static Item baconPickaxe;
public static Item baconAxe;
public static Item baconSpade;
public static ItemFood cereal;
public static ItemFood rawBacon;
public static ItemFood cookedBacon;
public static ItemFood cookedEgg;
public static ItemFood baconSandwich;
public static ItemFood cheeseWheel;
public static ItemFood cheeseSlice;
public static ItemFood baconEC;
public static ItemFood gayBacon;
public static ItemFood tacoShell;
public static ItemFood taco;
public static ItemFood beer;
public static ItemFood nutella;
public static ItemFood nutellaBread;
public static ItemFood tortilla;
public static ItemFood quesadilla;
public static ItemFood rawMeat;
public static ItemFood meat;
public static ItemFood meatSoup;
public static Item cornSeeds;
public static ItemFood corn;
public static ItemFood cornKernel;
public static BiomeGenBase baconForest;

@SidedProxy(clientSide = "BaconMod.client.ClientProxyTutorial", serverSide = "minecraftwero.common.CommonProxyTutorial")
public static CommonProxyTutorial proxy;
//ToolMaterial//
static EnumToolMaterial EnumToolMaterialBacon = EnumHelper.addToolMaterial("Bacon", 3, 20000, 8.0F, 2, 15);
static EnumArmorMaterial EnumArmorMaterialBacon = EnumHelper.addArmorMaterial("Bacon",33, new int[]{3, 8, 6, 3}, 10);


@Init public void load(FMLInitializationEvent event){}{
//Entity//


//Sounds//
Minecraft mc = ModLoader.getMinecraftInstance(); 

//Events//
MinecraftForge.EVENT_BUS.register(new BoneMealEvent());
//Biome//
final BiomeGenBase baconForest = (new BiomeGenBacon(26)).setBiomeName("baconForest");
ModLoader.addBiome(baconForest);

//Mobs//
//Armor//
baconHelmet = new ItemBaconHelmet(896, EnumArmorMaterialBacon, ModLoader.addArmor("Bacon"), 0).setItemName("baconHelmet").setIconIndex(13);
baconPlate = new ItemBaconPlate(897, EnumArmorMaterialBacon, ModLoader.addArmor("Bacon"), 1).setItemName("baconPlate").setIconIndex(14);
baconLegs = new ItemBaconLegs(898, EnumArmorMaterialBacon, ModLoader.addArmor("Bacon"), 2).setItemName("baconLegs").setIconIndex(15);
baconBoots = new ItemBaconBoots(899, EnumArmorMaterialBacon, ModLoader.addArmor("Bacon"), 3).setItemName("baconBoots").setIconIndex(16);
LanguageRegistry.addName(baconHelmet, "Bacon Helmet");
LanguageRegistry.addName(baconPlate, "Bacon Plate");
LanguageRegistry.addName(baconLegs, "Bacon Leggings");
LanguageRegistry.addName(baconBoots, "Bacon Boots");

//Food//
rawBacon = (ItemFood) new ItemRawBaconFood(900, 3, true).setIconIndex(0).setItemName("rawBacon");
cookedBacon = (ItemFood) new ItemCookedBaconFood(901, 5, true).setIconIndex(1).setItemName("cookedBacon");
cookedEgg = (ItemFood) new ItemCookedEgg(902, 4, false).setIconIndex(2).setItemName("cookedEgg");
baconSandwich = (ItemFood) new ItemBaconSandwich(903, 7, false).setIconIndex(3).setItemName("baconSandwich");
cheeseWheel = (ItemFood) new ItemCheeseWheel(904, 12, false).setIconIndex(4).setItemName("cheeseWheel");
cheeseSlice = (ItemFood) new ItemCheeseSlice(905, 2, false).setIconIndex(5).setItemName("cheeseSlice");
baconEC = (ItemFood) new ItemBaconEC(906, 10, false).setIconIndex(6).setItemName("baconEC");
gayBacon = (ItemFood) new ItemGayBacon(907, 6, false).setAlwaysEdible().setIconIndex(.setItemName("gayBacon");
tacoShell = (ItemFood) new ItemTacoShell(908, 2, false).setIconIndex(17).setItemName("tacoShell");
taco = (ItemFood) new ItemTaco(909, 8, false).setIconIndex(18).setItemName("taco");
cereal = (ItemFood) new ItemCereal(910, 5, false).setIconIndex(19).setItemName("cereal");
beer =  (ItemFood) new ItemBeer(911, 4, false).setAlwaysEdible().setIconIndex(20).setItemName("beer");
nutella = (ItemFood) new ItemNutella(912, 8, false).setIconIndex(21).setItemName("nutella");
nutellaBread = (ItemFood) new ItemNutellaBread(913, 4, false).setIconIndex(22).setItemName("nutellaBread");
tortilla = (ItemFood) new ItemTortilla(914, 2, false).setIconIndex(23).setItemName("tortilla");
quesadilla = (ItemFood) new ItemQuesadilla(915, 6, false).setIconIndex(24).setItemName("quesadilla");
rawMeat = (ItemFood) new ItemRawMeat(916, 2, false).setIconIndex(25).setItemName("Raw Meat");
meat = (ItemFood) new ItemMeat(917, 4, false).setIconIndex(26).setItemName("Meat");
meatSoup = (ItemFood) new ItemMeatSoup(918, 6, false).setIconIndex(27).setItemName("meatSoup");
corn = (ItemFood) new ItemCorn(919, 4, false).setIconIndex(29).setItemName("corn");
LanguageRegistry.addName(nutella, "Nutella");
LanguageRegistry.addName(nutellaBread, "Nutella on Bread");
LanguageRegistry.addName(tortilla, "Tortilla");
LanguageRegistry.addName(quesadilla, "Quesadilla");
LanguageRegistry.addName(gayBacon, "Gay Bacon");
LanguageRegistry.addName(rawBacon, "Raw Bacon");
LanguageRegistry.addName(cookedBacon, "Cooked Bacon"); 
LanguageRegistry.addName(cookedEgg, "Cooked Egg");
LanguageRegistry.addName(baconSandwich, "Bacon Sandwich");
LanguageRegistry.addName(cheeseWheel, "Cheese Wheel");	
LanguageRegistry.addName(cheeseSlice, "Cheese Slice");
LanguageRegistry.addName(baconEC, "Deluxe Sandwich");
LanguageRegistry.addName(tacoShell, "Taco Shell");
LanguageRegistry.addName(taco, "Taco");
LanguageRegistry.addName(cereal, "Cereal");
LanguageRegistry.addName(beer, "Beer");
LanguageRegistry.addName(rawMeat, "Raw Meat");
LanguageRegistry.addName(meat, "Meat");
LanguageRegistry.addName(meatSoup, "Meat Soup");
LanguageRegistry.addName(corn, "Corn Cob");

//Blocks//
baconOre = new BlockBaconOre(2000, 0).setStepSound(Block.soundStoneFootstep).setHardness(3F).setResistance(1.0F).setBlockName("baconOre");
GameRegistry.registerBlock(baconOre);
LanguageRegistry.addName(baconOre, "Bacon Block"); 
GameRegistry.registerWorldGenerator(new WorldGeneratorBacon());
baconFlower = (BlockFlower) new BlockFlowerBacon(2001,1).setBlockName("baconFlower");
GameRegistry.registerBlock(baconFlower);
LanguageRegistry.addName(baconFlower, "Bacon Flower");
cornCrop = new BlockCornCrop(2002, 2).setStepSound(Block.soundGrassFootstep).setHardness(0.0F).setBlockName("cornCrop");
GameRegistry.registerBlock(cornCrop);
LanguageRegistry.addName(cornCrop, "Corn Crop");

//Items//
baconSword = new ItemBaconSword(950, EnumToolMaterialBacon).setIconIndex(7).setItemName("baconSword");
baconHoe = new ItemBaconHoe(951, EnumToolMaterialBacon).setIconIndex(9).setItemName("baconHoe");
baconPickaxe = new ItemBaconPickaxe(952, EnumToolMaterialBacon).setIconIndex(10).setItemName("baconPickaxe");
baconAxe = new ItemBaconAxe(953, EnumToolMaterialBacon).setIconIndex(11).setItemName("baconAxe");
baconSpade = new ItemBaconSpade(954, EnumToolMaterialBacon).setIconIndex(12).setItemName("baconSpade");
cornSeeds = new ItemCornSeeds(955, cornCrop.blockID, Block.tilledField.blockID).setIconIndex(28).setItemName("cornSeeds");
baconClip = new ItemBaconClip(956).setMaxStackSize(64).setItemName("baconClip").setIconIndex(31);
baconGun = new ItemBaconGun(957, 5, 12, BaconMod.baconClip.shiftedIndex, 1, "gun.shoot", "gun.reload").setItemName("baconGun").setIconIndex(32);
LanguageRegistry.addName(baconSpade, "Bacon Shovel");
LanguageRegistry.addName(baconHoe, "Bacon Hoe");
LanguageRegistry.addName(baconPickaxe, "Bacon Pickaxe");
LanguageRegistry.addName(baconAxe, "Bacon Axe");
LanguageRegistry.addName(baconSword, "Bacon Sword");
LanguageRegistry.addName(cornSeeds, "Corn Kernels");
LanguageRegistry.addName(baconClip, "Bacon Clip");
    LanguageRegistry.addName(baconGun, "Bacon Gun");
//Crafting//
GameRegistry.addRecipe(new ItemStack(BaconMod.baconOre, 1), new Object[]   		{"BBB", "RRR", "BBB", 'B', BaconMod.cookedBacon, 'R', BaconMod.rawBacon});
GameRegistry.addRecipe(new ItemStack(BaconMod.rawBacon, 4), new Object []		{"X", 'X', Item.porkRaw});
GameRegistry.addRecipe(new ItemStack(BaconMod.baconSandwich, 1), new Object []  {" X ", " B ", " X ", 'X', Item.bread, 'B', BaconMod.cookedBacon});		
GameRegistry.addRecipe(new ItemStack(BaconMod.cheeseSlice, 6), new Object[]		{"X", 'X', BaconMod.cheeseWheel});
GameRegistry.addRecipe(new ItemStack(BaconMod.baconEC, 1), new Object[]			{" B ", "xce", " B ", 'B', Item.bread, 'x', BaconMod.cookedBacon, 'c', BaconMod.cheeseSlice, 'e', BaconMod.cookedEgg});
GameRegistry.addRecipe(new ItemStack(BaconMod.baconSword, 1), new Object[]		{	" B ", " B ", " S ", 'B', BaconMod.cookedBacon, 'S', Item.stick});
GameRegistry.addRecipe(new ItemStack(BaconMod.gayBacon, 1), new Object[]		{" S ", "SBS", " S ", 'S', Item.sugar, 'B', BaconMod.rawBacon});
GameRegistry.addRecipe(new ItemStack(BaconMod.baconHoe, 1), new Object[]		{"BB ", " S ", " S ", 'B', BaconMod.cookedBacon, 'S', Item.stick});
GameRegistry.addRecipe(new ItemStack(BaconMod.baconPickaxe, 1), new Object[]	{"BBB", " S ", " S ", 'B', BaconMod.cookedBacon, 'S', Item.stick});
GameRegistry.addRecipe(new ItemStack(BaconMod.baconAxe, 1), new Object[]		{"BB ", "BS ", " S ", 'B', BaconMod.cookedBacon, 'S', Item.stick});	
GameRegistry.addRecipe(new ItemStack(BaconMod.baconSpade, 1), new Object[]		{" B ", " S ", " S ", 'B', BaconMod.cookedBacon, 'S', Item.stick});
GameRegistry.addRecipe(new ItemStack(BaconMod.baconHelmet, 1), new Object[]		{"BBB", "B B", "   ", 'B', BaconMod.cookedBacon});
GameRegistry.addRecipe(new ItemStack(BaconMod.baconPlate, 1), new Object[]		{"B B", "BBB", "BBB", 'B', BaconMod.cookedBacon});
GameRegistry.addRecipe(new ItemStack(BaconMod.baconLegs, 1), new Object[]		{"BBB", "B B", "B B", 'B', BaconMod.cookedBacon});
GameRegistry.addRecipe(new ItemStack(BaconMod.baconBoots, 1), new Object[]		{"   ", "B B", "B B", 'B', BaconMod.cookedBacon});
GameRegistry.addRecipe(new ItemStack(BaconMod.taco, 1), new Object[]			{" C ", " B ", " T ", 'C', BaconMod.cheeseSlice, 'B', BaconMod.meat, 'T', BaconMod.tacoShell});
GameRegistry.addRecipe(new ItemStack(BaconMod.cereal, 1), new Object[]			{" W ", " B ", " C ", 'W', Item.wheat, 'B', Item.bucketMilk, 'C', Item.bowlEmpty});
GameRegistry.addRecipe(new ItemStack(BaconMod.beer, 1), new Object[]			{" W ", " S ", " B ", 'W', Item.wheat, 'S', Item.seeds, 'B', Item.bucketWater});
GameRegistry.addRecipe(new ItemStack(BaconMod.nutella, 1), new Object[]			{"CCC", "MMM", "CCC", 'C', new ItemStack(Item.dyePowder, 1, 3), 'M', Item.bucketMilk});
GameRegistry.addRecipe(new ItemStack(BaconMod.nutellaBread, 1), new Object[]	{" N ", " B ", "   ", 'N', BaconMod.nutella, 'B', Item.bread});
GameRegistry.addRecipe(new ItemStack(BaconMod.tortilla, 1), new Object[]		{" W ", "W W", " W ", 'W', BaconMod.cornSeeds});
GameRegistry.addRecipe(new ItemStack(BaconMod.quesadilla, 1), new Object[]		{" T ", " C ", " T ", 'T', BaconMod.tortilla, 'C', BaconMod.cheeseSlice});
GameRegistry.addRecipe(new ItemStack(BaconMod.rawMeat, 3), new Object[]			{"X", 'X', Item.beefRaw});
GameRegistry.addRecipe(new ItemStack(BaconMod.meatSoup, 1), new Object[]		{" B ", " W ", " V ", 'B', BaconMod.meat, 'W', Item.bucketWater, 'V', Item.bowlEmpty});	
GameRegistry.addRecipe(new ItemStack(BaconMod.cornSeeds, 4), new Object[]		{"C", 'C', BaconMod.corn});
//Smelting//
GameRegistry.addSmelting(BaconMod.rawBacon.shiftedIndex, new ItemStack(BaconMod.cookedBacon), 0.1F);
GameRegistry.addSmelting(Item.egg.shiftedIndex, new ItemStack(BaconMod.cookedEgg), 0.1F);
GameRegistry.addSmelting(Item.bucketMilk.shiftedIndex, new ItemStack(BaconMod.cheeseWheel), 01.F);
GameRegistry.addSmelting(BaconMod.tortilla.shiftedIndex, new ItemStack(BaconMod.tacoShell), 0.1F);	
GameRegistry.addSmelting(BaconMod.rawMeat.shiftedIndex, new ItemStack(BaconMod.meat), 0.1F);


//Set Sounds//
mc.installResource("newsound/gun/shoot.ogg", new File(mc.mcDataDir, "resources/newsound/gun/shoot.ogg"));
mc.installResource("newsound/gun/reload.ogg", new File(mc.mcDataDir, "resources/newsound/gun/reload.ogg"));

}
}

 

 

 

ClientProxy.java:

 

 

package BaconMod.client;
import cpw.mods.fml.client.registry.RenderingRegistry;
import minecraftwero.common.CommonProxyTutorial;
import minecraftwero.common.EntityBullet;
import minecraftwero.common.RenderBullet;
import net.minecraft.src.RenderEntity;
import net.minecraftforge.client.MinecraftForgeClient;

public class ClientProxyTutorial extends CommonProxyTutorial
{

    @Override
    
    public void registerRenderThings()
    {
    	MinecraftForgeClient.preloadTexture("/BaconTextures/baconTex.png");
    	RenderingRegistry.instance().registerEntityRenderingHandler(EntityBullet.class, new RenderBullet()); 
    }
}

 

 

Link to comment
Share on other sites

 

 

package minecraftwero.common;

import java.io.File;

import net.minecraft.client.Minecraft;
import net.minecraft.src.BiomeCache;
import net.minecraft.src.BiomeGenBase;
import net.minecraft.src.BiomeGenForest;
import net.minecraft.src.Block;
import net.minecraft.src.BlockCake;
import net.minecraft.src.BlockFlower;
import net.minecraft.src.CreativeTabs;
import net.minecraft.src.Entity;
import net.minecraft.src.EnumArmorMaterial;
import net.minecraft.src.EnumCreatureType;
import net.minecraft.src.EnumToolMaterial;
import net.minecraft.src.Item;
import net.minecraft.src.ItemBucket;
import net.minecraft.src.ItemFood;
import net.minecraft.src.ItemStack;
import net.minecraft.src.ModLoader;
import net.minecraft.src.Potion;
import net.minecraftforge.common.Configuration;
import net.minecraftforge.common.EnumHelper;
import net.minecraftforge.common.MinecraftForge;
import cpw.mods.fml.client.registry.RenderingRegistry;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.Init;
import cpw.mods.fml.common.Mod.PreInit;
import cpw.mods.fml.common.SidedProxy;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.registry.EntityRegistry;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.LanguageRegistry;

@Mod(modid = "MinecraftWero", name = "Bacon Mod", version = "1.0.0")
public class BaconMod {

public static Item baconGun;
public static Item baconClip;
public static BlockFlower baconFlower;
public static Block cornCrop;
public static Item baconHelmet;
public static Item baconPlate;
public static Item baconLegs;
public static Item baconBoots;
public static Block baconOre;
public static Item baconStick;
public static Item baconSword;
public static Item baconHoe;
public static Item baconPickaxe;
public static Item baconAxe;
public static Item baconSpade;
public static ItemFood cereal;
public static ItemFood rawBacon;
public static ItemFood cookedBacon;
public static ItemFood cookedEgg;
public static ItemFood baconSandwich;
public static ItemFood cheeseWheel;
public static ItemFood cheeseSlice;
public static ItemFood baconEC;
public static ItemFood gayBacon;
public static ItemFood tacoShell;
public static ItemFood taco;
public static ItemFood beer;
public static ItemFood nutella;
public static ItemFood nutellaBread;
public static ItemFood tortilla;
public static ItemFood quesadilla;
public static ItemFood rawMeat;
public static ItemFood meat;
public static ItemFood meatSoup;
public static Item cornSeeds;
public static ItemFood corn;
public static ItemFood cornKernel;
public static BiomeGenBase baconForest;

@SidedProxy(clientSide = "BaconMod.client.ClientProxyTutorial", serverSide = "minecraftwero.common.CommonProxyTutorial")
public static CommonProxyTutorial proxy;
//ToolMaterial//
static EnumToolMaterial EnumToolMaterialBacon = EnumHelper.addToolMaterial("Bacon", 3, 20000, 8.0F, 2, 15);
static EnumArmorMaterial EnumArmorMaterialBacon = EnumHelper.addArmorMaterial("Bacon",33, new int[]{3, 8, 6, 3}, 10);


@Init public void load(FMLInitializationEvent event){}{
//Entity//


//Sounds//
Minecraft mc = ModLoader.getMinecraftInstance(); 

//Events//
MinecraftForge.EVENT_BUS.register(new BoneMealEvent());
//Biome//
final BiomeGenBase baconForest = (new BiomeGenBacon(26)).setBiomeName("baconForest");
ModLoader.addBiome(baconForest);

//Mobs//
//Armor//
baconHelmet = new ItemBaconHelmet(896, EnumArmorMaterialBacon, ModLoader.addArmor("Bacon"), 0).setItemName("baconHelmet").setIconIndex(13);
baconPlate = new ItemBaconPlate(897, EnumArmorMaterialBacon, ModLoader.addArmor("Bacon"), 1).setItemName("baconPlate").setIconIndex(14);
baconLegs = new ItemBaconLegs(898, EnumArmorMaterialBacon, ModLoader.addArmor("Bacon"), 2).setItemName("baconLegs").setIconIndex(15);
baconBoots = new ItemBaconBoots(899, EnumArmorMaterialBacon, ModLoader.addArmor("Bacon"), 3).setItemName("baconBoots").setIconIndex(16);
LanguageRegistry.addName(baconHelmet, "Bacon Helmet");
LanguageRegistry.addName(baconPlate, "Bacon Plate");
LanguageRegistry.addName(baconLegs, "Bacon Leggings");
LanguageRegistry.addName(baconBoots, "Bacon Boots");

//Food//
rawBacon = (ItemFood) new ItemRawBaconFood(900, 3, true).setIconIndex(0).setItemName("rawBacon");
cookedBacon = (ItemFood) new ItemCookedBaconFood(901, 5, true).setIconIndex(1).setItemName("cookedBacon");
cookedEgg = (ItemFood) new ItemCookedEgg(902, 4, false).setIconIndex(2).setItemName("cookedEgg");
baconSandwich = (ItemFood) new ItemBaconSandwich(903, 7, false).setIconIndex(3).setItemName("baconSandwich");
cheeseWheel = (ItemFood) new ItemCheeseWheel(904, 12, false).setIconIndex(4).setItemName("cheeseWheel");
cheeseSlice = (ItemFood) new ItemCheeseSlice(905, 2, false).setIconIndex(5).setItemName("cheeseSlice");
baconEC = (ItemFood) new ItemBaconEC(906, 10, false).setIconIndex(6).setItemName("baconEC");
gayBacon = (ItemFood) new ItemGayBacon(907, 6, false).setAlwaysEdible().setIconIndex(.setItemName("gayBacon");
tacoShell = (ItemFood) new ItemTacoShell(908, 2, false).setIconIndex(17).setItemName("tacoShell");
taco = (ItemFood) new ItemTaco(909, 8, false).setIconIndex(18).setItemName("taco");
cereal = (ItemFood) new ItemCereal(910, 5, false).setIconIndex(19).setItemName("cereal");
beer =  (ItemFood) new ItemBeer(911, 4, false).setAlwaysEdible().setIconIndex(20).setItemName("beer");
nutella = (ItemFood) new ItemNutella(912, 8, false).setIconIndex(21).setItemName("nutella");
nutellaBread = (ItemFood) new ItemNutellaBread(913, 4, false).setIconIndex(22).setItemName("nutellaBread");
tortilla = (ItemFood) new ItemTortilla(914, 2, false).setIconIndex(23).setItemName("tortilla");
quesadilla = (ItemFood) new ItemQuesadilla(915, 6, false).setIconIndex(24).setItemName("quesadilla");
rawMeat = (ItemFood) new ItemRawMeat(916, 2, false).setIconIndex(25).setItemName("Raw Meat");
meat = (ItemFood) new ItemMeat(917, 4, false).setIconIndex(26).setItemName("Meat");
meatSoup = (ItemFood) new ItemMeatSoup(918, 6, false).setIconIndex(27).setItemName("meatSoup");
corn = (ItemFood) new ItemCorn(919, 4, false).setIconIndex(29).setItemName("corn");
LanguageRegistry.addName(nutella, "Nutella");
LanguageRegistry.addName(nutellaBread, "Nutella on Bread");
LanguageRegistry.addName(tortilla, "Tortilla");
LanguageRegistry.addName(quesadilla, "Quesadilla");
LanguageRegistry.addName(gayBacon, "Gay Bacon");
LanguageRegistry.addName(rawBacon, "Raw Bacon");
LanguageRegistry.addName(cookedBacon, "Cooked Bacon"); 
LanguageRegistry.addName(cookedEgg, "Cooked Egg");
LanguageRegistry.addName(baconSandwich, "Bacon Sandwich");
LanguageRegistry.addName(cheeseWheel, "Cheese Wheel");	
LanguageRegistry.addName(cheeseSlice, "Cheese Slice");
LanguageRegistry.addName(baconEC, "Deluxe Sandwich");
LanguageRegistry.addName(tacoShell, "Taco Shell");
LanguageRegistry.addName(taco, "Taco");
LanguageRegistry.addName(cereal, "Cereal");
LanguageRegistry.addName(beer, "Beer");
LanguageRegistry.addName(rawMeat, "Raw Meat");
LanguageRegistry.addName(meat, "Meat");
LanguageRegistry.addName(meatSoup, "Meat Soup");
LanguageRegistry.addName(corn, "Corn Cob");

//Blocks//
baconOre = new BlockBaconOre(2000, 0).setStepSound(Block.soundStoneFootstep).setHardness(3F).setResistance(1.0F).setBlockName("baconOre");
GameRegistry.registerBlock(baconOre);
LanguageRegistry.addName(baconOre, "Bacon Block"); 
GameRegistry.registerWorldGenerator(new WorldGeneratorBacon());
baconFlower = (BlockFlower) new BlockFlowerBacon(2001,1).setBlockName("baconFlower");
GameRegistry.registerBlock(baconFlower);
LanguageRegistry.addName(baconFlower, "Bacon Flower");
cornCrop = new BlockCornCrop(2002, 2).setStepSound(Block.soundGrassFootstep).setHardness(0.0F).setBlockName("cornCrop");
GameRegistry.registerBlock(cornCrop);
LanguageRegistry.addName(cornCrop, "Corn Crop");

//Items//
baconSword = new ItemBaconSword(950, EnumToolMaterialBacon).setIconIndex(7).setItemName("baconSword");
baconHoe = new ItemBaconHoe(951, EnumToolMaterialBacon).setIconIndex(9).setItemName("baconHoe");
baconPickaxe = new ItemBaconPickaxe(952, EnumToolMaterialBacon).setIconIndex(10).setItemName("baconPickaxe");
baconAxe = new ItemBaconAxe(953, EnumToolMaterialBacon).setIconIndex(11).setItemName("baconAxe");
baconSpade = new ItemBaconSpade(954, EnumToolMaterialBacon).setIconIndex(12).setItemName("baconSpade");
cornSeeds = new ItemCornSeeds(955, cornCrop.blockID, Block.tilledField.blockID).setIconIndex(28).setItemName("cornSeeds");
baconClip = new ItemBaconClip(956).setMaxStackSize(64).setItemName("baconClip").setIconIndex(31);
baconGun = new ItemBaconGun(957, 5, 12, BaconMod.baconClip.shiftedIndex, 1, "gun.shoot", "gun.reload").setItemName("baconGun").setIconIndex(32);
LanguageRegistry.addName(baconSpade, "Bacon Shovel");
LanguageRegistry.addName(baconHoe, "Bacon Hoe");
LanguageRegistry.addName(baconPickaxe, "Bacon Pickaxe");
LanguageRegistry.addName(baconAxe, "Bacon Axe");
LanguageRegistry.addName(baconSword, "Bacon Sword");
LanguageRegistry.addName(cornSeeds, "Corn Kernels");
LanguageRegistry.addName(baconClip, "Bacon Clip");
    LanguageRegistry.addName(baconGun, "Bacon Gun");
//Crafting//
GameRegistry.addRecipe(new ItemStack(BaconMod.baconOre, 1), new Object[]   		{"BBB", "RRR", "BBB", 'B', BaconMod.cookedBacon, 'R', BaconMod.rawBacon});
GameRegistry.addRecipe(new ItemStack(BaconMod.rawBacon, 4), new Object []		{"X", 'X', Item.porkRaw});
GameRegistry.addRecipe(new ItemStack(BaconMod.baconSandwich, 1), new Object []  {" X ", " B ", " X ", 'X', Item.bread, 'B', BaconMod.cookedBacon});		
GameRegistry.addRecipe(new ItemStack(BaconMod.cheeseSlice, 6), new Object[]		{"X", 'X', BaconMod.cheeseWheel});
GameRegistry.addRecipe(new ItemStack(BaconMod.baconEC, 1), new Object[]			{" B ", "xce", " B ", 'B', Item.bread, 'x', BaconMod.cookedBacon, 'c', BaconMod.cheeseSlice, 'e', BaconMod.cookedEgg});
GameRegistry.addRecipe(new ItemStack(BaconMod.baconSword, 1), new Object[]		{	" B ", " B ", " S ", 'B', BaconMod.cookedBacon, 'S', Item.stick});
GameRegistry.addRecipe(new ItemStack(BaconMod.gayBacon, 1), new Object[]		{" S ", "SBS", " S ", 'S', Item.sugar, 'B', BaconMod.rawBacon});
GameRegistry.addRecipe(new ItemStack(BaconMod.baconHoe, 1), new Object[]		{"BB ", " S ", " S ", 'B', BaconMod.cookedBacon, 'S', Item.stick});
GameRegistry.addRecipe(new ItemStack(BaconMod.baconPickaxe, 1), new Object[]	{"BBB", " S ", " S ", 'B', BaconMod.cookedBacon, 'S', Item.stick});
GameRegistry.addRecipe(new ItemStack(BaconMod.baconAxe, 1), new Object[]		{"BB ", "BS ", " S ", 'B', BaconMod.cookedBacon, 'S', Item.stick});	
GameRegistry.addRecipe(new ItemStack(BaconMod.baconSpade, 1), new Object[]		{" B ", " S ", " S ", 'B', BaconMod.cookedBacon, 'S', Item.stick});
GameRegistry.addRecipe(new ItemStack(BaconMod.baconHelmet, 1), new Object[]		{"BBB", "B B", "   ", 'B', BaconMod.cookedBacon});
GameRegistry.addRecipe(new ItemStack(BaconMod.baconPlate, 1), new Object[]		{"B B", "BBB", "BBB", 'B', BaconMod.cookedBacon});
GameRegistry.addRecipe(new ItemStack(BaconMod.baconLegs, 1), new Object[]		{"BBB", "B B", "B B", 'B', BaconMod.cookedBacon});
GameRegistry.addRecipe(new ItemStack(BaconMod.baconBoots, 1), new Object[]		{"   ", "B B", "B B", 'B', BaconMod.cookedBacon});
GameRegistry.addRecipe(new ItemStack(BaconMod.taco, 1), new Object[]			{" C ", " B ", " T ", 'C', BaconMod.cheeseSlice, 'B', BaconMod.meat, 'T', BaconMod.tacoShell});
GameRegistry.addRecipe(new ItemStack(BaconMod.cereal, 1), new Object[]			{" W ", " B ", " C ", 'W', Item.wheat, 'B', Item.bucketMilk, 'C', Item.bowlEmpty});
GameRegistry.addRecipe(new ItemStack(BaconMod.beer, 1), new Object[]			{" W ", " S ", " B ", 'W', Item.wheat, 'S', Item.seeds, 'B', Item.bucketWater});
GameRegistry.addRecipe(new ItemStack(BaconMod.nutella, 1), new Object[]			{"CCC", "MMM", "CCC", 'C', new ItemStack(Item.dyePowder, 1, 3), 'M', Item.bucketMilk});
GameRegistry.addRecipe(new ItemStack(BaconMod.nutellaBread, 1), new Object[]	{" N ", " B ", "   ", 'N', BaconMod.nutella, 'B', Item.bread});
GameRegistry.addRecipe(new ItemStack(BaconMod.tortilla, 1), new Object[]		{" W ", "W W", " W ", 'W', BaconMod.cornSeeds});
GameRegistry.addRecipe(new ItemStack(BaconMod.quesadilla, 1), new Object[]		{" T ", " C ", " T ", 'T', BaconMod.tortilla, 'C', BaconMod.cheeseSlice});
GameRegistry.addRecipe(new ItemStack(BaconMod.rawMeat, 3), new Object[]			{"X", 'X', Item.beefRaw});
GameRegistry.addRecipe(new ItemStack(BaconMod.meatSoup, 1), new Object[]		{" B ", " W ", " V ", 'B', BaconMod.meat, 'W', Item.bucketWater, 'V', Item.bowlEmpty});	
GameRegistry.addRecipe(new ItemStack(BaconMod.cornSeeds, 4), new Object[]		{"C", 'C', BaconMod.corn});
//Smelting//
GameRegistry.addSmelting(BaconMod.rawBacon.shiftedIndex, new ItemStack(BaconMod.cookedBacon), 0.1F);
GameRegistry.addSmelting(Item.egg.shiftedIndex, new ItemStack(BaconMod.cookedEgg), 0.1F);
GameRegistry.addSmelting(Item.bucketMilk.shiftedIndex, new ItemStack(BaconMod.cheeseWheel), 01.F);
GameRegistry.addSmelting(BaconMod.tortilla.shiftedIndex, new ItemStack(BaconMod.tacoShell), 0.1F);	
GameRegistry.addSmelting(BaconMod.rawMeat.shiftedIndex, new ItemStack(BaconMod.meat), 0.1F);


//Set Sounds//
mc.installResource("newsound/gun/shoot.ogg", new File(mc.mcDataDir, "resources/newsound/gun/shoot.ogg"));
mc.installResource("newsound/gun/reload.ogg", new File(mc.mcDataDir, "resources/newsound/gun/reload.ogg"));

}
}

 

 

 

 

Perhaps you should do something about this part:

@Init public void load(FMLInitializationEvent event){}{

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

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