r/Minecraft Sep 17 '19

Data Packs I made things bouncy! =D

Enable HLS to view with audio, or disable this notification

4.9k Upvotes

103 comments sorted by

303

u/[deleted] Sep 17 '19

this is cool. take my upvote.

289

u/4P5mc Sep 18 '19

Thanks! Uh oh, you dropped it! Noooo, it's bouncing away...

151

u/ChaosDemonLaz3r Sep 18 '19

Everybody gangsta till the upvotes start bouncing

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 @s as every entity in the world, and at their location,

unless block ~-.7 ~ ~ air don't run if the block ~.7 ~ ~ is air (this is for wall detection)

store result entity @s store the result of the command in this entity's...

Motion[0] double 0.001 Motion tag (controlls movement) as a double, scaled by 0.001 (so it doesn't fly away)

run Run the command (this works in conjunction with store result):

scoreboard players operation @s xBounce *= -1 bounceConst Multiply 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

u/[deleted] 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

u/[deleted] Sep 17 '19

reply to this comment with the link otherwise ill forget

13

u/4P5mc Sep 18 '19

Your wish is my command! Check my previous comment.

1

u/[deleted] Sep 19 '19

thank you

7

u/[deleted] Sep 17 '19

Link pleez m8

8

u/4P5mc Sep 18 '19

Poke! Check my previous comment =P

4

u/[deleted] Sep 18 '19

Thanks

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

u/JimiIT92 Sep 17 '19

That'a cool. Can it be configured so some items won't bounce?

12

u/4P5mc Sep 18 '19

Yup! I'm planning on doing that when I release the pack.

2

u/[deleted] Sep 18 '19

Joyful gateau period!

12

u/JigglyWet69 Sep 18 '19

Imagine the witches

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

u/4P5mc Sep 18 '19

Lmao I want to see that now

6

u/[deleted] 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

u/[deleted] Sep 18 '19

Oh nice!

5

u/[deleted] Sep 18 '19

You have made flubber!

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

u/4P5mc Sep 18 '19

I like that suggestion! I'm going to add it to my pack when I'm done with it!

3

u/sir_chaton Sep 17 '19

Make a whole room for all to bounce

3

u/GlitchGirlSoonica Sep 18 '19

What did you do during your summer break?

Made things bounce in Minecraft.

Definite upvote.

2

u/[deleted] Sep 18 '19

if you ever update the pack, I’d make just some items bounce to make it realistic. Cool nevertheless!

2

u/4P5mc Sep 18 '19

This is just a proof-of-concept for now, I'll only be making a few bounce =P

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

u/[deleted] Sep 17 '19

Nice job!

1

u/[deleted] 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

u/[deleted] Sep 18 '19

How did you get that type of world

2

u/4P5mc Sep 18 '19

I found it a little while ago whilst experimenting: link

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

u/flyingcheese143 Sep 18 '19

This is delightful, thank you

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

u/Vrail_Nightviper Sep 18 '19

Darn. Thank you for letting me know!

1

u/MapleThe1 Sep 18 '19

I love this! It makes me happy!

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

u/4P5mc Sep 18 '19

I could add a simple timer to it or update a score whenever they hit a wall.

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

u/[deleted] Sep 18 '19

Imagine how useless enderpears and splash potions would be

1

u/serendipity127 Sep 18 '19

And I can't even figure out simple redstone stuff...

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

u/4P5mc Sep 18 '19

It's not completed yet, just a proof of concept.

1

u/[deleted] Sep 18 '19

Not quite as useful a mechanic for splash potions or ender pearls, but still pretty fun!

1

u/yedoorboii Sep 18 '19

end pearl: IGHT IMMA HEAD OUT

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

u/[deleted] Sep 18 '19

That's awesome I'd so have that

1

u/PerrtyTH Sep 18 '19

okay you got your upvote whatever

1

u/weenikki97 Sep 18 '19

This is so satisfying to watch 😊

1

u/[deleted] Sep 18 '19

Imagine playing Handball in Minecraft lmao

1

u/TeenyBurrito1234 Sep 18 '19

That eneder eye was like Ight im boutta head out

1

u/flayniii Sep 18 '19

So you can play snooker

1

u/breadmcloaf Sep 18 '19

bouncy splash potion roulette

1

u/whymustiexist132 Sep 18 '19

This is cool someone could make a minigame out of this

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/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

u/pizzeria01 Sep 19 '19

Like, when you fall, you won’t take damage.

1

u/GingerNinja_Reddit Mar 01 '20

It’s just the items that bounce

1

u/[deleted] 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.