Page 1 of 2 12 LastLast
Results 1 to 10 of 16

Thread: [java] help

  1. #1
    w_is_awesome's Avatar
    Join Date
    Dec 2011
    Gender
    Location
    NoWhereVille, California
    Age
    19
    Posts
    132
    Thanks
    61
    Thanked 11 Times in 10 Posts


    Downloads
    77
    Uploads
    0
    Mentioned
    12 Post(s)
    Time Online
    19 h 7 m
    Avg. Time Online
    N/A
    Rep Power
    6

    [java] help

    Well I'm making a minecraft mod and I don't know how to make it spawn only ###Seconds/Ticks. Can someone please help me. I'm using eclipse
    Last edited by w_is_awesome; 04-07-2012 at 12:37 AM.

  2. #2
    Little Brother


    Zachafer's Avatar
    Join Date
    Dec 2011
    Gender
    Posts
    1,206
    Thanks
    723
    Thanked 1,392 Times in 651 Posts


    Downloads
    81
    Uploads
    17
    Mentioned
    497 Post(s)
    Time Online
    21 d 17 h 32 m
    Avg. Time Online
    16 m
    Rep Power
    14
    Why don't you start by posting what code you have and what you have tried.

  3. #3
    w_is_awesome's Avatar
    Join Date
    Dec 2011
    Gender
    Location
    NoWhereVille, California
    Age
    19
    Posts
    132
    Thanks
    61
    Thanked 11 Times in 10 Posts


    Downloads
    77
    Uploads
    0
    Mentioned
    12 Post(s)
    Time Online
    19 h 7 m
    Avg. Time Online
    N/A
    Rep Power
    6
    It is a run off of the zombie... one of my first mods... here it is.

    Last edited by J_L_K_64; 04-07-2012 at 01:24 AM.

  4. #4
    Little Brother


    Zachafer's Avatar
    Join Date
    Dec 2011
    Gender
    Posts
    1,206
    Thanks
    723
    Thanked 1,392 Times in 651 Posts


    Downloads
    81
    Uploads
    17
    Mentioned
    497 Post(s)
    Time Online
    21 d 17 h 32 m
    Avg. Time Online
    16 m
    Rep Power
    14
    Can you elaborate on "make it spawn only ###Seconds/Ticks" ?

    I'm unfamiliar with Minecraft

  5. #5
    w_is_awesome's Avatar
    Join Date
    Dec 2011
    Gender
    Location
    NoWhereVille, California
    Age
    19
    Posts
    132
    Thanks
    61
    Thanked 11 Times in 10 Posts


    Downloads
    77
    Uploads
    0
    Mentioned
    12 Post(s)
    Time Online
    19 h 7 m
    Avg. Time Online
    N/A
    Rep Power
    6
    well so the map doesnt overload i only want the entity to spawn/load every (lets say) 60 seconds
    ticks is another measurement in minecraft.

  6. #6
    Little Brother


    Zachafer's Avatar
    Join Date
    Dec 2011
    Gender
    Posts
    1,206
    Thanks
    723
    Thanked 1,392 Times in 651 Posts


    Downloads
    81
    Uploads
    17
    Mentioned
    497 Post(s)
    Time Online
    21 d 17 h 32 m
    Avg. Time Online
    16 m
    Rep Power
    14
    Quote Originally Posted by w_is_awesome View Post
    well so the map doesnt overload i only want the entity to spawn/load every (lets say) 60 seconds
    ticks is another measurement in minecraft.
    60 seconds is different than ticks. I would set a variable that holds the last System.currentTimeMillis() and is set when you spawn/load the entity. Then in the code for spawning the entity, ensure that System.currentTimeMillis() - lastRespawn >= 60000 before spawning.

  7. #7
    w_is_awesome's Avatar
    Join Date
    Dec 2011
    Gender
    Location
    NoWhereVille, California
    Age
    19
    Posts
    132
    Thanks
    61
    Thanked 11 Times in 10 Posts


    Downloads
    77
    Uploads
    0
    Mentioned
    12 Post(s)
    Time Online
    19 h 7 m
    Avg. Time Online
    N/A
    Rep Power
    6
    ik ticks is like .4 seconds. but would the code look like this.
    [CODE]
    {
    System.currentTimeMillis
    {
    lastRespawn = 60000
    }
    }
    [CODE]
    tab button isn't working srry

    But i think it goes after
    [Code]
    Import java.until.[Something goes here]
    [CODE]
    Last edited by w_is_awesome; 04-07-2012 at 01:04 AM.

  8. #8
    Little Brother


    Zachafer's Avatar
    Join Date
    Dec 2011
    Gender
    Posts
    1,206
    Thanks
    723
    Thanked 1,392 Times in 651 Posts


    Downloads
    81
    Uploads
    17
    Mentioned
    497 Post(s)
    Time Online
    21 d 17 h 32 m
    Avg. Time Online
    16 m
    Rep Power
    14

  9. The Following User Says Thank You to Zachafer For This Useful Post:

    w_is_awesome (04-07-2012)

  10. #9
    w_is_awesome's Avatar
    Join Date
    Dec 2011
    Gender
    Location
    NoWhereVille, California
    Age
    19
    Posts
    132
    Thanks
    61
    Thanked 11 Times in 10 Posts


    Downloads
    77
    Uploads
    0
    Mentioned
    12 Post(s)
    Time Online
    19 h 7 m
    Avg. Time Online
    N/A
    Rep Power
    6
    thank you but i have one issue.



    The thing in red gives me this error: "Cannot return within and intializer"

  11. #10
    Little Brother


    Zachafer's Avatar
    Join Date
    Dec 2011
    Gender
    Posts
    1,206
    Thanks
    723
    Thanked 1,392 Times in 651 Posts


    Downloads
    81
    Uploads
    17
    Mentioned
    497 Post(s)
    Time Online
    21 d 17 h 32 m
    Avg. Time Online
    16 m
    Rep Power
    14

  12. The Following User Says Thank You to Zachafer For This Useful Post:

    w_is_awesome (04-07-2012)

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •