Описание
## English
**Control your world. Restrict everything.**
> - _**Universal Blocking** — complete authority over items, blocks, and entities._
> - **Requires [Architectury API](https://modrinth.com/mod/architectury-api)** (Forge & Fabric)
> - 📺 **Video Review (v1.0):** [YouTube Shorts](https://youtube.com/shorts/Fk9I-GkJqt0?si=ViITegIIlB9AkE3L)
### 🏆 Support the Author
- 🎯 **[Boosty](https://boosty.to/gvoper)**
## 🎮 About the mod
**Universal Blocking** is a powerful server-side tool that gives you absolute control over what can and cannot exist in your Minecraft world. Whether you're running a hardcore SMP, a custom modpack, or an adventure map — this mod lets you restrict **any** item, block, craft, mob, or interaction with surgical precision.
Define rules using **specific IDs**, **wildcard patterns** (`minecraft:*ore*`, `*:tools`), or **tags** (`forge:ingots`, `minecraft:logs`). Each rule can combine multiple flags to achieve exactly the behavior you need.
### 🚩 11 Powerful Flags
| Flag | Name | Description |
|------|------|-------------|
| ⚔️ **D** | Damage | Prevents attacking with this item |
| 🖱️ **U** | Use | Blocks right-click usage |
| 📦 **I** | Interface | Prevents opening block GUIs |
| 🧱 **P** | Placement | Blocks block placement |
| ⛏️ **B** | Break | Prevents breaking blocks (tool or block) |
| 🛡️ **A** | Armor | Prevents wearing armor (auto-drops it) |
| 🗑️ **Z** | Delete | Removes from inventory, chests & drops |
| 🔨 **C** | Craft | Completely blocks crafting (any method) |
| 🔓 **Q** | Unlock | Exception — exempts from other rules |
| 🔄 **R** | Replace | Replaces block in the world (air/custom) |
| 👁️ **T** | Creative Tab | Hides from Creative + JEI/REI |
### 📋 Usage Examples
```json
{
"item_blocked": [
"minecraft:diamond_sword D",
"minecraft:diamond Z",
"minecraft:stick D U P B",
"minecraft:sand R",
"minecraft:dirt R!minecraft:gold_block",
"minecraft:netherite_pickaxe Q"
],
"tag_blocked": [
"*:swords D",
"forge:tools B",
"minecraft:wool R!minecraft:stone",
"minecraft:* T"
],
"entity_blocked": [
"minecraft:zombie",
"*:bee",
"*:cow 5"
]
}
```
### 🐾 Mob Control
- **Complete block:** `"minecraft:zombie"` — zombies can't spawn at all
- **Population limit:** `"*:cow 5"` — maximum 5 cows per dimension (excess despawns)
- **Bees** still exit hives to prevent sound spam, but instantly despawn
### ⌨️ Commands (OP Level 2)
- `/ub reload` — Reload config, rebuild Creative tabs & JEI, trigger block replacement
- `/ub tagitem` — Show all tags of item in main hand
- `/ub tagall` — List tags of every item in your inventory
### ✨ Features
- ✅ **Forge & Fabric** support via Architectury API
- ✅ **Wildcard patterns** (`*:*`, `modid:*prefix*`, `*:suffix`)
- ✅ **Tag-based rules** (any mod's item/block tags)
- ✅ **Mob population limits** per dimension
- ✅ **Auto block replacement** in the world (diagonal-aware)
- ✅ **JEI integration** (blocked items hidden automatically)
- ✅ **JSON config** with pretty-printing
- ✅ **Hot reload** without server restart
- ✅ **Template file** (`universal_blocking_template.txt`) with full documentation in EN/RU
- ✅ **Q flag** — create exceptions from broader tag rules
### 📋 Config Location
`config/universal_blocking.json` — created automatically on first run with examples.
> ### 🌐Third-party hosting
> You are not allowed to host the mod on third-party resources. You can post news about the mod, but you must link to this mod page for downloading (or link to the download address from modrinth).
---
## Русский
**Контролируй свой мир. Ограничивай всё.**
> - _**Universal Blocking** — полный контроль над предметами, блоками и сущностями._
> - **Требуется [Architectury API](https://modrinth.com/mod/architectury-api)** (Forge и Fabric)
> - 📺 **Видео обзор (v1.0):** [YouTube Shorts](https://youtube.com/shorts/Fk9I-GkJqt0?si=ViITegIIlB9AkE3L)
### 🏆 Поддержать автора
- 🎯 **[Boosty](https://boosty.to/gvoper)**
## 🎮 О моде
**Universal Blocking** — мощный серверный инструмент, который даёт вам абсолютный контроль над тем, что может и не может существовать в вашем мире Minecraft. Хардкор SMP, кастомная сборка или приключенческая карта — этот мод позволяет ограничить **любой** предмет, блок, крафт, моба или взаимодействие с хирургической точностью.
Создавайте правила по **конкретным ID**, **маскам** (`minecraft:*ore*`, `*:tools`) или **тегам** (`forge:ingots`, `minecraft:logs`). Каждое правило может комбинировать несколько флагов для получения нужного поведения.
### 🚩 11 мощных флагов
| Флаг | Название | Описание |
|------|----------|----------|
| ⚔️ **D** | Урон | Запрещает атаковать этим предметом |
| 🖱️ **U** | Использование | Блокирует ПКМ |
| 📦 **I** | Интерфейс | Запрещает открытие GUI блоков |
| 🧱 **P** | Размещение | Запрещает ставить блок |
| ⛏️ **B** | Ломание | Запрещает ломать блоки (инструмент или сам блок) |
| 🛡️ **A** | Броня | Запрещает носить броню (авто-сброс) |
| 🗑️ **Z** | Удаление | Удаляет из инвентаря, сундуков и дропа |
| 🔨 **C** | Крафт | Полностью блокирует крафт (любой способ) |
| 🔓 **Q** | Разблокировка | Исключение из других правил |
| 🔄 **R** | Замена | Заменяет блок в мире (на воздух/другой блок) |
| 👁️ **T** | Креатив | Скрывает из креатива + JEI/REI |
### 📋 Примеры использования
```json
{
"item_blocked": [
"minecraft:diamond_sword D",
"minecraft:diamond Z",
"minecraft:stick D U P B",
"minecraft:sand R",
"minecraft:dirt R!minecraft:gold_block",
"minecraft:netherite_pickaxe Q"
],
"tag_blocked": [
"*:swords D",
"forge:tools B",
"minecraft:wool R!minecraft:stone",
"minecraft:* T"
],
"entity_blocked": [
"minecraft:zombie",
"*:bee",
"*:cow 5"
]
}
```
### 🐾 Контроль мобов
- **Полная блокировка:** `"minecraft:zombie"` — зомби вообще не спавнятся
- **Лимит популяции:** `"*:cow 5"` — максимум 5 коров на измерение (лишние исчезают)
- **Пчёлы** всё ещё вылетают из ульев (чтобы не было спама звуков), но мгновенно исчезают
### ⌨️ Команды (OP 2 уровня)
- `/ub reload` — Перезагрузить конфиг, пересобрать креатив и JEI, запустить замену блоков
- `/ub tagitem` — Показать все теги предмета в главной руке
- `/ub tagall` — Вывести теги всех предметов в инвентаре
### ✨ Особенности
- ✅ Поддержка **Forge и Fabric** через Architectury API
- ✅ **Wildcard-маски** (`*:*`, `modid:*prefix*`, `*:suffix`)
- ✅ **Правила по тегам** (любые теги предметов/блоков)
- ✅ **Лимиты популяции мобов** на измерение
- ✅ **Авто-замена блоков** в мире (с учётом диагоналей)
- ✅ **Интеграция с JEI** (заблокированные предметы скрываются автоматически)
- ✅ **JSON конфиг** с красивым форматированием
- ✅ **Горячая перезагрузка** без рестарта сервера
- ✅ **Файл-шаблон** (`universal_blocking_template.txt`) с полной документацией на EN/RU
- ✅ **Флаг Q** — создание исключений из широких правил по тегам
### 📋 Расположение конфига
`config/universal_blocking.json` — создаётся автоматически при первом запуске с примерами.
> ### 🌐Сторонние размещения
> Вы не имеете права размещать мод на сторонних ресурсах, вы можете разместить новость о моде, но обязательно ссылаться на эту страницу мода для загрузки. (или ссылаться на ссылку адреса скачивания с modrinth)