Jump to content

passing in a class and then instantiating later?


endershadow

Recommended Posts

start with something like

public Class<? extends BowType.class> type;
public itemConstructor(int id, Class<? extends BowType.class> c){
super(i);
type = c;
}

;

 

then depending on if the class constructor needs parameters

public BowType bowInit(){
try{
//no parameters
return type.newInstance();
} catch(Exception e){
e.printStackTrace();
}
return null;
}

or

public BowType bowInit(){
try{
return type.getConstructor(Parameter1.class, Parameter2.class).newInstance(parameter1Object, parameter2Object);
} catch(Exception e){
e.printStackTrace();
}
return null;
}

I think its my java of the variables.

Link to comment
Share on other sites

I did what you said but it crashed on the onPlayerStoppedUsing method. Here's the code for the class file. And please ignore the badly named variables. I basically copied the ItemBow class.

 

package matt.lyoko.items;

import net.minecraftforge.common.*;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.enchantment.*;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.*;
import net.minecraft.src.*;
import net.minecraft.world.World;
import net.minecraftforge.event.entity.player.*;
import matt.lyoko.*;
import matt.lyoko.entities.*;

public class ItemLyokoRanged extends Item
{       
    public ItemLyokoRanged(int id, Class<? extends EntityLyokoRanged> c, Item item, String text)
    {
        super(id);
        maxStackSize = 1;
        setMaxDamage(200);
        this.setCreativeTab(CodeLyoko.LyokoTabs);
        this.setFull3D();
        entityLyokoRanged = c;
        reqItem = item;
        texture = text;
    }
    
    private Class<? extends EntityLyokoRanged> entityLyokoRanged;
    private Item reqItem;
    private String texture;
    
    public void onPlayerStoppedUsing(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer, int par4)
    {
        int var6 = this.getMaxItemUseDuration(par1ItemStack) - par4;
        
        ArrowLooseEvent event = new ArrowLooseEvent(par3EntityPlayer, par1ItemStack, var6);
        MinecraftForge.EVENT_BUS.post(event);
        if (event.isCanceled())
        {
            return;
        }
        var6 = event.charge;
        
        boolean var5 = par3EntityPlayer.capabilities.isCreativeMode || EnchantmentHelper.getEnchantmentLevel(Enchantment.infinity.effectId, par1ItemStack) > 0;

        if (var5 || par3EntityPlayer.inventory.hasItem(reqItem.itemID))
        {
            float var7 = (float)var6 / 20.0F;
            var7 = (var7 * var7 + var7 * 2.0F) / 3.0F;

            if ((double)var7 < 0.1D)
            {
                return;
            }

            if (var7 > 1.0F)
            {
                var7 = 1.0F;
            }

            EntityLyokoRanged var8 = null;// = new EntityFan(par2World, par3EntityPlayer, var7 * 20.0F);
            
            if(entityLyokoRanged != null)
            {
            	try
            	{
            		var8 = entityLyokoRanged.getConstructor(World.class, EntityLiving.class, Float.class).newInstance(par2World, par3EntityPlayer, var7 * 20F);
            	}
            	catch(Exception e){
            		e.printStackTrace();
            	}
            }
            else
            {
            	return;
            }

            if (var7 == 1.0F)
            {
                var8.setIsCritical(true);
            }

            int var9 = EnchantmentHelper.getEnchantmentLevel(Enchantment.power.effectId, par1ItemStack);

            if (var9 > 0)
            {
                var8.setDamage(var8.getDamage() + (double)var9 * 0.5D + 0.5D);
            }

            int var10 = EnchantmentHelper.getEnchantmentLevel(Enchantment.punch.effectId, par1ItemStack);

            if (var10 > 0)
            {
                var8.setKnockbackStrength(var10);
            }

            if (EnchantmentHelper.getEnchantmentLevel(Enchantment.flame.effectId, par1ItemStack) > 0)
            {
                var8.setFire(100);
            }

            par1ItemStack.damageItem(1, par3EntityPlayer);
            //par2World.playSoundAtEntity(par3EntityPlayer, "random.bow", 1.0F, 1.0F / (itemRand.nextFloat() * 0.4F + 1.2F) + var7 * 0.5F);

            if (var5)
            {
                var8.canBePickedUp = 2;
            }
            else
            {
                //par3EntityPlayer.inventory.consumeInventoryItem(Item.arrow.shiftedIndex);
            }

            if (!par2World.isRemote)
            {
                par2World.spawnEntityInWorld(var8);
            }
        }
    }

    public ItemStack onFoodEaten(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer)
    {
        return par1ItemStack;
    }

    /**
     * How long it takes to use or consume an item
     */
    public int getMaxItemUseDuration(ItemStack par1ItemStack)
    {
        return 72000;
    }

    /**
     * returns the action that specifies what animation to play when the items is being used
     */
    //public EnumAction getItemUseAction(ItemStack par1ItemStack)
    //{
    //    return EnumAction.bow;
    //}

    /**
     * Called whenever this item is equipped and the right mouse button is pressed. Args: itemStack, world, entityPlayer
     */
    public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer)
    {
        ArrowNockEvent event = new ArrowNockEvent(par3EntityPlayer, par1ItemStack);
        MinecraftForge.EVENT_BUS.post(event);
        if (event.isCanceled())
        {
            return event.result;
        }
        
        if (par3EntityPlayer.capabilities.isCreativeMode || par3EntityPlayer.inventory.hasItem(CodeLyoko.Fan.itemID))
        {
            par3EntityPlayer.setItemInUse(par1ItemStack, this.getMaxItemUseDuration(par1ItemStack));
        }

        return par1ItemStack;
    }

    /**
     * Return the enchantability factor of the item, most of the time is based on material.
     */
    public int getItemEnchantability()
    {
        return 1;
    }
    
    @Override
public void updateIcons(IconRegister iconRegister)
{
    	iconIndex = iconRegister.registerIcon("lyoko:" + texture);
}
    
    private int life = 200;

public void onUpdate(ItemStack stack, World world, Entity ent, int par4, boolean par5)
{
	if(ent instanceof EntityPlayer)
	{
		EntityPlayer player = (EntityPlayer)ent;
		if(life > 0)
		{
			life--;
		}
		else
		{
			for(int i = 0; i < player.inventory.mainInventory.length; i++)
			{
				if(player.inventory.getStackInSlot(i) == stack)
				{
					player.inventory.setInventorySlotContents(i, null);
				}
			}
			life = 200;
		}
	}
}
}

 

Link to comment
Share on other sites

this is exactly what was in the error.

 

 

 

      Minecraft has crashed!     

      ----------------------     

 

Minecraft has stopped running because it encountered a problem; Unexpected error

 

A full error report has been saved to C:\MCP_1.5.1_Code_Lyoko\jars\.\crash-reports\crash-2013-04-12_16.42.14-client.txt - Please include a copy of that file (Not this screen!) if you report this crash to anyone; without it, they will not be able to help fix the crash :(

 

 

 

--- BEGIN ERROR REPORT d2c58f14 --------

Full report at:

C:\MCP_1.5.1_Code_Lyoko\jars\.\crash-reports\crash-2013-04-12_16.42.14-client.txt

Please show that file to Mojang, NOT just this screen!

 

Generated 4/12/13 4:42 PM

 

-- Head --

Stacktrace:

at matt.lyoko.items.ItemLyokoRanged.onPlayerStoppedUsing(ItemLyokoRanged.java:83)

at net.minecraft.item.ItemStack.onPlayerStoppedUsing(ItemStack.java:499)

at net.minecraft.entity.player.EntityPlayer.stopUsingItem(EntityPlayer.java:251)

at net.minecraft.client.multiplayer.PlayerControllerMP.onStoppedUsingItem(PlayerControllerMP.java:505)

 

-- Affected level --

Details:

Level name: MpServer

All players: 1 total; [EntityClientPlayerMP['986523714'/1592, l='MpServer', x=-234.78, y=71.62, z=239.35]]

Chunk stats: MultiplayerChunkCache: 325

Level seed: 0

Level generator: ID 00 - default, ver 1. Features enabled: false

Level generator options:

Level spawn location: World: (-232,64,244), Chunk: (at 8,4,4 in -15,15; contains blocks -240,0,240 to -225,255,255), Region: (-1,0; contains chunks -32,0 to -1,31, blocks -512,0,0 to -1,255,511)

Level time: 392 game time, 392 day time

Level dimension: 0

Level storage version: 0x00000 - Unknown?

Level weather: Rain time: 0 (now: false), thunder time: 0 (now: false)

Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: false

Forced entities: 135 total; [EntityPig['Pig'/821, l='MpServer', x=-171.50, y=70.00, z=315.53], EntityPig['Pig'/820, l='MpServer', x=-175.50, y=70.00, z=314.50], EntityZombie['Zombie'/272, l='MpServer', x=-305.69, y=17.00, z=212.50], EntitySkeleton['Skeleton'/279, l='MpServer', x=-310.50, y=48.00, z=245.50], EntitySheep['Sheep'/817, l='MpServer', x=-172.50, y=63.00, z=309.91], EntitySheep['Sheep'/816, l='MpServer', x=-173.19, y=63.00, z=299.78], EntityPig['Pig'/819, l='MpServer', x=-169.50, y=71.99, z=317.54], EntityPig['Pig'/818, l='MpServer', x=-171.50, y=70.00, z=314.22], EntitySpider['Spider'/283, l='MpServer', x=-312.07, y=49.81, z=285.33], EntitySkeleton['Skeleton'/282, l='MpServer', x=-312.50, y=49.00, z=283.50], EntitySkeleton['Skeleton'/280, l='MpServer', x=-307.63, y=48.00, z=248.09], EntityZombie['Zombie'/807, l='MpServer', x=-167.44, y=38.00, z=208.44], EntityZombie['Zombie'/812, l='MpServer', x=-169.55, y=38.00, z=210.56], EntityZombie['Zombie'/813, l='MpServer', x=-169.41, y=38.00, z=209.70], EntitySheep['Sheep'/815, l='MpServer', x=-172.72, y=63.00, z=301.50], EntityZombie['Zombie'/270, l='MpServer', x=-306.53, y=13.81, z=222.28], EntityZombie['Zombie'/808, l='MpServer', x=-167.56, y=38.00, z=211.44], EntityZombie['Zombie'/271, l='MpServer', x=-306.69, y=18.00, z=213.50], EntityZombie['Zombie'/809, l='MpServer', x=-168.16, y=38.00, z=209.28], EntityZombie['Zombie'/810, l='MpServer', x=-168.53, y=38.00, z=210.16], EntityZombie['Zombie'/811, l='MpServer', x=-171.25, y=38.00, z=216.28], EntityPig['Pig'/791, l='MpServer', x=-166.53, y=73.00, z=204.47], EntityPig['Pig'/790, l='MpServer', x=-165.81, y=73.00, z=205.53], EntityZombie['Zombie'/789, l='MpServer', x=-169.66, y=38.00, z=207.38], EntityPig['Pig'/788, l='MpServer', x=-172.50, y=77.00, z=187.50], EntityPig['Pig'/787, l='MpServer', x=-170.50, y=77.00, z=185.50], EntityPig['Pig'/786, l='MpServer', x=-168.50, y=77.00, z=188.50], EntityCreeper['Creeper'/521, l='MpServer', x=-266.56, y=20.00, z=243.03], EntityCreeper['Creeper'/793, l='MpServer', x=-169.47, y=17.00, z=214.97], EntityPig['Pig'/792, l='MpServer', x=-167.50, y=72.00, z=207.50], EntityPig['Pig'/529, l='MpServer', x=-261.47, y=75.00, z=244.66], EntityPig['Pig'/528, l='MpServer', x=-257.47, y=74.00, z=246.37], EntityPig['Pig'/530, l='MpServer', x=-254.68, y=74.00, z=250.53], EntityZombie['Zombie'/881, l='MpServer', x=-158.50, y=38.00, z=214.50], EntityPig['Pig'/880, l='MpServer', x=-158.50, y=73.00, z=203.50], EntityItem['item.tile.sapling.oak'/1855, l='MpServer', x=-200.40, y=77.13, z=286.13], EntityPig['Pig'/614, l='MpServer', x=-257.32, y=75.00, z=244.50], EntityItem['item.tile.sapling.oak'/615, l='MpServer', x=-247.13, y=82.13, z=250.81], EntityClientPlayerMP['986523714'/1592, l='MpServer', x=-234.78, y=71.62, z=239.35], EntityPig['Pig'/639, l='MpServer', x=-237.81, y=79.00, z=170.31], EntityPig['Pig'/638, l='MpServer', x=-238.28, y=79.00, z=168.63], EntityPig['Pig'/637, l='MpServer', x=-241.80, y=78.00, z=169.39], EntityPig['Pig'/576, l='MpServer', x=-248.50, y=79.00, z=160.31], EntityBat['Bat'/373, l='MpServer', x=-304.47, y=17.75, z=216.51], EntityZombie['Zombie'/372, l='MpServer', x=-303.38, y=17.00, z=213.34], EntitySkeleton['Skeleton'/375, l='MpServer', x=-299.53, y=20.00, z=226.06], EntitySkeleton['Skeleton'/374, l='MpServer', x=-305.67, y=17.10, z=221.45], EntityPig['Pig'/369, l='MpServer', x=-288.31, y=72.00, z=201.66], EntityPig['Pig'/368, l='MpServer', x=-289.53, y=72.00, z=199.31], EntityZombie['Zombie'/371, l='MpServer', x=-300.50, y=19.00, z=215.50], EntityPig['Pig'/370, l='MpServer', x=-289.53, y=72.00, z=201.03], EntityZombie['Zombie'/857, l='MpServer', x=-158.56, y=23.00, z=200.97], EntityCreeper['Creeper'/856, l='MpServer', x=-158.38, y=23.00, z=199.97], EntitySkeleton['Skeleton'/377, l='MpServer', x=-297.50, y=20.00, z=226.50], EntityCreeper['Creeper'/376, l='MpServer', x=-301.50, y=20.00, z=225.50], EntityCreeper['Creeper'/357, l='MpServer', x=-300.50, y=17.00, z=207.50], EntityBat['Bat'/358, l='MpServer', x=-294.99, y=20.49, z=201.67], EntityBat['Bat'/359, l='MpServer', x=-290.78, y=30.81, z=194.91], EntityCreeper['Creeper'/842, l='MpServer', x=-158.50, y=28.00, z=160.50], EntitySkeleton['Skeleton'/841, l='MpServer', x=-157.50, y=28.00, z=160.50], EntityBat['Bat'/606, l='MpServer', x=-249.22, y=22.85, z=242.85], EntityBat['Bat'/410, l='MpServer', x=-293.85, y=32.85, z=295.35], EntityZombie['Zombie'/408, l='MpServer', x=-291.84, y=26.00, z=296.28], EntityBat['Bat'/409, l='MpServer', x=-297.78, y=29.11, z=296.05], EntityPig['Pig'/682, l='MpServer', x=-209.94, y=78.00, z=177.91], EntityPig['Pig'/681, l='MpServer', x=-209.25, y=78.00, z=183.50], EntityPig['Pig'/680, l='MpServer', x=-210.53, y=78.00, z=183.50], EntityPig['Pig'/679, l='MpServer', x=-208.13, y=78.00, z=183.66], EntityBat['Bat'/403, l='MpServer', x=-302.69, y=51.75, z=283.83], EntityZombie['Zombie'/400, l='MpServer', x=-302.50, y=31.00, z=283.50], EntityZombie['Zombie'/401, l='MpServer', x=-303.50, y=31.00, z=284.50], EntityZombie['Zombie'/406, l='MpServer', x=-300.55, y=28.00, z=288.63], EntityCreeper['Creeper'/407, l='MpServer', x=-298.50, y=28.00, z=288.50], EntitySheep['Sheep'/404, l='MpServer', x=-292.50, y=66.00, z=273.50], EntitySheep['Sheep'/405, l='MpServer', x=-292.47, y=72.00, z=272.34], EntitySheep['Sheep'/395, l='MpServer', x=-294.50, y=65.00, z=258.34], EntityCreeper['Creeper'/399, l='MpServer', x=-300.50, y=28.00, z=287.50], EntityPig['Pig'/398, l='MpServer', x=-292.03, y=66.00, z=270.13], EntitySheep['Sheep'/397, l='MpServer', x=-296.06, y=65.00, z=260.09], EntitySheep['Sheep'/396, l='MpServer', x=-291.66, y=66.00, z=268.94], EntityItem['item.tile.sapling.oak'/653, l='MpServer', x=-239.47, y=77.13, z=284.13], EntityBat['Bat'/652, l='MpServer', x=-232.02, y=29.83, z=245.99], EntityPig['Pig'/655, l='MpServer', x=-238.41, y=63.00, z=312.84], EntityPig['Pig'/654, l='MpServer', x=-239.55, y=63.00, z=295.97], EntityBat['Bat'/443, l='MpServer', x=-279.24, y=12.78, z=234.52], EntitySkeleton['Skeleton'/649, l='MpServer', x=-235.50, y=20.00, z=241.50], EntitySkeleton['Skeleton'/648, l='MpServer', x=-233.34, y=20.00, z=243.50], EntitySkeleton['Skeleton'/650, l='MpServer', x=-232.31, y=20.00, z=243.50], EntityPig['Pig'/645, l='MpServer', x=-234.50, y=70.00, z=230.50], EntityPig['Pig'/432, l='MpServer', x=-275.50, y=72.00, z=188.78], EntityPig['Pig'/644, l='MpServer', x=-234.69, y=70.00, z=223.47], EntityPig['Pig'/433, l='MpServer', x=-275.94, y=71.00, z=177.94], EntityPig['Pig'/434, l='MpServer', x=-278.50, y=72.00, z=187.50], EntitySkeleton['Skeleton'/435, l='MpServer', x=-287.35, y=19.73, z=194.43], EntityEnderman['Enderman'/641, l='MpServer', x=-237.41, y=19.00, z=236.69], EntityPig['Pig'/436, l='MpServer', x=-287.47, y=72.00, z=203.09], EntityPig['Pig'/437, l='MpServer', x=-275.50, y=78.00, z=192.50], EntityPig['Pig'/643, l='MpServer', x=-234.50, y=70.00, z=226.50], EntityPig['Pig'/642, l='MpServer', x=-234.50, y=70.00, z=230.50], EntitySkeleton['Skeleton'/431, l='MpServer', x=-284.50, y=22.00, z=185.50], EntityPig['Pig'/417, l='MpServer', x=-299.53, y=66.00, z=316.50], EntityPig['Pig'/416, l='MpServer', x=-304.89, y=66.00, z=308.49], EntityPig['Pig'/419, l='MpServer', x=-298.28, y=66.00, z=316.50], EntityPig['Pig'/418, l='MpServer', x=-293.46, y=66.99, z=311.63], EntityPig['Pig'/656, l='MpServer', x=-236.44, y=63.00, z=304.97], EntityPig['Pig'/657, l='MpServer', x=-234.34, y=63.00, z=306.84], EntityBat['Bat'/1700, l='MpServer', x=-290.56, y=53.00, z=290.75], EntityPig['Pig'/464, l='MpServer', x=-280.50, y=68.00, z=270.31], EntitySheep['Sheep'/463, l='MpServer', x=-286.69, y=66.00, z=271.25], EntityPig['Pig'/462, l='MpServer', x=-282.50, y=67.00, z=271.66], EntityCreeper['Creeper'/461, l='MpServer', x=-284.50, y=39.00, z=262.50], EntityCreeper['Creeper'/460, l='MpServer', x=-281.50, y=39.00, z=268.50], EntityCreeper['Creeper'/459, l='MpServer', x=-274.50, y=70.00, z=252.50], EntityPig['Pig'/754, l='MpServer', x=-178.19, y=77.00, z=177.13], EntityPig['Pig'/755, l='MpServer', x=-191.41, y=77.00, z=195.53], EntityPig['Pig'/753, l='MpServer', x=-189.50, y=74.00, z=189.50], EntitySheep['Sheep'/759, l='MpServer', x=-176.44, y=65.00, z=309.66], EntityPig['Pig'/756, l='MpServer', x=-186.22, y=81.00, z=208.47], EntityPig['Pig'/715, l='MpServer', x=-192.50, y=77.00, z=193.50], EntityItem['item.tile.sapling.oak'/717, l='MpServer', x=-203.88, y=77.13, z=275.88], EntitySkeleton['Skeleton'/716, l='MpServer', x=-194.50, y=41.00, z=208.50], EntityCreeper['Creeper'/705, l='MpServer', x=-211.65, y=55.00, z=275.84], EntityPig['Pig'/707, l='MpServer', x=-216.47, y=67.00, z=309.41], EntityCreeper['Creeper'/706, l='MpServer', x=-209.04, y=56.00, z=282.58], EntityPig['Pig'/709, l='MpServer', x=-220.81, y=68.00, z=316.50], EntitySkeleton['Skeleton'/496, l='MpServer', x=-270.50, y=8.00, z=185.50], EntityPig['Pig'/708, l='MpServer', x=-217.50, y=69.00, z=307.50], EntityPig['Pig'/710, l='MpServer', x=-215.31, y=69.00, z=313.53], EntityCreeper['Creeper'/495, l='MpServer', x=-270.50, y=8.00, z=179.50], EntityZombie['Zombie'/494, l='MpServer', x=-269.50, y=8.00, z=179.50], EntityBat['Bat'/485, l='MpServer', x=-274.63, y=26.01, z=310.52], EntityZombie['Zombie'/484, l='MpServer', x=-284.50, y=26.00, z=299.50], EntityPig['Pig'/481, l='MpServer', x=-280.50, y=67.00, z=278.50], EntitySheep['Sheep'/483, l='MpServer', x=-287.25, y=66.00, z=273.69], EntitySheep['Sheep'/482, l='MpServer', x=-287.81, y=66.00, z=280.84]]

Retry entities: 0 total; []

Stacktrace:

at net.minecraft.client.multiplayer.WorldClient.addWorldInfoToCrashReport(WorldClient.java:441)

at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Minecraft.java:2405)

at net.minecraft.client.Minecraft.run(Minecraft.java:779)

at java.lang.Thread.run(Unknown Source)

 

-- System Details --

Details:

Minecraft Version: 1.5.1

Operating System: Windows 7 (amd64) version 6.1

Java Version: 1.7.0_10, Oracle Corporation

Java VM Version: Java HotSpot 64-Bit Server VM (mixed mode), Oracle Corporation

Memory: 792680792 bytes (755 MB) / 1037959168 bytes (989 MB) up to 1037959168 bytes (989 MB)

JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M

AABB Pool Size: 21635 (1211560 bytes; 1 MB) allocated, 2 (112 bytes; 0 MB) used

Suspicious classes: FML and Forge are installed

IntCache: cache: 0, tcache: 0, allocated: 3, tallocated: 63

FML: MCP v7.44 FML v5.1.16.639 Minecraft Forge 7.7.1.639 4 mods loaded, 4 mods active

mcp [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available

FML [Forge Mod Loader] (coremods) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available

Forge [Minecraft Forge] (coremods) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available

CodeLyoko

 (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available

LWJGL: 2.4.2

OpenGL: Intel® HD Graphics 4000 GL version 4.0.0 - Build 9.17.10.2867, Intel

Is Modded: Definitely; Client brand changed to 'fml,forge'

Type: Client (map_client.txt)

Texture Pack: Default

Profiler Position: N/A (disabled)

Vec3 Pool Size: 1304 (73024 bytes; 0 MB) allocated, 12 (672 bytes; 0 MB) used

 

java.lang.NullPointerException

at matt.lyoko.items.ItemLyokoRanged.onPlayerStoppedUsing(ItemLyokoRanged.java:83)

at net.minecraft.item.ItemStack.onPlayerStoppedUsing(ItemStack.java:499)

at net.minecraft.entity.player.EntityPlayer.stopUsingItem(EntityPlayer.java:251)

at net.minecraft.client.multiplayer.PlayerControllerMP.onStoppedUsingItem(PlayerControllerMP.java:505)

at net.minecraft.client.Minecraft.runTick(Minecraft.java:1761)

at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:831)

at net.minecraft.client.Minecraft.run(Minecraft.java:756)

at java.lang.Thread.run(Unknown Source)

--- END ERROR REPORT c75d6d71 ----------

 

 

 

There is a difference between float and Float. Read up java boxing.

 

what did do you mean? isn't Float the class, and float the number

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.