I simplified the code a bit for the video, it does make a bit more sense when you look at the actual code. It's a bit hard to explain with the actual code because 1) most people can't read Java, 2) there's lots of irrelevant stuff and 3) the relevant code can be spread across more than one location/file.
@ori61 51 A race condition is if code is executed at the same time (i.e. via threads) where it is not clear/fixed which executes first. Earth Computer mentions an idea with multithreading briefly, but dismisses it. The exploit works on one thread, no race condition. It simply triggers more functions in place before continuing with the block-dropping function
@magicus "In software development, time-of-check to time-of-use (TOCTOU, TOCTTOU or TOC/TOU) is a class of software bugs caused by a race condition..."
Anoher block with special left-click action: TNT with data value 1. This behaves like TNT before Beta 1.7 and ignites when punched. Interestingly this was also possible in survival previously before 1.7.6 using a block data changer (check a video on my channel for how to). Most likely won't have the correct behavior but maybe worth looking into.
Unstable TNT actually does its explosion at the end of mining rather than at the start. You don't normally notice because it's always insta-mined, but it makes a difference in this case. The 3 blocks I showed are the only 3 blocks in the game with a left click action in 1.12, I used the IDE to list them all.
That's amazing Earth! I knew there was some clue at minning code after getting this weird setup (inspired by goohz) I'm still not sure how it works but I believe you have to press the mouse button enough to "mine" the dirt but not enough to mine the iron (even before aiming at the block), then you somehow move bedrock to that location and so video ID: BvziENGdXJU
Slicedlime showed in his recent half-heart-hardcore challenge how he instabroke the glass while mining sugarcane, so that's probably gonna be looked at.
The client keeps track of the block break progress at the block it's currently mining. The server keeps track of something different, the number of client-side ticks that have passed since the player started mining (the client sends a mining packet every tick). This means that the client-side break progress can increment at different rates depending on what block you're hitting, but the server always increments at 1 tick per tick no matter which block. The server will only break the block when enough ticks have passed to break the block that is there at the end. In your video there, what is probably happening is that the client is incrementing its mining progress according to whatever is there each tick (dirt or iron), but the server is only keeping track of how many ticks mined. The client then thinks it's got enough progress to mine the iron block, but the server knows you've only been mining for X ticks and that's not enough to mine the iron block, so it says no. Then you push down the glass block and the server breaks it because X is enough ticks to mine a glass block. While definitely cool, this quirk is not enough to mine bedrock, because although it might somehow be possible to trick the client into thinking it's got enough progress to mine it, bedrock requires an infinite number of ticks to mine so you will never mine it server-side. Just as an aside, the way these hacked clients mine blocks faster is they send more mining tick packets than a vanilla client would, which causes the server to increment the ticks faster.
@TheTroll2001 _ Not necessarily anarchy servers. It's Paper, other forks of Spigot or modded servers in general that prevents stuff like this from functioning.
Awesome, thank you very much for sharing this! I would be happy to see more like this content even if you didn't reach the goal you have set for your self. I have one more question: is there a reason why you specified 1.12 in the title? Has something special changed in 1.13 or was 1.12 the only one you've looked at?
What Matthew said, and also the fact that it's no longer possible to modify loaded chunks through population. That's not to say getting the bedrock item is necessarily impossible in newer versions, but it would require an entirely different oversight, probably one that didn't exist in 1.12.
I'm super curious how you modded the things like the redstone to bedrock swap or the dragon egg not teleporting. I know that with fabric, you can use mixins to modify vanilla behavior, however, I don't know how you changed the vanilla code itself and compiled it. Did you just make a jar mod using forge or...idk. With the newer snapshots, its super trivial to decompile the code(well, it always was but there's obf maps now) but I've yet to find a way to re-compile it.
I have a carpetmod workspace setup for 1.12, you can get one too if you clone it and follow the readme. Also for 1.12 there's also MCP. For the mining speed mod at the beginning, since that needed clientside modifications too, I used liteloader with mixins.
Earthcomputer ah i see, thanks! I am not where near proficient enough with java to understand where to even start with mixens lol. I've tried looking at genmbons carpet mod mixens, all hieroglyphs to me
15:50 I've added a line with setBlockState in MCP and I was able to instamine stone and get bedrock from it. I think onBlockClicked method is called for every block in the game, so you don't need haste 9 to mine redstone ore.
It does get called for every block in the game. But for every block except for the mentioned ones, it's an empty method, so it's no use. As you need it to load a chunk/trigger population.
So THAT'S what you were talking about in the Discord. [EDIT1] Also, Could the block damage transfer thingy be useful for this, or did Bedrock Breaking get patched before Mojang added Persistance of Breaking?
Can you use any of those tricks to fake "instamine" the redstone ore? I'm too lazy to check the code to find out how the mining checks work ;P Love the videos as always!
First, there is a Hack called click block mining, it incries the mining speed also the only way to get to a unloadet cunkborder next to some populating bedrock would be in the end and u would need to lagg your game so it almoest freeze
To someone that dug around minecrafts code. Is there a reason that a specific block is written twice instead of just turning the original block into an entity?
does this can work with block that can have a left click action with a specific item like, grass can be clicked with shovel to make grass path i guess you already had the idea but i would like to know why it wont work in that case
"I'm about 99.99999% sure that it (falling block) is not gonna work" Well.. :D
1 like
Super Hase2020-07-12 00:06:17 (edited 2020-07-12 00:07:29 )
I have a question: Which randomseed is used to calculete which Player picks up a Block when you throw it in a mess of Players and can you influence it so you will always pick up the blocks?
im using MPC reborn to try to recreate the mod you made that makes the redstone ore into bedrock, but it seems like the redstone ore code is different then yours in the video. could you give me a link for the mod download?
I believe I might know a way to get eff 8 or haste 9, however it would require starting the world in 1.8.9, the other issue with this method would be that u could get anything with this exploit so the bedrock would be pointless, however, it’s possible without changing game modes etc so you could get it in 1.8.9 and then do this method in 1.12. If you have a place to talk about it I can msg u there :)
@TAXMAN Do you mean that method of building flying machines, flying into the ungenerated end chunks and breaking a torch in place where obsidian pillar should generate? Don't you need to repeat it thousands of times before an expected place coincides with the real one? Or is there a more reliable way of getting it in 1.8?
Hey, so with the noteblock method, have you considered what would happen if you were to desync the client and the server? Such that the client thinks it has an axe that's able to instant mine and the server thinks you have a silk touch pickaxe? I've been messing around with desyncs in more recent versions and it can lead to some interesting things.
wait dude.... who cares about bedrock item does that mean you just came up with a method to place bedrock blocks? or was that just something you did for testing?
Minecraft: The game where the only reason you can't mine bedrock is because you can't instamine redstone ore.
171 likesReplies (1)
oof... when a super gold diamond netherite omega super efficiency 50 pick gets added, we could get bedrock easily.
6 likesIt's great to see these insights into the thought processes and details with this sort of development. Thanks for sharing.
29 likesMojang checking for the block twice makes me feel like they’re doing this intentionally. So many bugs that are useful are based on such weird code
101 likesReplies (7)
I simplified the code a bit for the video, it does make a bit more sense when you look at the actual code. It's a bit hard to explain with the actual code because 1) most people can't read Java, 2) there's lots of irrelevant stuff and 3) the relevant code can be spread across more than one location/file.
57 likes@Earthcomputer this is called a race condition right?
2 likes@ori61 51 no
11 likes@Earthcomputer is it a kind of race condition?
1 like@ori61 51 A race condition is if code is executed at the same time (i.e. via threads) where it is not clear/fixed which executes first. Earth Computer mentions an idea with multithreading briefly, but dismisses it. The exploit works on one thread, no race condition. It simply triggers more functions in place before continuing with the block-dropping function
3 likes@ori61 51 It's more of a "time-of-check to time-of-use" issue.
1 likeSee https://en.wikipedia.org/wiki/Time-of-check_to_time-of-use.
@magicus "In software development, time-of-check to time-of-use (TOCTOU, TOCTTOU or TOC/TOU) is a class of software bugs caused by a race condition..."
1 likeAnoher block with special left-click action: TNT with data value 1. This behaves like TNT before Beta 1.7 and ignites when punched. Interestingly this was also possible in survival previously before 1.7.6 using a block data changer (check a video on my channel for how to). Most likely won't have the correct behavior but maybe worth looking into.
13 likesReplies (1)
Unstable TNT actually does its explosion at the end of mining rather than at the start. You don't normally notice because it's always insta-mined, but it makes a difference in this case. The 3 blocks I showed are the only 3 blocks in the game with a left click action in 1.12, I used the IDE to list them all.
11 likesThat's amazing Earth! I knew there was some clue at minning code after getting this weird setup (inspired by goohz)
42 likesI'm still not sure how it works but I believe you have to press the mouse button enough to "mine" the dirt but not enough to mine the iron (even before aiming at the block), then you somehow move bedrock to that location and so
video ID: BvziENGdXJU
Replies (4)
Slicedlime showed in his recent half-heart-hardcore challenge how he instabroke the glass while mining sugarcane, so that's probably gonna be looked at.
8 likesThe client keeps track of the block break progress at the block it's currently mining. The server keeps track of something different, the number of client-side ticks that have passed since the player started mining (the client sends a mining packet every tick). This means that the client-side break progress can increment at different rates depending on what block you're hitting, but the server always increments at 1 tick per tick no matter which block. The server will only break the block when enough ticks have passed to break the block that is there at the end.
17 likesIn your video there, what is probably happening is that the client is incrementing its mining progress according to whatever is there each tick (dirt or iron), but the server is only keeping track of how many ticks mined. The client then thinks it's got enough progress to mine the iron block, but the server knows you've only been mining for X ticks and that's not enough to mine the iron block, so it says no. Then you push down the glass block and the server breaks it because X is enough ticks to mine a glass block.
While definitely cool, this quirk is not enough to mine bedrock, because although it might somehow be possible to trick the client into thinking it's got enough progress to mine it, bedrock requires an infinite number of ticks to mine so you will never mine it server-side.
Just as an aside, the way these hacked clients mine blocks faster is they send more mining tick packets than a vanilla client would, which causes the server to increment the ticks faster.
@gnembon ohhhh, so that is how grian broke stone with a shovel in hermitcraft
0 likes@Alexandre J. W. Klaus well it may also be an inventory glitch that happens
0 likesThe day bedrock becomes obtainable, is the day sadness will be erased from the world
55 likesReplies (6)
Not erased, just extracted, compressed into a tight ball and forcefully shoved into all the Anarchy servers.
3 likes@sharpfang The way of doing this isn't possible on anarchy servers, so I have nothing to fear of the anarchy community.
0 likes@TheTroll2001 _ Not necessarily anarchy servers. It's Paper, other forks of Spigot or modded servers in general that prevents stuff like this from functioning.
0 likesthats where youre wrong, its the day at wich sadness starts for everyone that has a base and mean friends
0 likeswe meet once again
0 likeswelp, it has been done
1 likeAwesome, thank you very much for sharing this! I would be happy to see more like this content even if you didn't reach the goal you have set for your self.
6 likesI have one more question: is there a reason why you specified 1.12 in the title? Has something special changed in 1.13 or was 1.12 the only one you've looked at?
Keep up the good work! :)
Replies (2)
It's been obtained in 1.8 and one of the more modern versions switched to like a loottable sort of dealio which removed the silk touch oversight IIRC.
4 likesWhat Matthew said, and also the fact that it's no longer possible to modify loaded chunks through population. That's not to say getting the bedrock item is necessarily impossible in newer versions, but it would require an entirely different oversight, probably one that didn't exist in 1.12.
3 likesI'm super curious how you modded the things like the redstone to bedrock swap or the dragon egg not teleporting. I know that with fabric, you can use mixins to modify vanilla behavior, however, I don't know how you changed the vanilla code itself and compiled it. Did you just make a jar mod using forge or...idk. With the newer snapshots, its super trivial to decompile the code(well, it always was but there's obf maps now) but I've yet to find a way to re-compile it.
5 likesReplies (2)
I have a carpetmod workspace setup for 1.12, you can get one too if you clone it and follow the readme. Also for 1.12 there's also MCP. For the mining speed mod at the beginning, since that needed clientside modifications too, I used liteloader with mixins.
4 likesEarthcomputer ah i see, thanks! I am not where near proficient enough with java to understand where to even start with mixens lol. I've tried looking at genmbons carpet mod mixens, all hieroglyphs to me
1 likeGreat video, well thought out and presented. Subbed.
5 likesReplies (1)
Earth has wack videos. Like they're always really well thought out
0 likesIf I learned anything from the tech community, It's they do stuff thought to be impossible :) Goodluck!
16 likesGreat explanation! about time you made this video :p
70 likesYour audio gets quieter and quieter as the video goes along.
Replies (4)
Why dont u have the verified tick???????
1 like@xi he does now
1 like@Ram Krishan Charan ohh yeahhh
0 likes@xi you need 100k, idk if he had that of the time of this
0 likes15:50
2 likesI've added a line with setBlockState in MCP and I was able to instamine stone and get bedrock from it. I think onBlockClicked method is called for every block in the game, so you don't need haste 9 to mine redstone ore.
Replies (2)
It does get called for every block in the game. But for every block except for the mentioned ones, it's an empty method, so it's no use. As you need it to load a chunk/trigger population.
2 likes@Landmining Thanks for the clarification.
0 likesSo THAT'S what you were talking about in the Discord.
3 likes[EDIT1] Also, Could the block damage transfer thingy be useful for this, or did Bedrock Breaking get patched before Mojang added Persistance of Breaking?
Can you use any of those tricks to fake "instamine" the redstone ore? I'm too lazy to check the code to find out how the mining checks work ;P
1 likeLove the videos as always!
Overall, this video was amazing but very hard for my brain to understand how your breaking bedrock lol
0 likesFirst, there is a Hack called click block mining, it incries the mining speed
4 likesalso the only way to get to a unloadet cunkborder next to some populating bedrock would be in the end and u would need to lagg your game so it almoest freeze
Replies (1)
Exactly what they did on scicraft
0 likesGreat to see another video of you :) <3
3 likesDoes it have a block? Crops break instantly with any tool, not sure though if they have the left click option...
1 likeThanks for testing the end portal xD
2 likesTo someone that dug around minecrafts code. Is there a reason that a specific block is written twice instead of just turning the original block into an entity?
1 likeLove your content
2 likesdoes this can work with block that can have a left click action with a specific item
1 likelike, grass can be clicked with shovel to make grass path
i guess you already had the idea but i would like to know why it wont work in that case
Replies (1)
The list shown in the video is exhaustive
3 likes"I'm about 99.99999% sure that it (falling block) is not gonna work"
1 likeWell.. :D
I have a question: Which randomseed is used to calculete which Player picks up a Block when you throw it in a mess of Players and can you influence it so you will always pick up the blocks?
2 likesReplies (8)
@Teryllim hm, okay thx
0 likesits entity id, lowest id gets it every time
2 likes@_Kayleigh changes the entity id when you move? or can you somehow influence it that it is always low?
0 likes@Super Hase no, its assigned when you log on and they are allocated sequentially
0 likes@_Kayleigh xD i dont understand mojang why is this not also used for enchanting or for unbreaking.
0 likes@Super Hase why would you use entity id for randomness? its inherently non-random
1 like@_Kayleigh so you could tecnicly influence it that you have a higher chance of getting an item?
0 likes@Super Hase just log on before everyone else and you should get all the items, assuming it's a vanilla server
1 likeOk but you have to admit the multithreading idea is hilarious
11 likesReplies (1)
best idea ofc
1 likeI had no idea you could do this!!
1 likeim using MPC reborn to try to recreate the mod you made that makes the redstone ore into bedrock, but it seems like the redstone ore code is different then yours in the video. could you give me a link for the mod download?
0 likesI believe I might know a way to get eff 8 or haste 9, however it would require starting the world in 1.8.9, the other issue with this method would be that u could get anything with this exploit so the bedrock would be pointless, however, it’s possible without changing game modes etc so you could get it in 1.8.9 and then do this method in 1.12. If you have a place to talk about it I can msg u there :)
2 likesReplies (2)
doesnt that defeat the point of this then? you can just get the bedrock in 1.8 and people dont want to downgrade etc
0 likes@TAXMAN Do you mean that method of building flying machines, flying into the ungenerated end chunks and breaking a torch in place where obsidian pillar should generate? Don't you need to repeat it thousands of times before an expected place coincides with the real one? Or is there a more reliable way of getting it in 1.8?
2 likesGlad to see you are still uploading :) I thought you stopped
1 likeWell, that's a bummer..
46 likesHey, so with the noteblock method, have you considered what would happen if you were to desync the client and the server? Such that the client thinks it has an axe that's able to instant mine and the server thinks you have a silk touch pickaxe? I've been messing around with desyncs in more recent versions and it can lead to some interesting things.
0 likesReplies (1)
mining duration is handled by the server. if the server thinks you can't instamine then you won't instamine.
0 likesthough this is from a year ago, you probably figured that much out
how do you view the source code?
0 likesWhat a pleasant surprise to find an upload from earthcomputer
1 likeAn informative and interesting video, and as a keen follower of the Prototech and technical Minecraft community... THANK YOU FOR UPLOADING
1 likeOh shit! Glad to see you're also still alive. <3 Jo Johnson
3 likesReplies (1)
We miss both of you. Hope you're both doing okay. :)
0 likesSo ur saying dumb servers with insta mine plugins can just have bedrock minable
11 likesCan you mine barriers and end portal frames and portals now? Lol
0 likesOMG it will be epic
2 likesWhat if you use fastbreak?
1 likeReplies (1)
I mentioned in the video that these hacked clients don't work for getting the bedrock item.
2 likeswhy was there a flash of dirt and grass blocks for a second at 11:40 lol
0 likesReally cool
3 likesOMFG EARTH UPLOADED :OOO FFYGUIGFYUGFUGFRNUSNGFNG <3 I'm so hyped to watch this and learn about this insane project!
11 likesReplies (2)
This was really well explained, even for a complete non-coder like me! Keep up the great work Earth! ❤️
0 likesowo
0 likesOMG Earth! you're still around!
7 likesReplies (2)
Ofc
2 likesDid you think he left?
0 likesa fellow sublime text gang member i see
3 likesLol he is back :3
1 likeBut why do they do the block = get from world twice?
0 likesReplies (1)
Because :Mojank:
0 likes2b2ts 30000 efficiency lol
0 likesfools. just use creative mode smh my head
2 likeswait dude....
0 likeswho cares about bedrock item
does that mean you just came up with a method to place bedrock blocks?
or was that just something you did for testing?
Replies (1)
bedrock item best scaffolding, very useful as well.
3 likes<3
12 likesWho else is here cuz of ilmango
3 likesNot even April fools
0 likesWait, that’s illegal
0 likesoof... when a super gold diamond netherite omega super efficiency 50 pick gets added, we could get bedrock easily.
1 likeWooooow
1 likeQuest? I'm already ona quest! On a quest to make wireless redstone!
1 likeThat is a joke not a hate comment pelase don't kill me anyone
Replies (4)
Illmango has a video on that.
0 likesit is possible to have wireless redstone...
0 likesthere are multiple ways to do it
0 likesmess detector is best way to do wireless redstone xD
0 likesHow
1 like4:04 omg who tough mojanck how to program?
1 likeHrmm
1 likeget
0 likes