Try instead of ItemStack(mixedDust,1)
ItemStack(mixedDust,1,-1)
Can you post a screenshot of your code and the error(s) you're getting? Or bug me on esper.net IRC on #kg6jay and I'll try and help in further detail.
Make sure you are importing a reference to the CopperDust and TinDust, and use those in your recipe. In my own code I import my main class, which has variables for each of my items and blocks, so it looks like:
So everything else is working but then when I try to run Minecraft on eclipse it shows the Mojang logo then goes to a black screen. Nothing but that in console it says "... 29 more" then nothing else happens I tried letting it sit for like 45 minutes and still nothing happened so please help.
So everything else is working but then when I try to run Minecraft on eclipse it shows the Mojang logo then goes to a black screen. Nothing but that in console it says "... 29 more" then nothing else happens I tried letting it sit for like 45 minutes and still nothing happened so please help.
Can you pastebin the full error log from the eclipse console? That should have the information needed to help you.
It just gives me an error telling me to delete that ")" lol
Does the same thing? What the heck!?!?
Ok I think I found the problem. I read through your answer, and i looked in the Item.java file (class file) and Copper Dust isn't in there?! XD rookie mistake... Scratch that got a new freaking annoying problem... Now the .addShaplessRecipe is now a error:
"Syntax error on token "addShapelessRecipe", = expected after this token"
It works for me, as long as I replace the items your tying to use with items already in the game.
Here's how I had it and it worked.
GameRegistry.addShapelessRecipe( new ItemStack(Item.appleRed, 1), new Object[]{
Item.seeds,
Block.dirt
});
Seeds and Dirt to make an Apple.
mixed, Tin, and Copper dust are not normal minecraft items so make sure you have it pointing to the correct place.
I did all that... i don't have a flying panda's butt with what is wrong! lol i got those original errors :/ I guess ill keep messing with the coding
My computer decides to be a giant butt... i can't take a screen shot with the error code popping out.. But im back to the original errors...
Do you have your code up on github or some other similar site where we can take a look at your project layout and the specific code to help you find the solution?
is it possible to add mob creation tutorials to the coming soon area?
i went through all the tutorials already, but what i'm most interested in is mob creation in the forge environment, mostly because of its entity id separation from vanilla mc and other mods, something modloader/forge's modloader emulation doesn't have.
mostly just the coding part, making models, animating them and textures is easy.
public boolean canSustainPlant(World world, int x, int y, int z, ForgeDirection direction, IPlantable plant)
{
return true;
}
public boolean isFertile(World world, int x, int y, int z)
{
return true;
}
You can tweak the code to get what you want, for example stop crops from growing on it
public boolean canSustainPlant(World world, int x, int y, int z, ForgeDirection direction, IPlantable plant)
{
return true;
}
public boolean isFertile(World world, int x, int y, int z)
{
return true;
}
You can tweak the code to get what you want, for example stop crops from growing on it
adding that doesnt change anything :< i can still place my white flower on my dry dirt, but i cant place the rose, or any other plants on my dirt. heres my entire clock class
package lecapria.main.common.blocks;
import static net.minecraftforge.common.EnumPlantType.Cave;
import static net.minecraftforge.common.EnumPlantType.Crop;
import static net.minecraftforge.common.EnumPlantType.Desert;
import static net.minecraftforge.common.EnumPlantType.Nether;
import static net.minecraftforge.common.EnumPlantType.Plains;
import static net.minecraftforge.common.EnumPlantType.Water;
import lecapria.main.modMain;
import net.minecraft.block.Block;
import net.minecraft.block.BlockFlower;
import net.minecraft.block.material.Material;
import cpw.mods.fml.relauncher.*;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.world.World;
import net.minecraftforge.common.EnumPlantType;
import net.minecraftforge.common.ForgeDirection;
import net.minecraftforge.common.IPlantable;
import java.util.Random;
public class BlockToyFlower extends BlockFlower
{
protected BlockToyFlower(int par1, int par2, Material par3Material)
{
super(par1, par2, par3Material);
this.blockIndexInTexture = par2;
this.setTickRandomly(true);
float var4 = 0.2F;
this.setBlockBounds(0.5F - var4, 0.0F, 0.5F - var4, 0.5F + var4, var4 * 3.0F, 0.5F + var4);
this.setCreativeTab(CreativeTabs.tabDecorations);
setTextureFile("/modMainGFX/block.png"); //The texture file
setBlockName("LecapriaFlowerWhite"); //The incode name of the block
setStepSound(super.soundGrassFootstep); //The sound the block makes when you walk on it as well as place or break it
}
@SideOnly(Side.CLIENT)
public int getBlockTextureFromSide(int i){ //What texture it uses
return 21;
}
public BlockToyFlower(int par1, int par2)
{
this(par1, par2, Material.plants);
}
/**
* Checks to see if its valid to put this block at the specified coordinates. Args: world, x, y, z
*/
@Override
public boolean canPlaceBlockAt(World par1World, int par2, int par3, int par4)
{
return super.canPlaceBlockAt(par1World, par2, par3, par4) && canBlockStay(par1World, par2, par3, par4);
}
/**
* Gets passed in the blockID of the block below and supposed to return true if its allowed to grow on the type of
* blockID passed in. Args: blockID
*/
@Override
protected boolean canThisPlantGrowOnThisBlockID(int par1)
{
return par1 == Block.grass.blockID || par1 == modMain.dirtDry.blockID || par1 == Block.dirt.blockID || par1 == Block.tilledField.blockID;
}
public boolean canSustainPlant(World world, int x, int y, int z, ForgeDirection direction, IPlantable plant)
{
return true;
}
public boolean isFertile(World world, int x, int y, int z)
{
return true;
}
/**
* Lets the block know when one of its neighbor changes. Doesn't know which neighbor changed (coordinates passed are
* their own) Args: x, y, z, neighbor blockID
*/
public void onNeighborBlockChange(World par1World, int par2, int par3, int par4, int par5)
{
super.onNeighborBlockChange(par1World, par2, par3, par4, par5);
this.checkFlowerChange(par1World, par2, par3, par4);
}
/**
* Ticks the block if it's been scheduled
*/
public void updateTick(World par1World, int par2, int par3, int par4, Random par5Random)
{
this.checkFlowerChange(par1World, par2, par3, par4);
}
/**
* Can this block stay at this position. Similar to canPlaceBlockAt except gets checked often with plants.
*/
public boolean canBlockStay(World par1World, int par2, int par3, int par4)
{
Block soil = blocksList[par1World.getBlockId(par2, par3 - 1, par4)];
return (par1World.getFullBlockLightValue(par2, par3, par4) >= 8 || par1World.canBlockSeeTheSky(par2, par3, par4)) &&
(soil != null && soil.canSustainPlant(par1World, par2, par3 - 1, par4, ForgeDirection.UP, this));
}
/**
* Returns a bounding box from the pool of bounding boxes (this means this box can change after the pool has been
* cleared to be reused)
*/
public AxisAlignedBB getCollisionBoundingBoxFromPool(World par1World, int par2, int par3, int par4)
{
return null;
}
/**
* Is this block (a) opaque and (B) a full 1m cube? This determines whether or not to render the shared face of two
* adjacent blocks and also whether the player can attach torches, redstone wire, etc to this block.
*/
public boolean isOpaqueCube()
{
return false;
}
/**
* If this block doesn't render as an ordinary block it will return False (examples: signs, buttons, stairs, etc)
*/
public boolean renderAsNormalBlock()
{
return false;
}
/**
* The type of render function that is called for this block
*/
public int getRenderType()
{
return 1;
}
@Override
public EnumPlantType getPlantType(World world, int x, int y, int z)
{
if (blockID == crops.blockID ) return Crop;
if (blockID == deadBush.blockID ) return Desert;
if (blockID == waterlily.blockID ) return Water;
if (blockID == mushroomRed.blockID ) return Cave;
if (blockID == mushroomBrown.blockID) return Cave;
if (blockID == netherStalk.blockID ) return Nether;
if (blockID == sapling.blockID ) return Plains;
if (blockID == melonStem.blockID ) return Crop;
if (blockID == pumpkinStem.blockID ) return Crop;
if (blockID == tallGrass.blockID ) return Plains;
return Plains;
}
@Override
public int getPlantID(World world, int x, int y, int z)
{
return blockID;
}
@Override
public int getPlantMetadata(World world, int x, int y, int z)
{
return world.getBlockMetadata(x, y, z);
}
}
adding that doesnt change anything :< i can still place my white flower on my dry dirt, but i cant place the rose, or any other plants on my dirt. heres my entire clock class
package lecapria.main.common.blocks;
import static net.minecraftforge.common.EnumPlantType.Cave;
import static net.minecraftforge.common.EnumPlantType.Crop;
import static net.minecraftforge.common.EnumPlantType.Desert;
import static net.minecraftforge.common.EnumPlantType.Nether;
import static net.minecraftforge.common.EnumPlantType.Plains;
import static net.minecraftforge.common.EnumPlantType.Water;
import lecapria.main.modMain;
import net.minecraft.block.Block;
import net.minecraft.block.BlockFlower;
import net.minecraft.block.material.Material;
import cpw.mods.fml.relauncher.*;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.world.World;
import net.minecraftforge.common.EnumPlantType;
import net.minecraftforge.common.ForgeDirection;
import net.minecraftforge.common.IPlantable;
import java.util.Random;
public class BlockToyFlower extends BlockFlower
{
protected BlockToyFlower(int par1, int par2, Material par3Material)
{
super(par1, par2, par3Material);
this.blockIndexInTexture = par2;
this.setTickRandomly(true);
float var4 = 0.2F;
this.setBlockBounds(0.5F - var4, 0.0F, 0.5F - var4, 0.5F + var4, var4 * 3.0F, 0.5F + var4);
this.setCreativeTab(CreativeTabs.tabDecorations);
setTextureFile("/modMainGFX/block.png"); //The texture file
setBlockName("LecapriaFlowerWhite"); //The incode name of the block
setStepSound(super.soundGrassFootstep); //The sound the block makes when you walk on it as well as place or break it
}
@SideOnly(Side.CLIENT)
public int getBlockTextureFromSide(int i){ //What texture it uses
return 21;
}
public BlockToyFlower(int par1, int par2)
{
this(par1, par2, Material.plants);
}
/**
* Checks to see if its valid to put this block at the specified coordinates. Args: world, x, y, z
*/
@Override
public boolean canPlaceBlockAt(World par1World, int par2, int par3, int par4)
{
return super.canPlaceBlockAt(par1World, par2, par3, par4) && canBlockStay(par1World, par2, par3, par4);
}
/**
* Gets passed in the blockID of the block below and supposed to return true if its allowed to grow on the type of
* blockID passed in. Args: blockID
*/
@Override
protected boolean canThisPlantGrowOnThisBlockID(int par1)
{
return par1 == Block.grass.blockID || par1 == modMain.dirtDry.blockID || par1 == Block.dirt.blockID || par1 == Block.tilledField.blockID;
}
public boolean canSustainPlant(World world, int x, int y, int z, ForgeDirection direction, IPlantable plant)
{
return true;
}
public boolean isFertile(World world, int x, int y, int z)
{
return true;
}
/**
* Lets the block know when one of its neighbor changes. Doesn't know which neighbor changed (coordinates passed are
* their own) Args: x, y, z, neighbor blockID
*/
public void onNeighborBlockChange(World par1World, int par2, int par3, int par4, int par5)
{
super.onNeighborBlockChange(par1World, par2, par3, par4, par5);
this.checkFlowerChange(par1World, par2, par3, par4);
}
/**
* Ticks the block if it's been scheduled
*/
public void updateTick(World par1World, int par2, int par3, int par4, Random par5Random)
{
this.checkFlowerChange(par1World, par2, par3, par4);
}
/**
* Can this block stay at this position. Similar to canPlaceBlockAt except gets checked often with plants.
*/
public boolean canBlockStay(World par1World, int par2, int par3, int par4)
{
Block soil = blocksList[par1World.getBlockId(par2, par3 - 1, par4)];
return (par1World.getFullBlockLightValue(par2, par3, par4) >= 8 || par1World.canBlockSeeTheSky(par2, par3, par4)) &&
(soil != null && soil.canSustainPlant(par1World, par2, par3 - 1, par4, ForgeDirection.UP, this));
}
/**
* Returns a bounding box from the pool of bounding boxes (this means this box can change after the pool has been
* cleared to be reused)
*/
public AxisAlignedBB getCollisionBoundingBoxFromPool(World par1World, int par2, int par3, int par4)
{
return null;
}
/**
* Is this block (a) opaque and (B) a full 1m cube? This determines whether or not to render the shared face of two
* adjacent blocks and also whether the player can attach torches, redstone wire, etc to this block.
*/
public boolean isOpaqueCube()
{
return false;
}
/**
* If this block doesn't render as an ordinary block it will return False (examples: signs, buttons, stairs, etc)
*/
public boolean renderAsNormalBlock()
{
return false;
}
/**
* The type of render function that is called for this block
*/
public int getRenderType()
{
return 1;
}
@Override
public EnumPlantType getPlantType(World world, int x, int y, int z)
{
if (blockID == crops.blockID ) return Crop;
if (blockID == deadBush.blockID ) return Desert;
if (blockID == waterlily.blockID ) return Water;
if (blockID == mushroomRed.blockID ) return Cave;
if (blockID == mushroomBrown.blockID) return Cave;
if (blockID == netherStalk.blockID ) return Nether;
if (blockID == sapling.blockID ) return Plains;
if (blockID == melonStem.blockID ) return Crop;
if (blockID == pumpkinStem.blockID ) return Crop;
if (blockID == tallGrass.blockID ) return Plains;
return Plains;
}
@Override
public int getPlantID(World world, int x, int y, int z)
{
return blockID;
}
@Override
public int getPlantMetadata(World world, int x, int y, int z)
{
return world.getBlockMetadata(x, y, z);
}
}
That code I gave you needs to be in the dirt block
Do you have a block with an ID greater than 256 or 4096? It looks like you have something at ID 19000 or 18744(Not sure if its pre or post offset calculation). Check your block IDs and ensure they are in the proper range
ItemStack(mixedDust,1,-1)
Can you post a screenshot of your code and the error(s) you're getting? Or bug me on esper.net IRC on #kg6jay and I'll try and help in further detail.
Make sure you are importing a reference to the CopperDust and TinDust, and use those in your recipe. In my own code I import my main class, which has variables for each of my items and blocks, so it looks like:
Main:
Hope that gives you a place to work on your error from. Like I said before, bug me on IRC if you need more help
Can you pastebin the full error log from the eclipse console? That should have the information needed to help you.
The recipe should look like:
Also, why does it say Item.* ? That would mean you have a base edit, DON'T do that, people don't like base edits
EDIT: nvm, saw your post, can I see the error
It works for me, as long as I replace the items your tying to use with items already in the game.
Here's how I had it and it worked.
Seeds and Dirt to make an Apple.
mixed, Tin, and Copper dust are not normal minecraft items so make sure you have it pointing to the correct place.
I did all that... i don't have a flying panda's butt with what is wrong! lol i got those original errors :/ I guess ill keep messing with the coding
My computer decides to be a giant butt... i can't take a screen shot with the error code popping out.. But im back to the original errors...
You know you want to hit the subscribe button Lets get me to 500!
Do you have your code up on github or some other similar site where we can take a look at your project layout and the specific code to help you find the solution?
That would be entities. It is already there
You need item objects in your mod
EDIT: the override isnt working :c it wont compile and it has no suggestions as to what to do
My Planetminecraft Page
Yes, but don't forget to add the other necessary data
My Planetminecraft Page
Well, yeah, you need more code for that xD
You can tweak the code to get what you want, for example stop crops from growing on it
My Planetminecraft Page
That code I gave you needs to be in the dirt block
My Planetminecraft Page
My Planetminecraft Page
{
return Item ID here;
}
2013-03-12 17:08:56 [INFO] [ForgeModLoader] Forge Mod Loader version 4.7.4.520 for Minecraft 1.4.7 loading
2013-03-12 17:09:12 [INFO] [STDOUT] 27 achievements
2013-03-12 17:09:13 [INFO] [STDOUT] 210 recipes
2013-03-12 17:09:14 [INFO] [STDOUT] Setting user: Player177, -
2013-03-12 17:09:14 [INFO] [STDERR] Client asked for parameter: server
2013-03-12 17:09:14 [INFO] [STDOUT] LWJGL Version: 2.4.2
2013-03-12 17:09:16 [INFO] [ForgeModLoader] Attempting early MinecraftForge initialization
2013-03-12 17:09:16 [INFO] [STDOUT] MinecraftForge v6.6.0.497 Initialized
2013-03-12 17:09:16 [INFO] [ForgeModLoader] MinecraftForge v6.6.0.497 Initialized
2013-03-12 17:09:17 [INFO] [STDOUT] Replaced 84 ore recipies
2013-03-12 17:09:17 [INFO] [ForgeModLoader] Completed early MinecraftForge initialization
2013-03-12 17:09:18 [INFO] [ForgeModLoader] Searching C:\Users\Jason\Desktop\Minecraft WIP mods\More Minecraft\jars\mods for mods
2013-03-12 17:09:36 [INFO] [ForgeModLoader] Forge Mod Loader has identified 4 mods to load
2013-03-12 17:09:36 [INFO] [STDERR] Exception in thread "Minecraft main thread" java.lang.ExceptionInInitializerError
2013-03-12 17:09:36 [INFO] [STDERR] at java.lang.Class.forName0(Native Method)
2013-03-12 17:09:36 [INFO] [STDERR] at java.lang.Class.forName(Unknown Source)
2013-03-12 17:09:36 [INFO] [STDERR] at cpw.mods.fml.common.FMLModContainer.constructMod(FMLModContainer.java:416)
2013-03-12 17:09:36 [INFO] [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2013-03-12 17:09:36 [INFO] [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
2013-03-12 17:09:36 [INFO] [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
2013-03-12 17:09:36 [INFO] [STDERR] at java.lang.reflect.Method.invoke(Unknown Source)
2013-03-12 17:09:36 [INFO] [STDERR] at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:69)
2013-03-12 17:09:36 [INFO] [STDERR] at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
2013-03-12 17:09:36 [INFO] [STDERR] at com.google.common.eventbus.EventBus.dispatch(EventBus.java:317)
2013-03-12 17:09:36 [INFO] [STDERR] at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:300)
2013-03-12 17:09:36 [INFO] [STDERR] at com.google.common.eventbus.EventBus.post(EventBus.java:268)
2013-03-12 17:09:36 [INFO] [STDERR] at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:140)
2013-03-12 17:09:36 [INFO] [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2013-03-12 17:09:36 [INFO] [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
2013-03-12 17:09:36 [INFO] [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
2013-03-12 17:09:36 [INFO] [STDERR] at java.lang.reflect.Method.invoke(Unknown Source)
2013-03-12 17:09:36 [INFO] [STDERR] at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:69)
2013-03-12 17:09:36 [INFO] [STDERR] at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
2013-03-12 17:09:36 [INFO] [STDERR] at com.google.common.eventbus.EventBus.dispatch(EventBus.java:317)
2013-03-12 17:09:36 [INFO] [STDERR] at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:300)
2013-03-12 17:09:36 [INFO] [STDERR] at com.google.common.eventbus.EventBus.post(EventBus.java:268)
2013-03-12 17:09:36 [INFO] [STDERR] at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:83)
2013-03-12 17:09:36 [INFO] [STDERR] at cpw.mods.fml.common.Loader.loadMods(Loader.java:479)
2013-03-12 17:09:36 [INFO] [STDERR] at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:161)
2013-03-12 17:09:36 [INFO] [STDERR] at net.minecraft.client.Minecraft.startGame(Minecraft.java:410)
2013-03-12 17:09:36 [INFO] [STDERR] at net.minecraft.client.MinecraftAppletImpl.startGame(MinecraftAppletImpl.java:44)
2013-03-12 17:09:36 [INFO] [STDERR] at net.minecraft.client.Minecraft.run(Minecraft.java:744)
2013-03-12 17:09:36 [INFO] [STDERR] at java.lang.Thread.run(Unknown Source)
2013-03-12 17:09:36 [INFO] [STDERR] Caused by: java.lang.ArrayIndexOutOfBoundsException: 19000
2013-03-12 17:09:36 [INFO] [STDERR] at net.minecraft.block.Block.<init>(Block.java:324)
2013-03-12 17:09:36 [INFO] [STDERR] at net.minecraft.block.Block.<init>(Block.java:359)
2013-03-12 17:09:36 [INFO] [STDERR] at net.moreminecraft.src.BlockCopperOre.<init>(BlockCopperOre.java:10)
2013-03-12 17:09:36 [INFO] [STDERR] at net.moreminecraft.src.MoreMinecraftBass.<clinit>(MoreMinecraftBass.java:17)
2013-03-12 17:09:36 [INFO] [STDERR] ... 29 more
Then a black screen