
Neo2k
Members-
Posts
16 -
Joined
-
Last visited
Converted
-
Gender
Undisclosed
-
Personal Text
I am new!
Neo2k's Achievements

Tree Puncher (2/8)
1
Reputation
-
Can someone tell me what is wrong?
-
But can you please explain me what i must do in this case?!
-
I hope you can explain me why I do this with a tutorial and the maker don't explain for what the numbers are...
-
Hello together, i have a problem with my custom crop. Here is the code: package xooth.core.blocks; import java.util.Random; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.BlockCrops; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.network.packet.Packet3Chat; import net.minecraft.server.MinecraftServer; import net.minecraft.util.Icon; import net.minecraft.util.MathHelper; import net.minecraft.world.World; import xooth.core.CoreItems; import xooth.core.blocks.*; public class PlantTomato extends BlockCrops { @SideOnly(Side.CLIENT) private Icon[] iconArray; public PlantTomato(int par1) { super(par1); } @SideOnly(Side.CLIENT) public Icon getIcon(int par1, int par2) { if (par2 < 7) { if (par2 == 6) { par2 = 5; } return this.iconArray[par2 >> 1]; } else { return this.iconArray[4]; } } protected int getSeedItem() { return CoreItems.tomatoSeed.itemID; } protected int getCropItem() { return CoreItems.tomatoFood.itemID; } public int idDropped(int par1, Random par2Random, int par2) { return par1 == 7 ? this.getCropItem() : this.getSeedItem(); } public int quantityDropped(Random par1Random) { return 1; } @SideOnly(Side.CLIENT) public void registerIcons(IconRegister reg) { this.iconArray = new Icon[5]; for (int i = 0; i < this.iconArray.length; i++) { this.iconArray[i] = reg.registerIcon("Core:tomatoCrop_" + i); } } } The Problem is: my tomato plant has 5 images but the fourth image is skipped. If i use Bonemeal on the plant I must use it one time longer that means if i see the correct last image from the tomato plant i must use one more bonemeal to complete the plant. Can someone help me with my problem? Sorry for not so good english
-
Hey, it doesn't work... the same issue than before.. this is actually my onBlockDestroyedByPlayer Code: @Override public void onBlockDestroyedByPlayer(World par1World, int par2, int par3, int par4, int par5) { if(par1World.isRemote) { Random chance = new Random(); int chance1 = chance.nextInt(10); if (chance1 == 2) { chance1 = chance.nextInt(3); if (chance1 == 0) { par1World.spawnEntityInWorld(new EntityItem(par1World, par2, par3, par4, new ItemStack(CoreItem.malachit.itemID, 1, 0))); } else if (chance1 == 1) { par1World.spawnEntityInWorld(new EntityItem(par1World, par2, par3, par4, new ItemStack(CoreItem.rubin.itemID, 1, 0))); } else if (chance1 == 2) { par1World.spawnEntityInWorld(new EntityItem(par1World, par2, par3, par4, new ItemStack(CoreItem.saphir.itemID, 1, 0))); } } } } EDIT: Oh i forgot to write the "!" for the code... my failure.. i have change if(par1World.isRemote) to if(!par1World.isRemote) and now it works fine. But can someone explain me what does the function "par1World.isRemote"? Thanks
-
oh okay, can you try to solve the problem for/with me when you are at home? I test further in the meantime...
-
what do you mean?
-
I improve me... Its not fixed... Any Idea?
-
yes, this is exactly this what i want to do. the code works, but a litte issue is there. Here is the function: public void onBlockDestroyedByPlayer(World par1World, int par2, int par3, int par4, int par5) { par1World.spawnEntityInWorld(new EntityItem(par1World, par2, par3, par4, new ItemStack(CoreItem.rubin, 1, 0))); } But when i break the block ingame, there are 3 Items to pickup, the block self, the one item i let spawn and the item again, but i cant pick up.. Before Pick up: After Pick up: Have you an idea why are spawning 2 rubins in my case? Thanks already Edit: I dont know how, but now it works probably Thanks a lot
-
yes of course. This is that what i mean
-
i mean not different drops on a random number.. i want that when i break the block, that drops 2-3 different items/blocks with a different quantity. is that possible? edit: i found this piece of code on minecraft forum: public void dropBlockAsItemWithChance(World par1World, int par2, int par3, int par4, int par5, float par6, int par7) { if (!par1World.isRemote) { int var8 = this.quantityDroppedWithBonus(par7, par1World.rand); for (int var9 = 0; var9 < var8; ++var9) { if (par1World.rand.nextFloat() <= par6) { int var10 = this.idDropped(par5, par1World.rand, par7); int var11 = 262; if(dropArrows) { this.dropBlockAsItem_do(par1World, par2, par3, par4, new ItemStack(var10, 1, this.damageDropped(par5))); this.dropBlockAsItem_do(par1World, par2, par3, par4, new ItemStack(var11, 64, this.damageDropped(par5))); dropArrows = false; } else { if (var10 > 0) { this.dropBlockAsItem_do(par1World, par2, par3, par4, new ItemStack(var10, 1, this.damageDropped(par5))); } } } } } } but i dont know how to integrate this for my usage...
-
You must register the names in your mod class. Example: public void load(FMLInitializationEvent event) { LanguageRegistry.addName(Mod_ParallelWorlds.NightStone, "Night Stone"); }
-
Hey together, i have a problem. I want that one block drop multiple Items/Blocks with different quantity. Can anyone show me an example on how to do this? Thanks a lot
-
Hey together, I search for a few days good tutorials about how to making a custom chest, but every Tutorial i found is different than the other one and every of these tutorials aren't work probably. Have anyone of you a good Tutorial about how to making a custom chest? Thanks