• 0

    posted a message on [FORGE]Sword attack speed, attack limit
    Quote from Erag0n1

    Would the method work with bows as well then? and isn't it 20 ticks = 1 second? o.o


    It would work with any item you could imagine with a little tweaking. And no, unless something changed.
    Posted in: Modification Development
  • 0

    posted a message on [FORGE]Sword attack speed, attack limit
    Quote from Spacewarrior

    I have the same question as the previous commenter. I looked up the source code of the Balkon Weapon mod (which I had to decompile by the way), but that guy made soooo much things that it is confusing...


    Basicly
    pashikcraft explained everything for you. Its really simple. Just create a cooldown for your weapon (40 minecraft ticks = 1 second) which will then be used as an attack speed. I would provide you my source code but I can't as I stopped modding minecraft a long time ago and moved to a bigger project. If you need more help send me your src and I'll see what you have or haven't done.
    Posted in: Modification Development
  • 0

    posted a message on I need help with worldgen logic! [LOGIC/MATH]
    Quote from ExclamationMark

    Two questions:
    1. Where are the other layers? Did you forget them, won't you use them or are they all represented by the one below?
    2. Do you want to replace the world generator or the stone afterwards? The former is more complicated, the ladder may take a lot of processor speed/ram but is very comfortable to code, also the ravines and everything.


    I want the other layers to generate under each other in this pattern (like yellow one - using that logic), and Iam still looking for a solution. I will replace the stone afterwards, it wont cause that much of performance drop, just look at that mod that used to change how ores generate (dont remember the name). They used a special block to replace everything so that they could have a clean generation of ores. When I was using it, I didn't notice much of a difference.

    However, if there will be mayor performance losses when generating chunks, I will look into changing the world generator.
    Posted in: Modification Development
  • 0

    posted a message on I need help with worldgen logic! [LOGIC/MATH]
    Quote from ExclamationMark

    Then do a drawing with all the layers and think about more possible situations, like ravines, small mountains, big mountains and so on.

    Also what do you want to know exactly? The height for each layer dependant on the over all height of the landscape?


    First layer should start right under the dirt layer. Should be 10 blocks deep from that point. That would be easy right? But look what would happen in scenarios like this (Imagine brown is dirt, yellow is my Material 1 I want to generate, and rest is stone


    But it should aslo cut into mountains like this when possible, so the final product would have to look more like this.



    Those are "big mountains". Small ones would get fixed if I wound solution to this. And aslo, ravines dont represent problem, as they are generated last (with caves) so that would be really hard to fix that I dont even want to bother with it.
    Posted in: Modification Development
  • 0

    posted a message on Making a String to wool mod help.
    Quote from darkariel7

    - snip -

    Why is the recipe not working?


    I'm quite sure that the wool is called cloth (however, I'm to lazy to check). Try using Block.cloth, 1, 0
    Posted in: Modification Development
  • 0

    posted a message on I need help with worldgen logic! [LOGIC/MATH]
    Quote from ExclamationMark

    If you want it so it's possible that material yellow is exposed, similar to vanilla stone in high mountains, but grey material should never be exposed, you could just do a flat grey layer, a weird form brown layer and use yellow to fill the holes.

    If not, you could specify your wishes a bit more and I'll do a math function for you. I had math exams yesterday, so I'm pretty good at it atm.

    But you need to remind that bedrock is a flat layer, so you need to fill holes underneith mountains anyway, you just need to choose if it's by using grey, yellow, 50% each or what.


    Well it would consist of not 2, but actually more layers (probably 6, maybe 7) and first 5(or 6 if there were 7 layers) layers would be thick 10 blocks and the last layer would fill up everything which is left underneath till bedrock.

    If you want it so it's possible that material yellow is exposed, similar to vanilla stone in high mountains, but grey material should never be exposed


    Exactly this!

    I would be very greatfull if you would do the math for me, because I really do suck at it, atleast at this part. If you really want to contribute this much, just tell me if you need more information.

    Aslo coolAlias thank you for you answer, if noone comes with a better solution I'll look into this. Thats what I had on my mind in first place.
    Posted in: Modification Development
  • 0

    posted a message on I need help with worldgen logic! [LOGIC/MATH]
    So I have been thinking whole day and I can't think of efficient way of doing this. What I'am trying to do, is to make some of my custom materials spawn underground in layers (simmilar how the Earth is, first is Earth's crust, next mantle etc.). My first thought was finding the highest grass || stone || sand block and then just making my material spawn in collum at specific Z cord from that block. However this would make high mountains look really wierd, and fast changes in height on some places of map would make it look even wierder (basicly it wouldnt be a layer anymore).So I came up with this:



    Green - Grass
    Brown - Dirt
    Yellow - Material 1
    Cyan? - Material 2

    First my goal is to generate layer underneath ne grass 4 blocks deep that will replace stone. However as you can see from the picture above even on mountain sides the layers should cut 4 block inside the mountain, and go up on y axis until there is no stone to replace or hits dirt/grass.

    But I have no logical idea how would I make that happen. Could anyone help me with this? (Please note that Material 1 and Material 2 can only generate where stone was.

    EDIT: I'm not asking for a code. I need logical (or math) guidelines (yeah my math sucks, and yet im trying to be an programmer one day, wierd right?).
    Posted in: Modification Development
  • 0

    posted a message on Pixela Insula - An overgrown survival island [300+ downloads][HARD]
    Quote from Hardwool

    I tried to combat the dense forestation with a little fire and this is what happened: http://i.imgur.com/dFyBC2W.jpg?1
    Half an hour later, it was still burning :D


    I bet it could wipe out the entire island! :P
    Posted in: Maps
  • 0

    posted a message on Pixela Insula - An overgrown survival island [300+ downloads][HARD]
    Quote from getfugu

    Looks really cool actually, haven't downloaded but surely will. I think it would be awesome if you added more screenshots and the challenges list to this page (I assume challenges are in-game). I'd love a coast screenshot along with maybe a overhead view from a ways up. The two screenshots you have look abosolutely epic though.


    This is only the rough "sketch" of the map. I'm still working on a lot of things, I will render more images today. And I will definitely add challenges. Thank you for feedback. :wub:
    Posted in: Maps
  • 0

    posted a message on Pixela Insula - An overgrown survival island [300+ downloads][HARD]
    Quote from Hardwool

    This map looks great and I'd really like to play on it, but could you release a survival-mode version of it?

    That would be great, thanks!


    This is a survival version. I just noticed I left the game in creative, thank you. Just open your chat and use /gamemode 0 command and you are ready to go.

    I will upload the fixed version later this day, because I'm not at home at the moment.
    Posted in: Maps
  • 0

    posted a message on Pixela Insula - An overgrown survival island [300+ downloads][HARD]
    I'm proud to present the new, better and improved Pixela Insula! More pictures comming soon. And as always, leave your feedback and suggestions! (Planetminecraft is still hosting the old version of the map).
    Posted in: Maps
  • 0

    posted a message on Special Spiders: Add some destruction to your spiders!
    Quote from SkeletonModIdeas

    I always thought minecraft needed more types of spiders than spiders and cave spiders. Here are my ideas for spiders:

    Brown Recluse:
    Spawns in dark areas. Gives you poison II for 10 seconds. Wait what? Isn't that a little op? Nope. They spawn as rarely as spider jockeys. They are a light brown with dark brown eyes. They drop 1-3 spider eyes, and 1-2 string.

    Black Widow:
    Spawns in dark areas. Gives you poison for 5 seconds. They spawn as rarely as baby zombies. They look like normal spiders but have a red hourglass mark on their back. They drop 1-4 spider eyes, and 1-2 string. Very rarely they will drop 1 spider web.

    Wolf Spider:
    No, not a wolf-spider hybrid (Although that would be cool.) Wolf spiders are a light brown spider with black eyes. They spawn in extreme hills during both day and night. They are neutral and drop 1-2 spider eyes, 1-2 string.

    Tarantula:
    These gargantuan arthropods spawn in deserts at night. They are twice the size of normal spiders but are slower. They spawn as rarely as spider jockeys. They are neutral and drop 1-2 leather, 1-2 spider eyes, and 1-7 string. They look like normal spiders except they are brown.

    Mossy Cobble Spider:
    These mysterious spiders only spawn in jungle temples. They are as big as cave spiders and are as rare as baby zombies. They are hostile and drop 1-2 fermented spider eyes and 1-2 mossy cobblestone. They look like spiders with a mossy cobblestone skin.

    Frostbite Spider:
    They have traveled from the snowy plains of skyrim to live in the snowy plains of minecraftia. They spawn at night in ice plains and taigas and are quite common. They are hostile and give you slowness II for 5 seconds. They look like blueish-black spiders with ice-blue eyes. They drop 1-2 snowballs, 1-3 string, and 1-2 spider eyes.

    The Gargantula:
    Every mod needs a boss and this is this mods boss. It is as big as a ghast and can only be hurt by arrows. It shoots fire charges at you and summons thunder. It is VERY hostile and is summoned by right clicking a nether star. They have 300 health and if you do manage to kill it, it drops 1-100 spider eyes, 1-80 string, 1-20 spider webs, and 1-5 nether stars.

    That is all.
    If you like the mod idea and want to make it, please message me.
    Thanks
    -Skeleton Mod Ideas


    If you could texture, I would take this.
    Posted in: Requests / Ideas For Mods
  • 0

    posted a message on [Question] Saving a variable to tileentity?
    Quote from Mizore_Shirayuki

    Create "getters" and "setters" in your class handling the NBT-Tags, and use those. Getters and Setters are used to allow access to private or local variables for other classes. Here's what one should look like:
    private int state; //Always keep this variable private and use getters and setters since accessing it directly could cause error at some point
    /*
    * Blah blah blah NBT-Handling code etc.
    */
    
    //Getter
    public int getState()
    {
    return stateVariable;
    }
    //Setter
    public void setState(int state)
    {
    this.state = state;
    }


    Now take your code and implement these to acquire what your desired logic:
    public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9)
    {
    if (player.getCurrentEquippedItem() != null && player.getCurrentEquippedItem().getItem() == Item.diamond && NBTHandlerClass.getState() == 0)
    {
    ItemStack heldStack = player.getCurrentEquippedItem();
    TileEntityTable state = (TileEntityTable) world.getBlockTileEntity(x, y, z);
    }
    return true;
    }



    Two methods? With only return statement? (To be honest that would probably be the last thing on my mind). I feel ashamed now, but yeah well I guess I learned something. I feel sorry for bothering you. Thank you for helping me out! :)
    Posted in: Modification Development
  • 0

    posted a message on [Question] Saving a variable to tileentity?
    CARNIFEXJE: I'm currently taking C# course, but so far we are still doing some pretty basic stuff. It may sound simple for you now, but It was hard once.. I'm trying to learn java bymself, watching tutorials (not only about minecraft modding), so give me some time. If you want to help, help me, if not please dont leave unhelpfull comments. Those courses aren't free either.

    I was reading a few NBT-Tags tutorial right now and I think I understand them. However I still cannot figure the part that comes before.
    public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9){
      if (player.getCurrentEquippedItem() != null && player.getCurrentEquippedItem().getItem() == Item.diamond){
      ItemStack heldStack = player.getCurrentEquippedItem();
      TileEntityTable state = (TileEntityTable) world.getBlockTileEntity(x, y, z);
      }


    What should I add next, I want to check if state==0 and if yes set it to 1, if it equals 1 nothing should happen. I understand the logic behind it, but I'm not sure how to code it, code I have written gave my a bunch of errors.
    Posted in: Modification Development
  • 0

    posted a message on [Question] Saving a variable to tileentity?
    I have created a new block and onItemRightClick I would like to save an variable to tileentity based on item I clicked with.

    I need variable "state" saved to tileentity.
    lets say for item 1 I would like to set variable "state" to 1. (state = 1), for second item set it to 2 and so on.
    And after that I have another class which requires reading "state" from tileentity and returning different things depending on "state" value.

    How would I do this? I probably know how to code it, but I'm not sure what are the methods used for saving to tileentity from block.class and reading it from tileentity? (I know how to use up onItemRightClick etc...), so if you could just feed me code for setting variable from block to tileentity would be great. Thanks :)
    Posted in: Modification Development
  • To post a comment, please or register a new account.