RandomDrops
RandomDrops 是一款服务端 Paper 插件,每五分钟随机化方块掉落物。
该插件专为生存挑战、多人服务器以及玩家必须自行发现哪些方块提供所需物品的自定义游戏模式而设计。
功能特性
- 随机化玩家破坏方块时的掉落物品
- 每五分钟生成一套全新的掉落映射关系
- 通过 Boss 栏显示剩余时间
- 在掉落物重置时显示屏幕通知
- 保留方块原本产出的物品数量
- 在使用 Minecraft 原版附魔(锋利/经验修补等)和精准采集计算前,先替换最终生成的物品
- 不影响生物掉落物
- 不影响玩家手动丢出的物品
- 无需客户端安装
工作原理
当玩家破坏一个方块时,Minecraft 首先计算原本应该掉落的物品。
随后,RandomDrops 会将该物品替换为当前随机映射中的另一个物品。
例如:
圆石 → 钻石
橡木原木 → 面包
泥土 → 铁锭
如果圆石当前被映射为钻石,那么在不使用精准采集的情况下破坏石头将产出钻石而非圆石。
映射关系在五分钟倒计时结束前保持一致。届时,所有映射关系将再次随机化。
命令
| 命令 |
描述 |
/randomdrops list [page] |
显示当前掉落映射的某一页 |
/randomdrops find <item> |
显示需要破坏哪个正常方块的掉落物才能获得请求的物品 |
/rdrops |
/randomdrops 的别名 |
示例
/rdrops find diamond
此命令显示当前哪种正常方块掉落物会产出钻石。
权限
| 权限 |
描述 |
默认设置 |
randomdrops.developer |
允许访问映射相关命令 |
服务器管理员 |
要求
- Minecraft Java 版 1.21.11
- Paper 1.21.11
- Java 21 或兼容的新版 Java 运行时环境
安装
- 下载最新的
RandomDrops JAR 文件。
- 停止你的 Paper 服务器。
- 打开服务器主文件夹。
- 将 JAR 文件放入
plugins 文件夹中。
- 启动服务器。
- 检查服务器控制台以确认 RandomDrops 已成功加载。
注:在当前阶段,该插件没有额外的依赖项。
文件结构应类似于:
server/
├── paper.jar
├── plugins/
│ └── RandomDrops-0.1.0.jar
├── server.properties
└── start.bat
加入服务器的玩家无需安装任何内容。
从源代码构建
在 Windows 上,运行:
.\gradlew clean build
编译后的插件 JAR 文件将生成在以下目录中:
build/libs/
重要行为说明
RandomDrops 仅更改玩家破坏方块时产生的物品。
它不会修改以下内容:
- 生物掉落物
- 钓鱼奖励
- 箱子战利品
- 合成物品
- 从玩家背包投掷出的物品
- 原本不会掉落物品的方块
每当服务器重启时,当前的映射关系和倒计时都会重置。
报告问题
Bug 和意外行为可以通过链接到本项目的 GitHub Issues 页面进行报告。
报告问题时,请包含:
- 你的 Paper 版本
- 你的 Java 版本
- RandomDrops 的版本
- 任何相关的控制台错误信息
- 重现问题的步骤
RandomDrops
RandomDrops is a server-side Paper plugin that randomises items dropped from blocks every five minutes.
The plugin is designed for survival challenges, multiplayer servers, and custom game modes where players must discover which blocks provide the items they need.
Features
- Randomises items dropped when players break blocks
- Generates a completely new drop mapping every five minutes
- Displays the remaining time using a boss bar
- Shows an on-screen notification when drops are randomised
- Preserves the normal number of items produced by a block
- Uses Minecraft's normal Fortune and Silk Touch calculations before replacing the resulting item
- Does not affect mob drops
- Does not affect items manually dropped by players
- Requires no client-side installation
How it works
When a player breaks a block, Minecraft first calculates the item that would normally drop.
RandomDrops then replaces that item with another item from the current random mapping.
For example:
Cobblestone → Diamond
Oak Log → Bread
Dirt → Iron Ingot
If cobblestone is currently mapped to diamond, breaking stone without Silk Touch will produce diamonds instead of cobblestone.
The mapping remains consistent until the five-minute timer reaches zero. At that point, every mapping is randomised again.
Commands
| Command |
Description |
/randomdrops list [page] |
Displays a page of the current drop mappings |
/randomdrops find <item> |
Shows which normal block drop is needed to obtain the requested item |
/rdrops |
Alias for /randomdrops |
Example
/rdrops find diamond
This command shows which normal block drop currently produces diamonds.
Permissions
| Permission |
Description |
Default |
randomdrops.developer |
Allows access to the mapping commands |
Server operators |
Requirements
- Minecraft Java Edition 1.21.11
- Paper 1.21.11
- Java 21 or a compatible newer Java runtime
Installation
- Download the latest
RandomDrops JAR file.
- Stop your Paper server.
- Open the server's main folder.
- Place the JAR file inside the
plugins folder.
- Start the server.
- Check the server console to confirm that RandomDrops loaded successfully.
Note: There are no additional dependencies for the plugin at its current stage.
The file structure should look similar to:
server/
├── paper.jar
├── plugins/
│ └── RandomDrops-0.1.0.jar
├── server.properties
└── start.bat
Players joining the server do not need to install anything.
Building from source
- Clone or download the repository from Github.
On Windows, run:
.\gradlew clean build
The compiled plugin JAR will be created inside:
build/libs/
Important behaviour
RandomDrops only changes items created when players break blocks.
It does not modify:
- Mob drops
- Fishing rewards
- Chest loot
- Crafted items
- Items thrown from player inventories
- Blocks that would not normally drop an item
The current mappings and countdown reset whenever the server restarts.
Reporting issues
Bugs and unexpected behaviour can be reported through the GitHub Issues page linked to this project.
When reporting a problem, include:
- Your Paper version
- Your Java version
- The RandomDrops version
- Any relevant console errors
- Steps that reproduce the issue
评论 0
登录后参与评分
还没有评论,来抢沙发吧