I started fresh and it works! but for some reason the picture in the game looks completely different than what I made. Can someone help me!
I thought it was some TODO thing that caused it but I need help know (where it says:ItemBananaGun, at the top, thats where my problem is)
package net.minecraft.src;
import net.minecraft.src.forge.ITextureProvider;
public class ItemBananaGun extends Item implements ITextureProvider
{
public ItemBananaGun(int par1)
{
super(par1);
this.maxStackSize = 1;
}
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer)
{
boolean var5 = par3EntityPlayer.capabilities.depleteBuckets;
if (!par3EntityPlayer.capabilities.depleteBuckets)
{
if (var5 || par3EntityPlayer.inventory.hasItem(mod_FruitGuns.seed.shiftedIndex))
{
if (!var5)
{
par3EntityPlayer.inventory.consumeInventoryItem(mod_FruitGuns.seed.shiftedIndex);
if (!par2World.isRemote)
{
par2World.spawnEntityInWorld(new EntitySeed(par2World, par3EntityPlayer));
}
par2World.playSoundAtEntity(par3EntityPlayer, "random.bow", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F));
}
}
}
return par1ItemStack;
}
}
Spaces, is there a way to make the gun without using forge? I can't get the entity to pop out since a picture wasn't designated and I'm not really willing to add forge just for that.
You don't need forge? I only use modloader in the gun tutorial.
I had the same problem with google crome I think its some kinda bug but anyways
package net.minecraft.src;
public class mod_FruitGuns extends BaseMod{
public static Item bananagun = new ItemBananaGun(3000).setMaxStackSize(1).setItemName("BananaGun");
public static Item seed = new Item(3001).setItemName("seed");
@Override
public String getVersion() {
return "MC 1.2.3";
}
@Override
public void load() {
ModLoader.addName(bananagun , "Banana Gun");
ModLoader.addName(seed, "seed");
bananagun.iconIndex = ModLoader.addOverride("/gui/items.png", "/Mods/a.png");
seed.iconIndex = ModLoader.addOverride("/gui/items.png", "/Mods/b.png");
ModLoader.addShapelessRecipe(new ItemStack(seed, 64), new Object[]{
Block.dirt
});
ModLoader.addShapelessRecipe(new ItemStack(bananagun, 1), new Object[]{
Block.dirt, Block.dirt
});
}
}
Its your ItemBannanaGun your getting a null pointer exception because you are referencing something that does not exist in this case
this
public static Item bananagun = new ItemBananaGun(3000).setMaxStackSize(1).setItemName("BananaGun");
your ItemBannanaGun class is not extending an item so you are trying to declare bannanagun as an item but your ItemBannana class is not an Item so just extend it to Item.
@Spaces Also Please can you make a tut so you can make a portal to go to another dimension because then all i need is to make the generation of the dimension then i can release the mod and i would like to say thank you for all your help
Minecraft has stopped running because it encountered a problem.
--- BEGIN ERROR REPORT bf8dd11a --------
Generated 3/23/12 10:40 PM
Minecraft: Minecraft 1.2.3
OS: Windows 7 (amd64) version 6.1
Java: 1.7.0_02, Oracle Corporation
VM: Java HotSpot™ 64-Bit Server VM (mixed mode), Oracle Corporation
LWJGL: 2.4.2
OpenGL: Intel® HD Graphics Family version 3.0.0 - Build 8.15.10.2353, Intel
java.lang.ExceptionInInitializerError
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at net.minecraft.src.ModLoader.addMod(ModLoader.java:284)
at net.minecraft.src.ModLoader.readFromClassPath(ModLoader.java:1290)
at net.minecraft.src.ModLoader.init(ModLoader.java:846)
at net.minecraft.src.ModLoader.addAllRenderers(ModLoader.java:154)
at net.minecraft.src.RenderManager.<init>(RenderManager.java:85)
at net.minecraft.src.RenderManager.<clinit>(RenderManager.java:12)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:423)
at net.minecraft.client.Minecraft.run(Minecraft.java:784)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException
at net.minecraft.src.mod_FruitGuns.<clinit>(mod_FruitGuns.java:4)
... 15 more
--- END ERROR REPORT bf76840b ----------
HELLO TheInstitutions! Hello Again, I am back, spaceburrito... again... but that last helpful hint you gave me about the parts of the head not moving right with everything else, well I did what you said and put all the rotation point files the same as the head, but the parts do not match up right, i mean the top of the chickens head AKA crown is below the head, and the bill is a little in front and to the side, and the chin part is also like the bill, and I'm posting it here because even if you cannot help, maybe someone else can, I'm sorry for the annoyance I must be causing you, but I've tried pasting the files from the real chicken model, but it comes up with errors, and I cannot fix them, so please help!
Hey, your not annoying but unfortunately, every person that has had the same problem as you, I told them that and it all worked for them. I don;t know what else to tell but I am really sorry I can't help anymore. Let's hope someone else can
package net.minecraft.src;
import java.util.Random;
import java.io.File;
public class mod_Gen
{
public void load(){
}
public void generateSurface(World w, Random r, int chunkX, int chunkZ){
AskFormat f = new AskFormat(w);
int i = chunkX + r.nextInt(8);
int j = w.getTopSolidOrLiquidBlock(chunkX, chunkZ);
int k = chunkZ + r.nextInt(8);
f.generate(new File(StructureGen.getFolderDirectory() + "House.ask"), w, i, j, k);
}
}
0
Get Rid of the forge stuff you don't need it.
0
Sorry copy the tutorial again I just noticed that I pasted in one of the mods I work on class file.
0
You don't need forge? I only use modloader in the gun tutorial.
0
Its your ItemBannanaGun your getting a null pointer exception because you are referencing something that does not exist in this case
this
your ItemBannanaGun class is not extending an item so you are trying to declare bannanagun as an item but your ItemBannana class is not an Item so just extend it to Item.
0
Show me line 4 of mod_FruitGun I can't open up spoilers for some reason.
0
add this in your code
0
Yeah ill see what I can do.
Ill put it in the requests.
0
Get rid of the two int's because your biome doesn't use grass.
0
Change
To
0
Show me your mod_FruitGuns class
0
0
0
Ill take a stab at it, show me your code please.
0
Did you create a new world?
0
Show me your code