Viper Anti-Dupe
Viper Anti-Dupe 是一款服务端 Fabric 模组,用于阻止 Minecraft 服务器上的物品和方块复制漏洞。它仅在服务端运行:玩家无需安装任何内容。防护通过针对方块交互、实体行为、漏斗、活塞、容器以及传入的玩家数据包的服务端守卫来实现,从而在额外物品生成之前阻止常见的复制方法。
支持版本
| Minecraft |
Java |
Fabric Loader |
备注 |
| 1.21 - 1.21.11 |
21 |
0.19.3+ |
完全支持,已拦截 25 种方法 |
| 26.1 - 26.1.2 |
25 |
0.19.3+ |
完全支持,已拦截 25 种方法 |
| 26.2 |
25 |
0.19.3+ |
完全支持,已拦截 25 种方法 |
| 26.3 |
25 |
0.19.5+ |
完全支持,已拦截 26 种方法(新增书架防护) |
请下载其支持的 Minecraft 版本与你的服务器匹配的文件。所有版本均需要 Fabric API。
工作原理
- 每种已知的复制方法在配置文件中都有独立的开/关开关。每个开关默认设置为拦截。
- 当检测到被拦截的复制尝试时,该操作将被取消,并连同时间戳、玩家名称和复制类型一起写入审计日志。
- 可疑的物品栏数据包(不同步的容器点击、无效的物品堆拆分、无效的创造模式物品堆)将被取消,并重新同步玩家的容器。
- 一个可配置的已知可复制物品列表允许你标记高风险物品。模组自带默认列表,涵盖铁轨、地毯、混凝土粉末、潜影盒、受重力影响的方块、TNT、书、三叉戟、蜂巢及相关物品。
- 可以在游戏中重载配置而无需重启服务器。
配置语义
在 config/viper-anti-dupe.json 中,每个复制方法键遵循以下规则:
false = 该方法被拦截(模组会阻止它)。这是默认值。
true = 该方法被允许(模组不会对此进行干预)。
将某方法设置为 true 并不会创建漏洞;它只是关闭了模组对该方法的防护。
已拦截的方法
| 方法 |
配置键 |
作用 |
| 书籍复制 |
BookDupe |
防止利用超大或无效的书本文本编辑来复制已写的书 |
| 潜影盒嵌套 |
ShulkerBoxDupe |
防止潜影盒隐藏在超出嵌套限制的容器中 |
| 铁轨复制 |
RailDupe |
防止活塞驱动的铁轨复制 |
| 地毯复制 |
CarpetDupe |
防止活塞驱动的地毯复制 |
| 马匹快速移动 |
HorseQuickMoveDupe |
防止在马匹物品栏中进行导致物品复制的 shift-click 转移 |
| 物品堆拆分 |
StackSplitDupe |
防止因无效槽位点击拆分而产生额外物品 |
| 漏斗复制 |
HopperDupe |
防止可疑的漏斗传输 |
| 活塞复制 |
PistonDupe |
防止因活塞运动导致的 TNT 和其他方块复制 |
| 实体维度复制 |
EntityDimensionDupe |
防止通过载具脱离和维度变化进行的复制 |
| 三叉戟复制 |
TridentDupe |
防止投掷三叉戟碰撞时的复制 |
| 蜜蜂复制 |
BeeDupe |
防止通过破坏蜂巢和蜂箱获取额外掉落物 |
| 绊线复制 |
TripwireDupe |
防止绊线更新和破坏时的复制 |
| 线绳复制 |
StringDupe |
防止绊线绳复制,可选恢复旧版行为 |
| 讲台复制 |
LecternDupe |
防止无效的讲台书本操作和取书行为 |
| 绊线钩复制 |
TripwireHookDupe |
防止绊线钩复制,可选恢复旧版行为 |
| 重力方块复制 |
GravityBlockDupe |
防止沙子、砾石、砧等类似方块的复制 |
| NBT 列表复制 |
NBTListDupe |
防止超出 MaximumItemNbtBytes 限制的大尺寸或格式错误的 NBT 数据 |
| 物品展示框复制 |
ItemFrameDupe |
防止通过快速破坏物品展示框来复制所持物品 |
| 更新抑制 |
UpdateSuppressionDupe |
防止基于更新抑制机制的复制设置 |
| 容器不同步 |
ContainerDesyncDupe |
处理不同步的容器交易,重新同步玩家容器 |
| 死亡复制 |
DeathDupe |
防止通过快速重复死亡来复制掉落物 |
| 区块回滚 |
ChunkRollbackDupe |
防止通过区块保存状态回滚进行的复制 |
| 传送门复制 |
PortalDupe |
防止通过传送门旅行进行的复制 |
| 收纳袋复制 |
BundleDupe |
防止无效的收纳袋内容移除 |
| 合成器复制 |
CrafterDupe |
防止通过快速触发合成器来复制输出结果 |
| 书架复制 |
ShelfDupe |
防止快速交换和破坏书架导致的复制(仅限 26.3 书架方块,仅适用于 26.3 文件) |
常规配置选项
| 选项 |
默认值 |
描述 |
| ConfigVersion |
1 |
配置格式版本,由模组管理 |
| ModEnabled |
true |
所有防护的主开关 |
| LoggingEnabled |
true |
将被拦截的尝试写入审计日志 |
| DetailedAuditLogging |
false |
除了被拦截的操作外,还记录被允许的操作 |
| NotifyOperators |
true |
当有操作被拦截时通知在线的管理员 |
| CancelSuspiciousTransactions |
true |
取消可疑的物品栏交易,而不仅仅是记录它们 |
| RestoreLegacyStringDupeWhenAllowed |
true |
当字符串方法被允许时,恢复旧版字符串行为 |
| RestoreLegacyTripwireHookDupeWhenAllowed |
true |
当绊线钩方法被允许时,恢复旧版绊线钩行为 |
| MaximumBookPages |
100 |
接受编辑书中最大页数 |
| MaximumBookPageLength |
1024 |
接受每本书页的最大字符数 |
| MaximumItemNbtBytes |
2097152 |
接受每个物品的最大 NBT 负载大小 |
| MaximumContainerNestingDepth |
8 |
最大容器嵌套深度 |
| TransactionHistoryTicks |
200 |
为检查保留物品栏交易的时间长度 |
| DuplicateEntityDetectionTicks |
100 |
用于检测重复实体的时间窗口 |
| OperatorPermissionLevel |
4 |
预留的管理员权限级别设置 |
| KnownDupableItems |
(内置列表) |
被标记为已知可复制的物品 ID,可通过物品命令进行管理 |
新选项会自动添加到现有配置文件中并赋予默认值;你的其他设置将被保留。
命令
所有命令均以 /viperantidupe 开头,且必须由游戏中的玩家执行。
| 指令 |
说明 |
/viperantidupe reload |
无需重启服务器即可重载配置文件 |
/viperantidupe status |
显示模组版本、启用状态以及已阻止/允许的漏洞利用方法数量 |
/viperantidupe methods |
列出所有漏洞利用方法及其当前的 BLOCKED(阻止)或 ALLOWED(允许)状态 |
/viperantidupe get <method> |
查看某个特定方法是 ALLOWED(允许)还是 BLOCKED(阻止) |
/viperantidupe set <method> <true/false> |
允许 (true) 或阻止 (false) 某个方法,设置将保存到配置文件中 |
/viperantidupe item get <id> |
检查某个物品 ID 是否被标记为已知的可复制物品 |
/viperantidupe item set <id> <true/false> |
将某个物品 ID 标记或取消标记为已知的可复制物品 |
/viperantidupe dumpitems |
将所有注册的物品 ID 写入 config/viper-anti-dupe-items.json |
/viperantidupe dumpknown |
将已知的可复制物品列表写入 config/viper-anti-dupe-known-items.json |
/viperantidupe audit |
在聊天栏中显示最近 50 条审计日志条目 |
安装
- 在服务器上安装 Fabric Loader(对于 1.21.x,需 0.19.3 或更高版本;对于 26.1.x 和 26.2,需 0.19.3 或更高版本;对于 26.3,需 0.19.5 或更高版本)。
- 为你的 Minecraft 版本安装 Fabric API。
- 将匹配版本的 Viper Anti-Dupe 文件放入服务器的
mods 文件夹中。
- 启动服务器一次以生成
config/viper-anti-dupe.json 配置文件,然后根据喜好调整开关选项。
- 编辑完配置文件后,在游戏中运行
/viperantidupe reload,或者重启服务器。
审计条目也会追加到由日志记录选项配置的日志文件中。
Viper Anti-Dupe
Viper Anti-Dupe is a server-side Fabric mod that blocks item and block duplication exploits on Minecraft servers. It works only on the server: players do not need to install anything. Protection is applied through server-side guards on block interactions, entity behavior, hoppers, pistons, containers and incoming player packets, so common duplication methods are stopped before extra items can be created.
Supported versions
| Minecraft |
Java |
Fabric Loader |
Notes |
| 1.21 - 1.21.11 |
21 |
0.19.3+ |
Full support, 25 blocked methods |
| 26.1 - 26.1.2 |
25 |
0.19.3+ |
Full support, 25 blocked methods |
| 26.2 |
25 |
0.19.3+ |
Full support, 25 blocked methods |
| 26.3 |
25 |
0.19.5+ |
Full support, 26 blocked methods (adds shelf protection) |
Download the file whose supported Minecraft versions match your server. Fabric API is required on all versions.
How it works
- Every known duplication method has its own on/off switch in the config file. Each switch defaults to blocking.
- When a blocked duplication attempt is detected, the action is cancelled and the attempt is written to the audit log with a timestamp, the player name and the dupe type.
- Suspicious inventory packets (desynced container clicks, invalid stack splits, invalid creative-mode stacks) are cancelled and the player's container is re-synced.
- A configurable list of known dupable items lets you flag risky items. The mod ships with a default list covering rails, carpets, concrete powder, shulker boxes, gravity blocks, TNT, books, tridents, bee nests and related items.
- Configuration can be reloaded in game without restarting the server.
Config semantics
In config/viper-anti-dupe.json, each dupe method key follows one rule:
false = the method is BLOCKED (the mod prevents it). This is the default.
true = the method is ALLOWED (the mod does not interfere with it).
Setting a method to true does not create an exploit; it only turns off this mod's protection for that method.
Blocked methods
| Method |
Config key |
What it stops |
| Book dupe |
BookDupe |
Oversized or invalid book edits used to duplicate written books |
| Shulker box nesting |
ShulkerBoxDupe |
Shulker boxes hidden inside other containers beyond the nesting limit |
| Rail dupe |
RailDupe |
Piston-driven rail duplication |
| Carpet dupe |
CarpetDupe |
Piston-driven carpet duplication |
| Horse quick-move |
HorseQuickMoveDupe |
Shift-click transfers in horse inventories that duplicate items |
| Stack split |
StackSplitDupe |
Invalid slot-click splits that create extra items |
| Hopper dupe |
HopperDupe |
Suspicious hopper transfers |
| Piston dupe |
PistonDupe |
TNT and other blocks duplicated by piston movement |
| Entity dimension dupe |
EntityDimensionDupe |
Duplication through vehicle detach and dimension changes |
| Trident dupe |
TridentDupe |
Thrown-trident collision duplication |
| Bee dupe |
BeeDupe |
Breaking bee nests and beehives for extra drops |
| Tripwire dupe |
TripwireDupe |
Tripwire update and break duplication |
| String dupe |
StringDupe |
Tripwire string duplication, with optional legacy restoration |
| Lectern dupe |
LecternDupe |
Invalid lectern book operations and takes |
| Tripwire hook dupe |
TripwireHookDupe |
Tripwire hook duplication, with optional legacy restoration |
| Gravity block dupe |
GravityBlockDupe |
Falling sand, gravel, anvil and similar block duplication |
| NBT list dupe |
NBTListDupe |
Oversized or malformed NBT data beyond MaximumItemNbtBytes |
| Item frame dupe |
ItemFrameDupe |
Rapid item-frame breaks that duplicate the held item |
| Update suppression |
UpdateSuppressionDupe |
Update-suppression based duplication setups |
| Container desync |
ContainerDesyncDupe |
Desynced container transactions, re-syncs the player container |
| Death dupe |
DeathDupe |
Rapid repeated deaths used to duplicate drops |
| Chunk rollback |
ChunkRollbackDupe |
Chunk save-state rollback duplication |
| Portal dupe |
PortalDupe |
Portal travel duplication |
| Bundle dupe |
BundleDupe |
Invalid bundle content removal |
| Crafter dupe |
CrafterDupe |
Rapid crafter firing used to duplicate output |
| Shelf dupe |
ShelfDupe |
Rapid shelf swap and break duplication with the 26.3 shelf blocks (26.3 file only) |
General config options
| Option |
Default |
Description |
| ConfigVersion |
1 |
Config format version, managed by the mod |
| ModEnabled |
true |
Master switch for all protection |
| LoggingEnabled |
true |
Write blocked attempts to the audit log |
| DetailedAuditLogging |
false |
Log allowed actions in addition to blocked ones |
| NotifyOperators |
true |
Notify online operators when something is blocked |
| CancelSuspiciousTransactions |
true |
Cancel suspicious inventory transactions instead of only logging them |
| RestoreLegacyStringDupeWhenAllowed |
true |
Restore legacy string behavior when the string method is allowed |
| RestoreLegacyTripwireHookDupeWhenAllowed |
true |
Restore legacy tripwire hook behavior when that method is allowed |
| MaximumBookPages |
100 |
Maximum pages accepted in an edited book |
| MaximumBookPageLength |
1024 |
Maximum characters accepted per book page |
| MaximumItemNbtBytes |
2097152 |
Maximum NBT payload size accepted per item |
| MaximumContainerNestingDepth |
8 |
Maximum container-in-container nesting depth |
| TransactionHistoryTicks |
200 |
How long inventory transactions are remembered for checks |
| DuplicateEntityDetectionTicks |
100 |
Time window used for duplicate entity detection |
| OperatorPermissionLevel |
4 |
Reserved operator permission level setting |
| KnownDupableItems |
(built-in list) |
Item IDs flagged as known dupable, manageable with the item commands |
New options are added to an existing config file automatically with their defaults; your other settings are kept.
Commands
All commands start with /viperantidupe and must be run by a player in game.
| Command |
Description |
/viperantidupe reload |
Reload the config file without restarting |
/viperantidupe status |
Show mod version, enabled state, and blocked/allowed method counts |
/viperantidupe methods |
List every dupe method with its current BLOCKED or ALLOWED state |
/viperantidupe get <method> |
Show whether one method is ALLOWED or BLOCKED |
/viperantidupe set <method> <true/false> |
Allow (true) or block (false) one method, saved to the config |
/viperantidupe item get <id> |
Check whether an item ID is flagged as known dupable |
/viperantidupe item set <id> <true/false> |
Flag or unflag an item ID as known dupable |
/viperantidupe dumpitems |
Write every registered item ID to config/viper-anti-dupe-items.json |
/viperantidupe dumpknown |
Write the known-dupable item list to config/viper-anti-dupe-known-items.json |
/viperantidupe audit |
Show the 50 most recent audit log entries in chat |
Installation
- Install Fabric Loader on your server (0.19.3 or newer for 1.21.x, 26.1.x and 26.2; 0.19.5 or newer for 26.3).
- Install Fabric API for your Minecraft version.
- Put the matching Viper Anti-Dupe file into the server
mods folder.
- Start the server once so
config/viper-anti-dupe.json is created, then adjust the toggles to taste.
- Run
/viperantidupe reload in game after editing the config, or restart the server.
Audit entries are also appended to the log file configured by the logging options.
评论 0
登录后参与评分
还没有评论,来抢沙发吧