Posted October 27, 20168 yr I wanna keep predictability same where can I get the Random object for minecraft? I know there is one RANDOM that forge makes but I think is private to the Block only Also I wanna use it in TileEntity Disclaimer: I been told to keep my opinions to myself, to shut up and that I am spreading lies and misinformation or even that my methods are unorthodox and or too irregular. Here are my suggestions take it or leave it.
October 27, 20168 yr World#rand Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
October 27, 20168 yr Author thank you! Disclaimer: I been told to keep my opinions to myself, to shut up and that I am spreading lies and misinformation or even that my methods are unorthodox and or too irregular. Here are my suggestions take it or leave it.
October 28, 20168 yr Wait, what exactly do you want to do? Even if you use the world Random with a specified seed, it doesn't necessarily provide predictability in the rest of the game unless you use it only during world generation. In other words, if you use it later in the gameplay you won't know how many other things have called for random numbers. If you want your own sequence of pseudo-random numbers with a controlled seed I personally would generate my own custom Random sequence. Check out my tutorials here: http://jabelarminecraft.blogspot.com/
October 28, 20168 yr World#rand is already initialized. Just call nextInt on it. If you want your OWN seed, then create a Random in your main mod class, if you're really super desparate, you could subscribe to the world-load event and initialize that Random to the world's seed. Like...what's your use-case here? Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
October 28, 20168 yr Author I used World.rand as suggested works perfect ! thanks int chance = worldIn.rand.nextInt(100) to get a percentage if (chance < 20) //20% blah blah 1 else if (chance < 40) //20% blah blah 2 works perfect thanks! Disclaimer: I been told to keep my opinions to myself, to shut up and that I am spreading lies and misinformation or even that my methods are unorthodox and or too irregular. Here are my suggestions take it or leave it.
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.