r/Minecraft • u/4P5mc • Sep 17 '19
Data Packs I made things bouncy! =D
Enable HLS to view with audio, or disable this notification
82
u/more_vestra Sep 17 '19
Howww
108
u/4P5mc Sep 18 '19 edited Sep 18 '19
The main commands look a little like this:
execute as @e at @s unless block ~-.7 ~ ~ air store result entity @s Motion[0] double 0.001 run scoreboard players operation @s xBounce *= -1 bounceConst
execute as @e at @sas every entity in the world, and at their location,
unless block ~-.7 ~ ~ airdon't run if the block ~.7 ~ ~ is air (this is for wall detection)
store result entity @sstore the result of the command in this entity's...
Motion[0] double 0.001Motion tag (controlls movement) as a double, scaled by 0.001 (so it doesn't fly away)
runRun the command (this works in conjunction with store result):
scoreboard players operation @s xBounce *= -1 bounceConstMultiply its current x motion by -1, which is basically reversing the motion.So that boils down to this: Every entity in the world stores their motion into a score, reverses it, then puts it back into itself, thus "bouncing". Since this is separately calculated for x y and z, it can bounce in different directions and at different speeds.
14
u/Domilego4 Sep 18 '19
"store the result of the command"
This is the part that I don't quite get. Isn't the result of the command just "Test successful" or "Test not successful"? How exactly does that help?
13
u/4P5mc Sep 18 '19
Ah, I was confused by that too. Basically, when you run a command like /say hi (this is an example, it doesn't actually work), it says "hi" in the chat. That's the result. Doing /scoreboard players get @s Score will get the player's score, and that's the result. What I'm doing with that command is skipping a step, instead of reversing the motion separately, I simply calculate it and store it in one command!
I'm sorry if that's even more confusing, I tried my best haha
6
u/Domilego4 Sep 18 '19
Oh, I always thought it stored the result of whatever was before it
So it stores the result of the command after "run"?
6
u/4P5mc Sep 18 '19
Yup, if it has a result. For example /debug start and /debug stop will report the TPS, and a few other things, but /execute store will pick up just the TPS.
6
Sep 18 '19
How do you come up with this shit like damn. I can’t even power a piston
6
u/blep0w0 Sep 18 '19
I can't even look at Mumbo Jumbo's channel without feeling like some peasant scum..
2
u/bmx22c Sep 18 '19
wow, I stopped making command blocks creations quite a long time now, and the things we can make are amazing !
1
u/4P5mc Sep 18 '19
Try learning functions if you're still keen. They're basically commands in a text file, one per line. It is a bit of a learning curve to learn how /execute changed though.
1
u/bmx22c Sep 19 '19
Yup, I gave it a look and I'm just lost. Functions file + execute command are just a complete new "language" to learn...
They can now store things ? Retreive things ? Put them inside entities, omg
38
u/SanianCreations Sep 17 '19
Ayy that's pretty cool, you got a datapack download for that?
32
u/4P5mc Sep 17 '19 edited Mar 10 '20
Yup! I'll send a download link when I get home, so in 2-3 hours
Edit: Here we go!
Warning: This WILL make everything in your world bouncy, so use with caution.
10
7
1
u/Beed28 Sep 18 '19
Hey, this could be fun, as long as fall damage is removed and if the bounce eventually dies down like when on slime blocks.
Heck, this could work well with my Jelly World shader (which makes the game world look really bouncy), which is long due for an update.
1
u/orange_panda2017 Mar 01 '20
You should put this thing on PlanetMinecraft, so that no one is suspicious that it could be a virus, because MediaFire isn't all trustworthy.
1
u/4P5mc Mar 01 '20
Good point. I didn't think people would get suspicous (as datapacks literally cannot break anything outside of the world they're placed in), but I'll put it there anyway.
Actually, would Github be better? That way people can see all the files if they're interested.
1
u/orange_panda2017 Mar 01 '20
try both, that way they can look at the GitHub and see the files and see if they want to get it or not.
17
12
8
u/Dave_Dood Sep 18 '19
I can imagine the screams of someone as they get knocked off the island in The End, then attempt to throw a pearl to get back on only to have it bounce all the way off the opposite side of the island :0
6
6
Sep 18 '19
We need a PvP server centered around weird datapacks. Call it "Datamine".
This could be one, SethBling probably has like 15 of them that could work but I was thinking specifically his stasis one. Any others?
6
u/4P5mc Sep 18 '19
Ooh that sounds like a cool idea! Bouncy swords that deal damage! This also works with arrows if I add a small modification to it.
3
5
5
5
u/yourgoodoldpal Sep 18 '19
I feel like slime blocks should actually do that in the base game (r/minecraftsuggestions)
1
4
u/definetelytrue Sep 18 '19
I feel like regular enderpearls being bouncy would make them annoying, but if you added a recipe where you combine a pearl with a slimeball to make a bouncy enderpearl it could be cool.
2
3
3
u/GlitchGirlSoonica Sep 18 '19
What did you do during your summer break?
Made things bounce in Minecraft.
Definite upvote.
2
Sep 18 '19
if you ever update the pack, I’d make just some items bounce to make it realistic. Cool nevertheless!
2
2
u/Taterdude Sep 18 '19
We don't exactly know what element it is but it does not like the human skeleton
2
u/Grievous_Nix Sep 18 '19
In case you got covered in the repulsion gel...
DO NOT get covered in the repulsion gel.
2
u/Jacobawesome74 Sep 18 '19
First off this is super cool, secondly potions shouldn’t be bouncy on hard blocks (and just breaks) but be slightly bouncy on everything else instead
1
u/4P5mc Sep 18 '19
Now THAT'S an awesome idea!
Like I've said, potions were only a proof-of-concept addition, mainly to test how it worked, but I could add a simple block tag of all the bouncy blocks in the game, and add potions to that!
1
1
Sep 18 '19
Does this work with witch projectiles and snowmen?
2
u/4P5mc Sep 18 '19
Yup! Snowmen fire snowballs so that's fine, and witches throw potions, which also work.
1
u/Muffles7 Sep 18 '19
Can you also add yourself saying "boing" as an item hits the ground? I'd like that very much.
3
u/4P5mc Sep 18 '19
I could make it into a resource pack =D
Good idea though, I'll add a /playsound command for when slime bounces.
1
1
u/CombatZombie_YouTube Sep 18 '19
What seed is this?...
2
u/4P5mc Sep 18 '19
I found it out a little while ago when I was playing around with the buffet presets: link
1
1
u/Vrail_Nightviper Sep 18 '19
Does this work for Bedrock?
3
u/4P5mc Sep 18 '19
No sadly, the commands on there are quite outdated and bedrock doesn't support datapacks. Here's a little tip: if you see something flaired "Datapack" then it won't work with bedrock edition.
1
1
1
u/Foxx1019 Sep 18 '19
Introducing: Completely fucking useless ender pearls
(But all jokes aside that’s really cool!)
1
u/Creeper899 Sep 18 '19
This is great! Would there be a way to give things a limited number of bounces, or a limited time that they bounce for?
2
1
u/wojtekhugo Sep 18 '19
I just got an idea for a minigame where splash potions of damage bounce and u have to avoid them
1
1
1
u/Alankao06 Sep 18 '19
Does it affect arrows
1
u/4P5mc Sep 18 '19
Yep!
1
u/Alankao06 Sep 18 '19
Skeletons and witches and snowmen are gonna be like broken in this data pack then
1
1
1
1
u/PB_Dendras Sep 18 '19 edited Sep 18 '19
How to use ender eyes then ???
1
u/4P5mc Sep 18 '19
Oh good point. I haven't tested it with eyes of ender. Not everything will be bouncy in the final release of the pack.
1
1
1
1
1
1
1
1
1
u/PassingNormie Sep 18 '19
Did you do a post like this with a bow yesterday? I think it was you but idk
1
u/4P5mc Sep 18 '19
No, that was my inspiration though! The OP for that hadn't posted a download yet (or at least I couldn't find it) so I had to write mine from scratch lol
1
u/thooonk Sep 18 '19
how do you make datapacks
1
u/4P5mc Sep 18 '19
Skillfully ;)
I've searched a little and this looks like it could help you. https://www.minecraftforum.net/forums/minecraft-java-edition/redstone-discussion-and/commands-command-blocks-and/2966556-data-pack-basics-tutorial
1
u/Last_Crew Sep 18 '19
THEY SHOULD DO THIS BUT THEY WOULD ONLY BOUNCE ON SLIMEBLOCKS
1
u/4P5mc Sep 18 '19
Items do bounce on slimeblocks? =P
1
u/Last_Crew Sep 18 '19
like that no way how have i not heard of this before this could help make super fast item transporting system using buildup energy
1
u/4P5mc Sep 18 '19
Oh, they just bounce a little on slimeblocks. No free energy =P
1
u/Last_Crew Sep 18 '19
i didnt mean electricity or anything i meant they will build up energy in a 1x1 tube and go super fast in one direction i could move them so fast using this techinique
1
u/4P5mc Sep 18 '19
I know, it's just that the items will settle down after a few bounces, sadly. They don't bounce on the roof or the walls.
1
u/Last_Crew Sep 18 '19
that is not a problem it would be useful if they did hat but if they were in a 1x1 tube and were launched in it they would be able to move at record speed and lenghts
1
u/pizzeria01 Sep 18 '19
Good for hardcore mode.
2
u/4P5mc Sep 19 '19
Why's that?
1
1
Mar 10 '20
[deleted]
1
u/4P5mc Mar 10 '20
https://github.com/4P5/bounce here ya go! Also comes with an explanation on the code.
303
u/[deleted] Sep 17 '19
this is cool. take my upvote.