高尔夫球
? 旧版数据包展示:
?️ Golf Ball 是一个数据包,它将你变成 Minecraft 中的高尔夫球,提供沉浸式的高尔夫体验!
⛳ 以下两个命令是你最好的朋友:
- ?
/function golf_ball:summon:将执行命令的玩家变成高尔夫球(例如:/execute as <player> positioned 123 100 54 run function golf_ball:summon)
- ?
/function golf_ball:respawn:将球滚回到上一次击球的位置(例如:/execute as <player> run function golf_ball:respawn)
? 物理引擎(自 1.6.0 起)
自 Minecraft 26.2 版本起,你可以使用 /function golf_ball:sulfur_cube 以一个小硫磺方块的形式召唤球体,其中包含一个吸收海绵(原版“高尔夫球”原型 ?️)。
弹跳、摩擦力和空气阻力现在由游戏通过新的 bounciness、friction_modifier 和 air_drag_modifier 属性原生处理——无需每刻钟的物理函数!
- ⚙️ 直接使用属性调整球的物理特性,例如:
/execute as <player> on vehicle run attribute @s minecraft:bounciness base set 0.9
(minecraft:friction_modifier 和 minecraft:air_drag_modifier 同理)
- ? 替换被吸收的方块以改变球的原型,例如“橡胶球”:
/execute as <player> on vehicle run item replace entity @s body with minecraft:oak_planks
- ⚠️ 原版限制:持有方块的硫磺方块的步高硬编码为 0,因此它无法爬上台阶或雪层。这就是为什么默认的
golf_ball:summon 仍然使用记分板物理引擎(猫基础)并带有以下所有设置的原因。
配置命令 ⚙️
使用这些强大的配置命令来微调你的高尔夫体验!
自定义球的物理特性、运动动力学、功率设置等——可以全局应用于所有新球,也可以局部应用于单个球。?
⚠️ 以下所有命令均使用 /scoreboard players set(缩写为 /SPS)
核心设置 ?
| 设置项 |
全局命令 |
局部命令 |
默认值 |
范围 |
描述 |
| 力量百分比 ? |
/SPS #default_strength_percentage golf_ball.data <value> |
/SPS @s golf_ball.strength_percentage <value> |
50 |
0-100 |
控制击球的整体力度 |
| 能量损失 ?(旧版) |
/SPS #default_energy_loss_percentage golf_ball.data <value> |
/SPS @s golf_ball.energy_loss_percentage <value> |
-90 |
-100-0 |
确定碰撞时损失的能量比例(原版球:请使用 bounciness 属性) |
| 碰撞乘数 ?(旧版) |
/SPS #default_collision_multiplier golf_ball.data <value> |
/SPS @s golf_ball.collision_multiplier <value> |
50 |
0-100 |
调整碰撞强度(原版球是原生推挤) |
| Y轴射击 ? |
/SPS #default_do_y_shots golf_ball.data <value> |
/SPS @s golf_ball.do_y_shots <value> |
0 |
0 或 1 |
启用/禁用垂直方向射击 |
| 碰撞检测 ?(旧版) |
/SPS #default_do_collision golf_ball.data <value> |
/SPS @s golf_ball.do_collision <value> |
1 |
0 或 1 |
切换碰撞物理效果 |
| 最小功率 ⬇️ |
/SPS #min_power golf_ball.data <value> |
N/A |
40 |
N/A |
设置最低功率限制 |
| 最大功率 ⬆️ |
/SPS #max_power golf_ball.data <value> |
N/A |
500 |
N/A |
设置最高功率限制 |
表面摩擦力设置 ⚡(仅限旧版引擎)
通过调整摩擦值来控制球在不同表面上的行为。每个值代表每刻钟保留的速度百分比。
原版硫磺方块球则使用方块的实际摩擦力结合 friction_modifier 属性。
| 表面类型 |
全局命令 |
局部命令 |
默认值 |
范围 |
最佳用途 |
| 正常摩擦 ? |
/SPS #k_normal golf_ball.data <value> |
/SPS @s golf_ball.friction_normal <value> |
90 |
0-100 |
标准地形 |
| 快速摩擦 ? |
/SPS #k_fast golf_ball.data <value> |
/SPS @s golf_ball.friction_fast <value> |
95 |
0-100 |
平滑表面 |
| 滑溜摩擦 ? |
/SPS #k_slippery golf_ball.data <value> |
/SPS @s golf_ball.friction_slippery <value> |
98 |
0-100 |
冰面及类似表面 |
| 缓慢摩擦 ? |
/SPS #k_slow golf_ball.data <value> |
/SPS @s golf_ball.friction_slow <value> |
85 |
0-100 |
粗糙地形 |
| 极慢摩擦 ? |
/SPS #k_very_slow golf_ball.data <value> |
/SPS @s golf_ball.friction_very_slow <value> |
80 |
0-100 |
高阻力环境 |
使用技巧 ?
- ? 对于针对特定球的局部命令,请使用此格式:
/execute as <player> on vehicle run scoreboard players set @s golf_ball.strength_percentage <value>
- ? "@s" 选择器指的是玩家当前控制的高尔夫球
- ⚡ 表面摩擦值会极大地影响球的行为——尝试找到完美的设置!
- ? 在 surfaces json 文件中查看所有可用的表面定义
- ⚠️ 你可能会喜欢不切实际的配置,但物理效果会变得奇怪!
⭐ Star 历史

Golf Ball
? Old datapack showcase:
?️ 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 for minecraft:friction_modifier and minecraft: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:summon still 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!
⭐ Star History

评论 0
登录后参与评分
还没有评论,来抢沙发吧