• 0

    posted a message on I am Number Four mod

    Can I add you on skype? This sounds cool and I wanna give some input.

    Yea sure thing. Now I don't have a mic so all I would be able to do is talk through the chat bar. Is that ok?
    Posted in: Requests / Ideas For Mods
  • 1

    posted a message on I am Number Four mod

    Well guys I Know that this thread is pretty old now but if youre still interested I Am making an I Am Number Four mod with legacies of flight, lumen, healing, ice etc... also mogs that will hunt you down. Weapons. Loric Chests. Lorien as a new dimension. And Other Garde who will be able to help you. Mogs will eventually invade at which point they will be everywhere. The legacies also have tiers and can be upgraded with use. It has a strain meter, and if your strain is too high you cannot use any legacies and you will be slowed. After enough time has passed you get a permanent strength and speed boost. Then theres tools and armor that increase, damage, speed and other. In is still a WIP but it will be done soon

    Posted in: Requests / Ideas For Mods
  • 0

    posted a message on Item that will switch the weather
    Quote from AdityaSF»

    Override onItemRightClick in your item class. In the onItemRightClick method, do <playerVariable>.capabilities.allowFlying = true; You can put that in an if statement if you only want to fly under certain conditions.


    Ok so I have half of it working. I have it so that when you right click the item you get the ability to fly. Now I want it to be so that if you right click again while you have the ability to fly you will lose the ability to fly. Below I've left a link to my code. If you could check it out and see if what I have is wrong or if you could tell me how to add the ability to turn it off I would be greatly appreciative.


    http://pastebin.com/kj0WqsPG


    /\
    |
    my code
    Posted in: Modification Development
  • 0

    posted a message on Item that will switch the weather

    Hey everyone, I am making a mod and one of the items I want it to be that when you right click the Item it will Toggle the weather. For example if it is Raining when you right click it, the weather will change to clear. When it is Clear the weather will change to Rain. Does anyone know how this will be possible?



    Also if anyone has any code that will toggle an ability to fly when you are holding an item can you please share it with me, I would greatly appreciate it!

    Posted in: Modification Development
  • 0

    posted a message on WIP I Am Number Four Mod!

    Hey everyone, I am making a minecraft mod based off the popular movie and book series I Am Number Four. Currently I have Legacies, Armor infused with Legacies, New Tools, The Loric Pendents, Mogadorians, Setrakus Ra, and a WIP dimension: Lorien. I am taking requests for Items to be in this mod, blocks as well. Loralite is already implemented. If anyone has any Ideas as to items from the book/movie that belong in this mod please let me know (Loric chests, and Loric weapons are in progess as well) Also if anyone can do texturing let me know and I will be in touch!

    Posted in: WIP Mods
  • 0

    posted a message on Trying to make an item that allows flight!
    Quote from Choonster»

    This is quite a bit trickier.

    The player's ability to fly is stored in their ",courier,monospace">PlayerCapabilities object (stored in the ",courier,monospace">EntityPlayer#capabilities field).

    You need to have the item check the value of ",courier,monospace">PlayerCapabilities#allowFlying every tick while it's in the inventory (from ",courier,monospace">Item#onUpdate). If it's ",courier,monospace">false, set it to ",courier,monospace">true (i.e. allow the player to fly). If the code is being run on the server (i.e. ",courier,monospace">World#isRemote is ",courier,monospace">false), call ",courier,monospace">EntityPlayer#sendPlayerAbilities to sync the player's abilities to the client.

    You also need to have a way to remove flight from players when they no longer have the item:
      • When you allow a player to fly, add their ",courier,monospace">UUID (",courier,monospace">Entity#getUniqueId) to a ",courier,monospace">Set<UUID> (only on the server side).
      • Subscribe to ",courier,monospace">ServerTickEvent and check the event's ",courier,monospace">Phase. It doesn't really matter which one, as long as you only run your code in one ",courier,monospace">Phase.
      • In your event handler, iterate through the ",courier,monospace">Set and get the corresponding ",courier,monospace">EntityPlayer from the server's ",courier,monospace">ServerConfigurationManager (1.8.9) or ",courier,monospace">PlayerList (1.9).
        • If the player is ",courier,monospace">null (i.e. they went offline), remove their ",courier,monospace">UUID.
        • If the player exists and no longer has the item in their inventory, set ",courier,monospace">PlayerCapabilities#allowFlying and ",courier,monospace">PlayerCapabilities#isFlying to ",courier,monospace">false (i.e. disallow and stop flying), sync their abilities to the client and remove their ",courier,monospace">UUID.

    • You can either iterate through the ",courier,monospace">Set with its ",courier,monospace">Iterator and use that to remove the ",courier,monospace">UUIDs or create a temporary ",courier,monospace">List to store ",courier,monospace">UUIDs that need to be removed and call ",courier,monospace">Collection#removeAll on the ",courier,monospace">Set to remove every ",courier,monospace">UUID in the ",courier,monospace">List from the ",courier,monospace">Set.

    I haven't actually implemented this myself, so this may or may not not be everything you need to do. This certainly won't be easy to implement if you only have a basic understanding of Java.


    @Override
    public void onUpdate(ItemStack stack,World world,Entity entity, int par4, boolean par5){
    super.onUpdate(stack, world, entity, par4, par5);
    {
    EntityPlayer player = (EntityPlayer) entity;
    ItemStack equipped = player.getCurrentEquippedItem();
    if(player.capabilities.allowFlying == false){
    player.capabilities.allowFlying=true;

    }
    }
    }
    }
    this is the code I am using to allow flight, do you know of a way I could turn this around so that if I'm not holding the item it denys flight? I understand what you are saying about checking if I'm still holding the item but with this code is it possible to change around?
    Posted in: Modification Development
  • 0

    posted a message on Trying to make an item that allows flight!
    Quote from Silvercatcher»

    1. I do not recommend just extending form flint&steel. Better look how it works and apply that. Tip: Fire is treated as a block in Minecraft, so you just need to know how to set blocks at certain coordinates.


    worldIn.setBlockState(target, Blocks.fire.getDefaultState()); //target is a BlockPos

    2. Making a player fly would basically mean changing his posY field. Apart from that, it depends on how you want to do it. Should it work like creative mode? Or get a certain boost upwards on rightclick? Or something else?


    I changed it so that when right clicking it gives fire by using the same code as flint and steel if that is still wrong then I will try to fix it (It works however) and I'm wanting creative mode flight, like right click it to allow creative flight, and then either right click it again to end flight or change inventory slot to deny flight.
    Posted in: Modification Development
  • 0

    posted a message on Trying to make an item that allows flight!

    I have a bare bones knowledge of java, I can make basic items and tools and apply potion effects but when it comes down to the advanced stuff like placing fire I'm at a loss. Thank you for your help I was able to get it to work by extending it to the ItemFlintAndSteel, do you by any chance know if its possible to make an item that while holding it allows you to fly? I apologize for asking you these questions but you are the only person who has helped so far, if not that is ok.

    Posted in: Modification Development
  • 0

    posted a message on Trying to make an item that allows flight!

    I am trying to mod an item that when you right click the ground fire appears, I am new to modding and may sound dumb to any long time modders, but if anyone can help me I enthusiastically ask for your help. I Am in minecraft 1.7.10. At the same time I also want an item that will change the weather also while right clicking, if this is possible I would appreciate the help. Or even if someone can explain to me the onItemRightClick function I might be able to figure it out for myself.

    Posted in: Modification Development
  • To post a comment, please .