Compatibility
Minecraft: Java Edition
Platforms
Tags
Creators
Details
Golf Ball
๐บ Old datapack showcase: https://www.youtube.com/watch?v=TqVvRwF2psQ
๐๏ธ Golf Ball is a datapack that transforms you into a golf ball in Minecraft, offering an immersive golfing experience!
โณ The following two commands are your best friends:
- ๐ฎ
/function golf_ball:summon: Turns the player executing the command into a golf ball (e.g:/execute as <player> positioned 123 100 54 run function golf_ball:summon) - ๐
/function golf_ball:respawn: Rolls back the ball to the last shot position (e.g:/execute as <player> run function golf_ball:respawn)
๐ Physics Engines (since 1.6.0)
Since Minecraft 26.2, you can alternatively summon the ball as a tiny sulfur cube holding an absorbed sponge (the vanilla "Golf Ball" archetype ๐๏ธ) with /function golf_ball:sulfur_cube.
Bouncing, friction and air drag are then handled natively by the game through the new bounciness, friction_modifier and air_drag_modifier attributes - no per-tick physics functions!
- โ๏ธ Tune a ball's physics directly with attributes, e.g:
/execute as <player> on vehicle run attribute @s minecraft:bounciness base set 0.9
(same forminecraft:friction_modifierandminecraft:air_drag_modifier) - ๐งฑ Swap the absorbed block to change the ball's archetype, e.g. a "Rubber Ball":
/execute as <player> on vehicle run item replace entity @s body with minecraft:oak_planks - โ ๏ธ Vanilla limitation: a sulfur cube holding a block has its step height hardcoded to 0, so it cannot roll up slabs or snow layers. That's why the default
golf_ball:summonstill uses the scoreboard physics engine (cat base) with all the settings below.
Configuration Commands โ๏ธ
Fine-tune your golfing experience with these powerful configuration commands!
Customize ball physics, movement dynamics, power settings and more - either globally for all new balls or locally for individual balls. ๐ฎ
โ ๏ธ Using /scoreboard players set for all commands below (abbreviated as /SPS)
Core Settings ๐ฏ
| Setting | Global Command | Local Command | Default | Range | Description |
|---|---|---|---|---|---|
| Strength Percentage ๐ช | /SPS #default_strength_percentage golf_ball.data <value> |
/SPS @s golf_ball.strength_percentage <value> |
50 | 0-100 | Controls the overall power of your shots |
| Energy Loss ๐ (legacy) | /SPS #default_energy_loss_percentage golf_ball.data <value> |
/SPS @s golf_ball.energy_loss_percentage <value> |
-90 | -100-0 | Determines how much energy is lost on impacts (vanilla balls: use the bounciness attribute) |
| Collision Multiplier ๐ฅ (legacy) | /SPS #default_collision_multiplier golf_ball.data <value> |
/SPS @s golf_ball.collision_multiplier <value> |
50 | 0-100 | Adjusts the intensity of collisions (vanilla balls are pushed natively) |
| Y-Shots ๐ผ | /SPS #default_do_y_shots golf_ball.data <value> |
/SPS @s golf_ball.do_y_shots <value> |
0 | 0 or 1 | Enables/disables vertical shots |
| Collision Detection ๐ฏ (legacy) | /SPS #default_do_collision golf_ball.data <value> |
/SPS @s golf_ball.do_collision <value> |
1 | 0 or 1 | Toggles collision physics |
| Minimum Power โฌ๏ธ | /SPS #min_power golf_ball.data <value> |
N/A | 40 | N/A | Sets the lower power limit |
| Maximum Power โฌ๏ธ | /SPS #max_power golf_ball.data <value> |
N/A | 500 | N/A | Sets the upper power limit |
Surface Friction Settings โก (legacy engine only)
Control how the ball behaves on different surfaces by adjusting friction values. Each value represents the percentage of speed retained per tick.
Vanilla sulfur cube balls use the block's real friction combined with the friction_modifier attribute instead.
| Surface Type | Global Command | Local Command | Default | Range | Best For |
|---|---|---|---|---|---|
| Normal Friction ๐ | /SPS #k_normal golf_ball.data <value> |
/SPS @s golf_ball.friction_normal <value> |
90 | 0-100 | Standard terrain |
| Fast Friction ๐ | /SPS #k_fast golf_ball.data <value> |
/SPS @s golf_ball.friction_fast <value> |
95 | 0-100 | Smooth surfaces |
| Slippery Friction ๐ง | /SPS #k_slippery golf_ball.data <value> |
/SPS @s golf_ball.friction_slippery <value> |
98 | 0-100 | Ice and similar |
| Slow Friction ๐ | /SPS #k_slow golf_ball.data <value> |
/SPS @s golf_ball.friction_slow <value> |
85 | 0-100 | Rough terrain |
| Very Slow Friction ๐ฆฅ | /SPS #k_very_slow golf_ball.data <value> |
/SPS @s golf_ball.friction_very_slow <value> |
80 | 0-100 | Heavy resistance |
Usage Tips ๐ก
- ๐ฏ For local commands targeting a specific ball, use this format:
/execute as <player> on vehicle run scoreboard players set @s golf_ball.strength_percentage <value> - ๐ฎ The "@s" selector refers to the golf ball currently being controlled by the player
- โก Surface friction values dramatically affect ball behavior - experiment to find the perfect settings!
- ๐ View all available surface definitions in the surfaces json files
- โ ๏ธ You may have fun with unrealistic configurations, but the physics will be wonky!


