Code:
package net.minecraft.src;
public enum EnumToolMaterialNew
{
ARIC("ARIC", 5, 3, 1000, 20F, 3, 5);
private final int harvestLevel;
private final int maxUses;
private final float efficiencyOnProperMaterial;
private final int damageVsEntity;
private final int enchantability;
private static final EnumToolMaterialNew allToolMaterials[] = (new EnumToolMaterialNew[] {
ARIC
});
private EnumToolMaterialNew(String s, int i, int j, int k, float f, int l, int i1)
{
harvestLevel = j;
maxUses = k;
efficiencyOnProperMaterial = f;
damageVsEntity = l;
enchantability = i1;
}
public int getMaxUses()
{
return maxUses;
}
public float getEfficiencyOnProperMaterial()
{
return efficiencyOnProperMaterial;
}
public int getDamageVsEntity()
{
return damageVsEntity;
}
public int getHarvestLevel()
{
return harvestLevel;
}
public int getEnchantability()
{
return enchantability;
}
}
Arictorch= new BlockTorchNew(162, 0).setHardness(1.0F).setResistance(1F).setLightVal ue(30.0F).setBlockName("Arictorch");
so richtig bei der fackel
Code:
package net.minecraft.src;
public class ItemHoeNew extends Item
{
public ItemHoeNew(int par1, EnumToolMaterialNew par2EnumToolMaterial)
{
super(par1);
maxStackSize = 1;
setMaxDamage(par2EnumToolMaterial.getMaxUses());
}
/**
* Callback for item usage. If the item does something special on right clicking, he will have one of those. Return
* True if something happen and false if it don't. This is for ITEMS, not BLOCKS !
*/
public boolean onItemUse(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World par3World, int par4, int par5, int par6, int par7)
{
if (!par2EntityPlayer.canPlayerEdit(par4, par5, par6))
{
return false;
}
int i = par3World.getBlockId(par4, par5, par6);
int j = par3World.getBlockId(par4, par5 + 1, par6);
if (par7 != 0 && j == 0 && i == Block.grass.blockID || i == Block.dirt.blockID)
{
Block block = Block.tilledField;
par3World.playSoundEffect((float)par4 + 0.5F, (float)par5 + 0.5F, (float)par6 + 0.5F, block.stepSound.getStepSound(), (block.stepSound.getVolume() + 1.0F) / 2.0F, block.stepSound.getPitch() * 0.8F);
if (par3World.isRemote)
{
return true;
}
else
{
par3World.setBlockWithNotify(par4, par5, par6, block.blockID);
par1ItemStack.damageItem(1, par2EntityPlayer);
return true;
}
}
else
{
return false;
}
}
/**
* Returns True is the item is renderer in full 3D when hold.
*/
public boolean isFull3D()
{
return true;
}
}
die hoe
Weiterhin wegen der fakel Mods loaded: 3
ModLoader 1.2.5
mod_crafting 1.1
mod_name 1.2.3
Minecraft has crashed!
----------------------
Minecraft has stopped running because it encountered a problem.
--- BEGIN ERROR REPORT 40431c7 --------
Generated 06.04.12 18:12
Minecraft: Minecraft 1.2.5
OS: Windows Vista (x86) version 6.0
Java: 1.7.0_02, Oracle Corporation
VM: Java HotSpot(TM) Client VM (mixed mode), Oracle Corporation
LWJGL: 2.4.2
OpenGL: GeForce 7050 PV / nForce 630a/PCI/SSE2/3DNOW! version 2.1.2, NVIDIA Corporation
java.lang.NullPointerException
at net.minecraft.src.ItemStack.getIconIndex(ItemStack .java:105)
at net.minecraft.src.RenderItem.renderItemIntoGUI(Ren derItem.java:270)
at net.minecraft.src.GuiContainer.drawSlotInventory(G uiContainer.java:228)
at net.minecraft.src.GuiContainer.drawScreen(GuiConta iner.java:74)
at net.minecraft.src.EntityRenderer.updateCameraAndRe nder(EntityRenderer.java:1008)
at net.minecraft.src.EntityRendererProxy.updateCamera AndRender(EntityRendererProxy.java:20)
at net.minecraft.client.Minecraft.runGameLoop(Minecra ft.java:922)
at net.minecraft.client.Minecraft.run(Minecraft.java: 801)
at java.lang.Thread.run(Unknown Source)
--- END ERROR REPORT 5a0c6ef0 ----------
wie mach ich rüstungen