RNG manipulation and you - RNG theory part 1/3

  Рет қаралды 36,762

Xcom6000

Xcom6000

6 жыл бұрын

Part one of the RNG manipulation explanation.
Scicraft Members on KZbin:
Ragou42: / ragou42
Ilmango: / ilmango
Azelef: / azelef34
Nathan Ryan: / @nathanryan4145
Gnembon_mc: / gnembon
Coolmann: / coolmann24
Nasm Nasmus: / @nasmnasmus866
L64: / @user-qu5ge3wp1b
Treefork: / treeforkyt
Enemysfriend22: / enemysfriend22
Methodzz: / @methodzzs
MrFrancesco98: / @mrfrancesco9840
Eta740: / eta7400
Xcom6000: / xcom6000
TDL: / tdlmc
Pallapalla: / pallapalla
Oreo Lamp: / @oreolamp5676
Helvince: / vincenthel1
T5gy5: / @t5gy520
NarcolepticFrog: / narcolepticfrog
Theosib: / theosib
Myren: / @myreneario7216
Mythical Pingu: / @mythicalpingu
2No2Name: / its2no2name
PanNic: / pannic97
Nessie: / nessiestudio
Scicraft Members on Livestreams:
Ilmango: / ilmango
NorwegianArtist: / norwegianartist
PanNic: / pannic97
Xcom6000: / xcom6000
Nessie: / nessieqt

Пікірлер: 94
@PanNic97
@PanNic97 6 жыл бұрын
What a random video
@Haha007
@Haha007 6 жыл бұрын
PanNic97 just another random pun. XD
@nidhiprasad9673
@nidhiprasad9673 4 жыл бұрын
Have you turned into ragou?
@jackmama109
@jackmama109 3 жыл бұрын
Hmm yes very random, the topic of rng manipulation definitely doesn’t become a Topic of drama in the next 2 years hm
@zorbix3652
@zorbix3652 3 жыл бұрын
**WHEEZE**
@hobrin4242
@hobrin4242 3 жыл бұрын
But totally predictable, of course!
@Earthcomputer
@Earthcomputer 6 жыл бұрын
Great explanation of mechanics that are so closely related to the code. The details are so complex that you basically have to be a code reader to understand everything, but this should give enough of an overview for most people. I will try to get out some more practical tutorials on my channel whilst you do a great job explaining more of the theory :)
@packediceisthebestminecraf9007
@packediceisthebestminecraf9007 4 жыл бұрын
A stack of likes.
@fwiffo
@fwiffo 6 жыл бұрын
I hope this is a good lesson for junior programmers. Avoid, as much as humanly possible, any kind of global or shared state. Or any kind of state. Shared state might be the most common cause of difficult-to-diagnose or hard-to-reproduce bugs. The fact that there is one instance of Random() that is shared between deterministic world generation, and random game events (dispensers, particles, mob spawning, weather, enchantments, etc. etc.) is sloppy as hell. There isn't some kind of worldwide RNG shortage! Shared state has caused all kinds of other crazy bugs in Minecraft in the past (remember that stupid bug where fence-posts and chests had globally shared hit-boxes?) I assume these bugs are ancient; pity the poor Mojang developers working on that codebase. God bless Notch, but he'll admit himself he's not a professional programmer.
@Xcom6000
@Xcom6000 6 жыл бұрын
Its often the bugs that makes this game more interesting. A clean minecraft would have been far less fun to play.
@Arm3dWithWings
@Arm3dWithWings 6 жыл бұрын
Indeed, buggy games-> more "features." Also, pretty sure that "stupid fence hitbox bug" along with any type of pane, iron bars, etc. was used in remote redstone with globally shared hitboxes (not completely sure it was the same hitbox bug, but it was related and fixed in the same version iirc). If everything was exactly as mojang wanted, it would be pretty dull.
@fwiffo
@fwiffo 6 жыл бұрын
Minecraft is pretty much the only piece of software that is made better by bugs, on balance.
@JoeTaber
@JoeTaber 5 жыл бұрын
The right way to fix this "bug" is to separate world gen random from other uses of random. I imagine this would be easy enough to implement as a point release fix for 12.2. (But I'm notoriously bad at estimates, so grain of salt etc.) It really seems like a very junior mistake to reuse rand between such different subsystems, and resetting the seed should be a huge red flag.
@theosib
@theosib 6 жыл бұрын
This video was majorly interesting to watch!
@Redz
@Redz 6 жыл бұрын
Very neat explanation about how everything rng works!
@Haha007
@Haha007 6 жыл бұрын
Nice video. Finaly someone shows some code of stuff that he explains. Thx for the explanation.
@liamkeough8775
@liamkeough8775 6 жыл бұрын
gg mojang nice explanation
@asailijhijr
@asailijhijr 4 жыл бұрын
Dude, you are so much better at MS Paint than anybody else I've seen do coding explanations in paint.
@mrfincher
@mrfincher 6 жыл бұрын
very nice and interesting video! love to see more!
@shanefking898
@shanefking898 4 жыл бұрын
wow I wish to someday be as comfortable with minecraft mechanics as you are. You have taught so many people so many interesting creations. Thank you, sincerely, for your videos. One of the smartest players probably ever.
@cezerelecrucio9717
@cezerelecrucio9717 3 жыл бұрын
The idea of up and down ticks is interesting, it's almost like tickspeed is your tempo and updates happen on 8th and 16th notes instead of every quarter note like you'd expect.
@marcelofaraujo
@marcelofaraujo 6 жыл бұрын
Lots of fun! Thanks!
@Nooticus
@Nooticus 6 жыл бұрын
Very informative video indeed!
@chrisja1998
@chrisja1998 6 жыл бұрын
Good Explanation xcom
@andreaaristokrates9516
@andreaaristokrates9516 6 жыл бұрын
An hour long you said? That'd be like 2/3 of one lecture, seems reasonable, but a little short. Would watch.
@JasonGamingForever
@JasonGamingForever 6 жыл бұрын
I am fascinated by this but please demonstrate it like when you say you can get the tree to drop a sapling then I think it would be great to see it happening
@Xcom6000
@Xcom6000 6 жыл бұрын
2No2Name made a video on this. In his video he didn't do leaves but it was about ores, same concept.
@alexvance0
@alexvance0 3 жыл бұрын
which of the 7 categories of updates like player updates, weather, mob spawning etc- which one would breaking an ore block like diamond ore fall in, would it be player updates or tile entites? Edit: nvm, rewatched a part i was confused on and answered myself. thanks
@HorochovPL
@HorochovPL 3 жыл бұрын
Object names like theProfiler, thePlayerManager... "the" kinda hurts my eyes. Unless it's THE (one and only true) profiler. :D
@Eta7400
@Eta7400 6 жыл бұрын
Nice! Also, just "minor" detail: in tick phases, the "redstone" you're referring to is likely tile ticks. You skipped block events (pistons, beacons, spawners, echest etc) and entities which would be between village logic (door registration/golem spawning/siege?) and tile entities
@Xcom6000
@Xcom6000 6 жыл бұрын
There are tons of code that doesn't use the world random so they can be skipped. I left the most stuff out that doesn't serve much of a purpose in RNG and made it far simpler.
@ners6512
@ners6512 4 жыл бұрын
Not a single dislike... Woah
@megamlgman7662
@megamlgman7662 4 жыл бұрын
look what you've done
@anthonywilson620
@anthonywilson620 6 жыл бұрын
So you could use this to make wither skeletons drop their skulls every time? Cool! This video is great for explaining things about code to people who don’t code, although I wouldn’t know, becuase I code with 3 languges. One question I do still have though, is would it work the same (or similar) on the Bedrock Edition of Minecraft? Probably not, right?
@Xcom6000
@Xcom6000 6 жыл бұрын
Doesn't work in the nether at all and bedrock, noone knows.
@anthonywilson620
@anthonywilson620 6 жыл бұрын
Xcom6000 Guess I’ll have to start testing!
@natetolbert3671
@natetolbert3671 4 жыл бұрын
You should have used this knowledge to write a mod script for Max rng returns when 1.12 was a thing. Would have been easy. Just continuously call nextint() method in a loop (with a ms or 2 delay @each iteration) and feed it the correct number. Is there a getter somewhere (maybe in the Rand class) that returns the rng value upon reset when given a seed and location?
@natetolbert3671
@natetolbert3671 4 жыл бұрын
Nm it's a bit more complicated. Easier just to override method.
@anunayy
@anunayy 5 жыл бұрын
"Everyone is aware about what a chunk is".. So why did you explain it? lmao. Amazing video btw.
@Xcom6000
@Xcom6000 5 жыл бұрын
I dono : ) Nothings scripted so I repeat random stuff sometimes.
@packediceisthebestminecraf9007
@packediceisthebestminecraf9007 4 жыл бұрын
Because minecraft bedrock players don't know what a chunk is, there is no F3 + G
@FireDramine7
@FireDramine7 3 жыл бұрын
@@packediceisthebestminecraf9007 eh I mean that says nothing. I knew what a chunk was before I knew how to orient a chunk with f3
@packediceisthebestminecraf9007
@packediceisthebestminecraf9007 3 жыл бұрын
@@FireDramine7 That's probably because you watched a lot of minecraft vids. I didn't know what a chunk was until i started playing the java edition and i found F3 + G
@HeroixMusic
@HeroixMusic 4 жыл бұрын
What is the reason behind Weather being the second thing the game checks for?
@strawberrystrawberry7149
@strawberrystrawberry7149 3 жыл бұрын
its halfway through and im spacing out i am so lost. it'll definitely take me a few tries to get this information through my head- no fault of anyone but me, though! this is a really interesting topic, glad i found it :>
@feschber
@feschber 6 жыл бұрын
Could you please tell me where you got the minecraft code from? I once decompiled it but all variables and functions don't have proper names then and I would have to find them all. Is that actually what you guys did or is there a different way of getting the source? 🤔 I'm very interested in reading the code so thanks in advance ☺
@feschber
@feschber 6 жыл бұрын
It's so funny that they just hardcoded a seed 😄
@feschber
@feschber 6 жыл бұрын
Has that got something to do with the /locate command maybe?
@Xcom6000
@Xcom6000 6 жыл бұрын
Search for MCP on youtube. Its a few steps to it but tons of tutorials on it.
@feschber
@feschber 6 жыл бұрын
Xcom6000 Thanks a lot I just found it on the wiki
@natetolbert3671
@natetolbert3671 4 жыл бұрын
Out of curiosity, how did you acquire the src? Did you use reverse engineer w a decompileror or was it leaked? I remember trying to find it online like 6 or 7 yrs ago.
@elithecoder
@elithecoder 4 жыл бұрын
Minecraft is released in a jar file, which isn't compiled. JAR stands for Java Archive so it actually can be uncompressed to get the source code.
@whatis4295
@whatis4295 3 жыл бұрын
You can use MCP to decompile the code and using some mappings, it can rename files to friendly to understand names. Minecraft is closed source, so the code is not released, especially not in the jar file, but Mojang does provide mappings to help modders.
@DunnickFayuro
@DunnickFayuro 5 жыл бұрын
So in theory, I could manipulate the rng to spawn only creepers in a given space?
@Xcom6000
@Xcom6000 5 жыл бұрын
In 1 chunk only, its only possible to manipulate creepers past 1 chunk in 1.8 and lower versions.
@hobrin4242
@hobrin4242 3 жыл бұрын
@@Xcom6000 ic on 2b2t we are gonna start fighting with creepers instead of crystals
@saadamin6951
@saadamin6951 4 жыл бұрын
I think why seeds are generated using perlin noise and not RNG is that because RNG is a much more intensive process than generating using math
@fashnek
@fashnek 4 жыл бұрын
?? RNG is math.
@saadamin6951
@saadamin6951 4 жыл бұрын
@@fashnek I meant to say "RNG is a much more intensive process for terrain generation than using perlin noise" If you still don't get it, I'm trying to say is the RNG algorithms take up more CPU power than using a perlin noise algorithm. I'm 99% nextInt and Math.random() will just take up a lot more power than int VarName=5*1;
@hobrin4242
@hobrin4242 3 жыл бұрын
Wrong! If only trees would generate at the same location every time at the same coordinates. The order of the chunk population is a factor too because I think some trees (tree A) can grow into other spots rendering them unavailable for other trees (tree B), but tree B could also grow first and block tree A. (That is just my logical explanation I thought of without looking at code, but it makes sense.) (This is a huge problem in seed overlay, a hack where you generate part of the world client side and compare it to the real world to see what exactly has changed and trace people's path)
@anoob8582
@anoob8582 3 жыл бұрын
Mojang wants to know your location
@ralphy1054
@ralphy1054 4 жыл бұрын
Does rng manipulation work in 1.14.4 or the 1.15 snapshots?
@nisse7798
@nisse7798 4 жыл бұрын
no
@EchoFolf
@EchoFolf 3 жыл бұрын
sadly nope
@mamupelu565
@mamupelu565 5 жыл бұрын
Where do you download minecraft source code?
@Usedtobestankrewww
@Usedtobestankrewww 3 жыл бұрын
What were you doing to find this.
@josechristianduarter
@josechristianduarter 4 жыл бұрын
where did you get minecraft source code?
@user-ut1hq1wz3q
@user-ut1hq1wz3q 4 жыл бұрын
Жалко что нет переводов, разобраться бы во всём этом)))
@flo0778
@flo0778 28 күн бұрын
I still don't understand why getting a random number for some coordinate should have any impact on the rest of the world. It should be just a deterministic hashing of the coordinates with the world static seed (ex : isMension= new Random(seed + coordinates).nextBoolean()). This code is flawded.
@konoashi
@konoashi 27 күн бұрын
Because it set the random algorithm seed using structure coordinates that are themselves based on map seed (not to confuse with algo seed), then every event in the game that are pseudo random use the next(next(next(...next(seed)...))) so the last generated structure which is going to set random algo seed is going to determine the pseudo randomness.
@flo0778
@flo0778 27 күн бұрын
​@@konoashi Despite "because", your statement does not address my point
@konoashi
@konoashi 27 күн бұрын
@@flo0778 then I did not understand your question if there's even one in a first place
@sanpai6785
@sanpai6785 3 жыл бұрын
Doesn't that mean that technically there can be 4 mantions next to each other
@hobrin4242
@hobrin4242 3 жыл бұрын
correct, you understood that part
@JayTailor45
@JayTailor45 4 жыл бұрын
+Xcom6000 How can I get the code ?
@dontsubme1891
@dontsubme1891 4 жыл бұрын
I want you to rng manipulate The Matrix
@gwandnefusicharainerwingl4892
@gwandnefusicharainerwingl4892 6 жыл бұрын
Uggh Eclipse
@25NN25
@25NN25 6 жыл бұрын
uggh java*
@feschber
@feschber 6 жыл бұрын
Why don't you like eclipse?!
@gwandnefusicharainerwingl4892
@gwandnefusicharainerwingl4892 6 жыл бұрын
i just prefer intellij idea
@brickie9816
@brickie9816 3 жыл бұрын
Is it still working on 1.15 or 1.16?
@harrypotter5460
@harrypotter5460 3 жыл бұрын
No, something changed after 1.12
@brickie9816
@brickie9816 3 жыл бұрын
@@harrypotter5460 ok thanks
@creationfied
@creationfied 6 жыл бұрын
?
@venkyman4985
@venkyman4985 4 жыл бұрын
which version is it?
@Xcom6000
@Xcom6000 4 жыл бұрын
1.12
@sukikurai
@sukikurai 4 жыл бұрын
Can i just get a video telling me how to, for example, manipulate how many diamonds I get from an ore, I don’t understand most of this I just want to be able to do it
@hamix0137
@hamix0137 9 күн бұрын
g
@royliu2864
@royliu2864 6 жыл бұрын
2nd comment
@nowymail
@nowymail 6 жыл бұрын
Requires lots of work. Doesn't work with the newest version. Meh.
@maheshwariravichandran6866
@maheshwariravichandran6866 4 жыл бұрын
Read my name
@dontsubme1891
@dontsubme1891 4 жыл бұрын
I want you to rng manipulate The Matrix
Just another random video - RNG theory part 2/3
33:41
Xcom6000
Рет қаралды 9 М.
End of Farms
7:10
Xcom6000
Рет қаралды 177 М.
ОДИН ДОМА #shorts
00:34
Паша Осадчий
Рет қаралды 6 МЛН
Когда на улице Маябрь 😈 #марьяна #шортс
00:17
I MADE A CARDBOARD SWING!#asmr
00:40
HAYATAKU はやたく
Рет қаралды 30 МЛН
Minecraft From Day One
5:00
Cubey
Рет қаралды 18 МЛН
Basics of Slimeblock Flying Machines Tutorial
22:05
ilmango
Рет қаралды 355 М.
Mob spawning RNG - RNG theory part 3/3
12:21
Xcom6000
Рет қаралды 4,7 М.
[10k special] [Fixed in 1.20] Fishing RNG manipulation
17:12
Earthcomputer
Рет қаралды 38 М.
The Powerful Minecraft EXPLOIT Mojang Didn't Want to Fix...
10:23
TheMisterEpic
Рет қаралды 360 М.
RNG mobfarm and weather tutorial
42:22
Xcom6000
Рет қаралды 77 М.
420 Explanation - Part 2/2
25:05
Xcom6000
Рет қаралды 21 М.
What If Mobs Could Trade Items?
23:13
Wisp
Рет қаралды 231 М.
Who's taller? (Poppy Playtime 3 Animation)
0:18
FASH
Рет қаралды 13 МЛН
coppie di brawler #brawlstars #brawl #supercell #gaming #perte
0:25
ЛУЧШАЯ ПАРА ДЛЯ ДУО ШД
0:41
Янер
Рет қаралды 2,1 МЛН