• 0

    posted a message on distinguish between inventory and primary inventory
    ok, now the game crashes when I shoot, at least something happens lol

    public InventoryPlayer par5InventoryPlayer;
       
      
     
        public void onPlayerStoppedUsing(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer, int par4)
        {
    	
    	    boolean var5 = par3EntityPlayer.capabilities.isCreativeMode || EnchantmentHelper.getEnchantmentLevel(Enchantment.infinity.effectId, par1ItemStack) > 0;
    	   
    		 if (var5 || par5InventoryPlayer.mainInventory[30].itemID == Item.arrow.shiftedIndex ){
    	  
    Posted in: Modification Development
  • 0

    posted a message on distinguish between inventory and primary inventory
    Quote from Plecks

    The problem is you're comparing apples to oranges. Or rather, ItemStacks (in mainInventory) to Ints (the item index). Try using mainInventory[0].itemID == Item.arrow.shiftedIndex.

    it doesn't work, even putting an arrow in each slot of the inventory lol
    Posted in: Modification Development
  • 0

    posted a message on distinguish between inventory and primary inventory
    lol anyone? I'm going insane trying
    Posted in: Modification Development
  • 0

    posted a message on distinguish between inventory and primary inventory
    Quote from charsmud

    You can get the location of which square the item is in. If it is in 0-8 (the first square is counted as 0), then shoot that arrow instead. :)

    exactly what I was looking for, how do I do?
    now the bow uses this
    par3EntityPlayer.inventory.hasItem(Item.arrow.shiftedIndex)


    I wonder what should I do, something like
    if (mainInventory[0] == Item.arrow.shiftedIndex)

    and so on until 8?

    EDIT: I tried like so and I don't get any error, but the bow won't shoot even if the arrow is in the very first slot of the small inventory or even the first of the normal inventory

    if (par5InventoryPlayer.mainInventory[0].equals(Item.arrow.shiftedIndex)){


    (I previously declared the variable InventoryPlayer par5InventoryPlayer)
    Posted in: Modification Development
  • 0

    posted a message on distinguish between inventory and primary inventory
    Hi everyone, i'm making some new types of arrows (I know that probably there are tons of mods like that, i'm just trying to)
    the problem is that the bow shoots the normal arrows if they're in the inventory, and I wanna make that the bow shoots the arrows that are in the primary inventory( I don't know how to call it, the small inventory at the bottom of the screen)
    I tried in EntityBow.java but I cant find the name of that inventory
    Posted in: Modification Development
  • 0

    posted a message on block name
    I tried to put it in block.java like so
    public static final Block speed = (new BlockSpeed(150)).setHardness(5.0F).setResistance(10.0F).setStepSound(soundMetalFootstep).setBlockName("speed block").LanguageRegistry.addName(speed, "speed block");


    and in my BlockSpeed.java like so

    package net.minecraft.src;
    import java.util.Random;
    
    
    public class BlockSpeed extends Block
    {
    
    public BlockSpeed(int blockID)
    {
    	 super(blockID, 150, Material.cloth);
    this.blockIndexInTexture = 26;
    this.setCreativeTab(CreativeTabs.tabBlock);
    LanguageRegistry.addName(speed, "speed block");
    }
    Posted in: Modification Development
  • 0

    posted a message on block name
    uhm I use forge but
    LanguageRegistry.addName(speed, "speed block");

    returns me an error, "cannot be resolved into a variable, I tried to import all with cmd+shift+o in eclipse but it didn't work...
    Posted in: Modification Development
  • 0

    posted a message on block name
    hi everyone, I created for testing a simple block that speed up whoever walks on it in the same direction he was walking before, the block works properly, the problem is that I can't give it a name

    here's my declaration in Block.java

    public static final Block speed = (new BlockSpeed(150)).setHardness(5.0F).setResistance(10.0F).setStepSound(soundMetalFootstep).setBlockName("speed block");


    but if I move the mouse over it, it just show an empty blue small rectangle...

    where's my error? :D
    Posted in: Modification Development
  • 0

    posted a message on Shaders Mod (updated by karyonix)
    Quote from bobbybear11

    can some one help when ever i log into a map or online server my screen is black. can i get help plz?


    read my post, I had the same problem, go in minecraft.jar>shaders>final.fsh and try deactivating some functions by putting // before #define etc... for me it was #define WATER_SHADER, when I deactivated it the mod magically worked
    Posted in: Minecraft Mods
  • 0

    posted a message on Minecraft modding...
    Hi everyone, I'm a bit into java and I am may be interested in mod development, I don't think I'm at that level yet but you know, I just want to take a look at the code, to know what it looks like and to play with it a little bit
    the thing is that I don't know how to decompile the classes (embarassing lol) to get into the code

    how do I do? I use Eclipse as IDE and I'm on Mac OS X
    Posted in: Modification Development
  • 0

    posted a message on Shaders Mod (updated by karyonix)
    FOR MAC USERS
    i got a mac, with OS X Lion, and the mod WORKS PERFECTLY except a little thing, I had to deactivate the water shader, but may be it's only for me, so go and install it properly! if you can log in but you can't see anything (entered in the world but black screen) then go in minecraft.jar>shaders>final.fsh and put // before "#define WATER_SHADER", it worked for me, and now i have the mod working on my mac, running at 50 fps.
    Posted in: Minecraft Mods
  • 0

    posted a message on Shaders Mod (updated by karyonix)
    solved the problem in some way, now I have a cute, fancy, big purple ocean haha
    Posted in: Minecraft Mods
  • 0

    posted a message on Shaders Mod (updated by karyonix)
    uhm by disabling WATER_SHADER i barely can see water, there's any way to make it work with that option or at least put the default water texture?
    Posted in: Minecraft Mods
  • 0

    posted a message on Shaders Mod (updated by karyonix)
    @ Moster i use Ovo rustic 2.2 adjusted by sildur :D
    @ xyzRx i'm not sure but i think it's only a problem of chunk loading...you have to wait the world to load
    Posted in: Minecraft Mods
  • 0

    posted a message on Shaders Mod (updated by karyonix)
    Quote from Moster

    I guess some of the features in SEUS make it black. For example I couldnt use blur effect or glare. Then everything got black for me, too.

    You can look into the composite.fsh and final.fsh. At the beginning of both files you see those #define. When you put // infront of them, they get disabled. Try to turn some of them off. I guess one of those options is causing your issue

    DID IT: disabled "WATER_SHADER" and changed texture pack with one of the ones you posted before and the magic is done! thank you all :D
    Posted in: Minecraft Mods
  • To post a comment, please or register a new account.