Mod Sticky Item MOD [0.2 PATCH]

Oui pardon c'était setLightValue et pas setBrightness, j'avais pas le code sous les yeux
 
Quand c'est pas un problème d'originalité c'est un problème de codes...
MAIS POURQUOI UN MOD VANILLA?
Ton mod ne sera jamais connu et restera dans l'oubli si il est sans Modloader , sauf si c'est pour un serveur.
Donc passe "le sous modloader/ton chemin"
 
Bah tu peux désinstaler le mod seulement en suprimant le mod_"nomdumod" , Tu modifie pas les sources pour un mdo aussi simple , puis mon d'incompatibilitée!
 
ok j'ai commencer voici mon code pour Sticky_MOD

package net.minecraft.src;

import java.util.ArrayList;

public class Sticky_MOD extends BaseMod
{
public static final Block BlocItem = (new BlockItem(300, 0)).setHardness(0.01F).setResistance(10F).setStepSound(Block.soundStoneFootstep).setBlockName("BlocItem");


public void load()
{
BlocItem.blockIndexInTexture = ModLoader.addOverride("terrain.png", "mod/swordWood.png");
ModLoader.registerBlock(BlocItem);
ModLoader.addName(BlocItem, "Sticky Item");
ModLoader.addRecipe(new ItemStack(BlocItem, 1), new Object [] {"#", Character.valueOf('#'), Block.wood});
}

public String getVersion()
{
return "STICKY_mod-1.2.5";

}}

et mon code pour l'item

package net.minecraft.src;

import java.util.ArrayList;
import java.util.Random;

public class BlockItem extends Block
{
protected BlockItem(int i, int j)
{
super(i, j, Material.wood);
}

public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int i, int j, int k)
{
return null;
}

public void addCreativeItems(ArrayList itemList)
{
itemList.add(new ItemStack(this));
}
public boolean isOpaqueCube()
{
return false;
}

public boolean renderAsNormalBlock()
{
return false;
}

public int getRenderType()
{
return 30;
}

public void onBlockPlacedBy(World world, int i, int j, int k, EntityLiving entityliving)
{
int l = MathHelper.floor_double((double)((entityliving.rotationYaw * 4F) / 360F) + 0.5D) & 3;
int i1 = world.getBlockMetadata(i, j, k) & 4;

if (l == 0)
{
world.setBlockMetadataWithNotify(i, j, k, 2 | i1);
}

if (l == 1)
{
world.setBlockMetadataWithNotify(i, j, k, 1 | i1);
}

if (l == 2)
{
world.setBlockMetadataWithNotify(i, j, k, 3 | i1);
}

if (l == 3)
{
world.setBlockMetadataWithNotify(i, j, k, 0 | i1);
}

if (l == 5)
{
world.setBlockMetadataWithNotify(i, j, k, 0 | i1);
}
}

public boolean canPlaceBlockAt(World world, int i, int j, int k)
{
if (world.isBlockNormalCubeDefault(i - 1, j, k, true))
{
return true;
}

if (world.isBlockNormalCubeDefault(i + 1, j, k, true))
{
return true;
}

if (world.isBlockNormalCubeDefault(i, j, k - 1, true))
{
return true;
}

return world.isBlockNormalCubeDefault(i, j, k + 1, true);
}
public int idDropped(int i, Random random, int j)
{
return Sticky_MOD.BlocItem.blockID;
}
public int quantityDropped(Random random)
{
return 1;
mais ce que je ne comprend pas c'est que mon craft ne marche pas et il n'y a pas mon bloc en creative
 
Pour le craft, tu as bien copié collé la recette qui marchait avant, en mettant juste Modloader.addrecipe?
 
Pour le block en créative c'est normal , Il faud mettre un fonction spéciale (que je connais pas u.u , c'est automatique pour les items)
Pour la recette , c'est ceci:
ModLoader.addRecipe(new ItemStack(BlockItem, 1), new Object[]
{" D ", Character.valueOf('D'), Block.wood});

Ps: Tu a bien Modlaoder , hein?
 
La fonction c'est :

Code:
public void addCreativeItems(ArrayList itemList)
    {
            itemList.add(new ItemStack(this));
    }

sa fonctionne que avec modloader
 
je ne sais pas g essayer le sfonction pour le craft et pour le crea sa ne marche toujours pas merci kan meme pourtant je les bien fais j'ai mis le mod loader dans le minecraft.jar de mcp il y a bien basemod dans les class sa a de compiler mais sa ne marche pas