r/MinecraftCommands • • Dec 18 '20

Tutorial | Java This cool gravity gun I made (Tutorial in comments)

1.6k Upvotes

35 comments sorted by

62

u/FiredKobe Dec 18 '20 edited Dec 18 '20

I know how to do this on bedrock one command:

/execute @p ^ ^ 7 tp @e[r=4] ~ ~ ~

Edit: for when you hold out an item to activate it, place down a repeating command block on always active, unconditional, repeating, type in: /enchant (right here you can type in you gt or do @a, @p, etc or even use tags/scoreboards if you know how to) riptide 1

Place a comparator coming out of that going into another command block; repeating, unconditional, needs redstone and type in:

/execute (right here you can type in you gt or do @a, @p, etc or even use tags/scoreboards if you know how to) ^ ^ 7 tp @e[r=4] ~ ~ ~

Now when you hold out an trident it will to players/mobs right in front of you just like the video, change the 7 in the execute command block to a different number to change the distance between you can the targeted entity

6

u/JambleJumble Dec 18 '20

Java:

/execute at @p ^ ^ 7 run tp @e[r=4] ~ ~ ~

Without the item hold to activate part

Edit: Idk why I even commented this cause it says tutorial in comments

2

u/TwanGames_YT Dec 18 '20

You should make a tutorial for bedrock on this!

1

u/Desfortcraft Dec 19 '20

Thats what that was.

17

u/SquidAnimations Command Experienced Dec 18 '20

Thank you kind stranger

2

u/TechnoFuture5 Dec 19 '20

So the top command is for Bedrock or the whole thing?

0

u/FiredKobe Dec 19 '20

Yes, It’s for bedrock. In all that text there, there is 2 commands total. One is the thing of mobs like the gravity gun, but there is no way to turn it off so once you picked something up you can’t put it down unless you turn off the command block. The second command I provided in the the edited text is how to make it so when you hold out a trident it is activated or it’s on, but if you switch to a different item(not a trident) it would stop picking up the mob/player. The top command is the tping command or the command that teleports the mob to where you are looking. I recommend if you are not good at commands in bedrock, change the @p to your gamertag

2

u/AlfaPoo Dec 19 '20

I’m smol brain, me no understand

2

u/Dark_Lombax Dec 18 '20

It’s just that to a T. Nothing special missing or coordinates I need to put

2

u/FiredKobe Dec 18 '20

What do you mean?

2

u/Dark_Lombax Dec 18 '20

Like that’s the whole command there nothing I have to fill in

1

u/FiredKobe Dec 18 '20

No, the only thing you need is to make it in a repeating command block always active, instead of the @p just change that to any players name that will be using it

2

u/Dark_Lombax Dec 18 '20

Like what do the @ and ~ symbols mean. I’m new to Minecraft commands and coding in general

1

u/FiredKobe Dec 18 '20

The @ sign doesn’t mean anything the letter after it is what matters, there is @p which refers to the nearest player, let’s say you type in a command in the chat,” /tp @s @p” the @s refers to at self and the @p refers to the nearest player. This command means you are teleporting yourself to the player nearest to you in your world.

2

u/Dark_Lombax Dec 18 '20

Thank makes sense down

1

u/FiredKobe Dec 18 '20

Another thing is @s, @p, @r, @a don’t work with mobs, they only work with players. @e refers to any entity, like cows, but it also works with players as well, so that means you can pick up your friends with this command as well

14

u/TwanGames_YT Dec 18 '20

This is the tutorial

3

u/MidnightJ1200 Dec 18 '20

How good is it with endermen?

1

u/TwanGames_YT Dec 18 '20

I have not tested that yet.. I think it would still help a lot

7

u/KittyTheCatto Dec 18 '20

The Cow Compactor

6

u/The_Creeper_Man Dec 18 '20

Rise and shine, mr freeman

3

u/[deleted] Dec 19 '20

Gmod in minecraft

2

u/MoleculeWolf Dec 18 '20

Create a cow singularity with that

2

u/MaxwellMaximoff Dec 19 '20

You should also make it so that arrows you shoot nearby entities causes gravity to turn off for those entities aka levitation effect.

/execute @e[type=arrow] ~ ~ ~ effect @e[type=!player,r=5] levitation 5 2 true

There might be issues with this ^ command like idk if arrows would be affected by levitation so you could do @e[type=!arrow,tag=!player] and add a ‘player’ tag to yourself so you don’t get the levitation effect.

1

u/NEKOX5meow Dec 19 '20

The cow cloud

1

u/KingLerer11 Dec 19 '20

Nice trick i need try it :)

1

u/MortisGhostTTV Dec 19 '20

i actually used something similar to create a jedi vs sith 1v1 map where it’s the same as this except it only holds one entity and gives them wither effect so it acts as a force choke. i also used a stick as a lightsaber idk why i feel like swords would be too op given the fact there’s no armour. it’s a fun map though

0

u/[deleted] Dec 18 '20

[deleted] — view deleted comment

1

u/TwanGames_YT Dec 18 '20

It is already in the command, but thanks for helping!