CurseForge · Minecraft mod
ExplosiveAPI
API for count gunpowder power in items
Quick answer
Which ExplosiveAPI release should I use?
ExplosiveAPI 1.0 (NeoForge 1.21.1) targets 1.21.1 with NeoForge. The project page does not say whether this file belongs on the client, dedicated server, or both. No extra mods listed for this file.
Where it goes
Is ExplosiveAPI required on the client, server, or both?
The project page does not say whether this file belongs on the client, dedicated server, or both.
The source does not explicitly classify this release as client-only or server-only.
What else does ExplosiveAPI 1.0 (NeoForge 1.21.1) need?
ExplosiveAPI 1.0 (NeoForge 1.21.1). Change the file and its required mods may change too.
This file does not list any required mods. Do not add a library just because a different file uses it.
This file does not list any required or optional mods.
Before you install it
Add ExplosiveAPI without breaking your instance.
Built for ExplosiveAPI 1.0 (NeoForge 1.21.1). Pick another file and the loader, install side or required mods may change.
- 01
Stick to this file
Use ExplosiveAPI 1.0 (NeoForge 1.21.1). It targets 1.21.1 with NeoForge; another release may have different loader, side or dependency requirements.
- 02
Bring the mods it needs
This file does not list any required mods. Do not add a library just because a different file uses it.
- 03
Put it on the correct side
The project page does not say whether this file belongs on the client, dedicated server, or both.
- 04
Pick the file you checked
Use the “Get this file” button beside ExplosiveAPI 1.0 (NeoForge 1.21.1). It opens that exact file at the source.
About this project
What does ExplosiveAPI add?
English
The phrase G power here stands for gunpowder power.
About the mod
The mod is a counter of explosive substances. Take vanilla gunpowder, for example.
By default, its explosiveness is measured in 1 G power:
If you have a stack of gunpowder in your hand, inventory, or chest, the slot will have a total of 64 G of power:
How the counter works
First, during the server-side launch, a graph is built from all the recipes. The explosion hazard starts being calculated from bottom to top. Items that are not in the configs and do not have a recipe receive 0G; then items with a recipe are considered: the mod calculates the amount of G power, adds it up, and divides it by the output quantity and the number of recipes. For example, dynamite. It is crafted from 5 sand and 5 gunpowder -> sand = 0G -> gunpowder = 1G -> dynamite = 5G.
What functions can be used for your add-on
You will only need the GunpowderCounter class.
Checking for the completion of recipe analysis: GunpowderCounter.isCacheLoaded();
Obtaining G power from an item: GunpowderCounter.getExplosivePowerFromItem(ItemStack stack);
Obtaining a copy of the entire map of explosive items (ResourceLocation, Integer): GunpowderCounter.getPowerCache();
Recalculating G power: GunpowderCounter.recomputeCache(Level level);
Русский
Словосочетание G сила здесь расшифровывается, как gunpowder сила (ну типа пороховая сила).
О моде
Мод из себя представляет счетчик взрывоопасных веществ. Возьмем, например, ванильный порох.
По умолчанию его взрывоопасность измеряется в 1 G силу:
Если у вас в руке, инвентаре или сундуке будет стак пороха, то суммарно у слота будет 64 G силы:
Как работает счетчик
Сначала во время запуска серверной части строится граф из всех рецептов. Взрывоопасность начинает считаться снизу вверх. Предметы, которых нет в конфигах, и у которых нет рецепта, получают 0G, потом рассматриваются предметы с рецептом: мод считает количество G силы, складывает ее и делит на количество на выходе и количество рецептов. Например, динамит. Он крафтится из 5 песка и 5 пороха -> песок = 0G -> порох = 1G -> динамит = 5G.
Какие функции могут использоваться для вашего аддона
Вам понадобится только класс GunpowderCounter.
Проверка на завершения анализа рецептов: GunpowderCounter.isCacheLoaded();
Получение G силы из предмета: GunpowderCounter.getExplosivePowerFromItem(ItemStack stack);
Получение копии вообще всей карты взрывоопасных вещей(ResourceLocation, Integer): GunpowderCounter.getPowerCache();
Пересчит G силы: GunpowderCounter.recomputeCache(Level level);
Project description from CurseForge.
Pick your setup
ExplosiveAPI by Minecraft version and loader
Choose the version and loader you play, then open the matching release.
Check the dependencies, then try the file in a copied instance before changing a world you care about.
Recent files
ExplosiveAPI versions and loaders
ExplosiveAPI 1.0 (NeoForge 1.21.1)
explosive_api-1.0-1.21.1-neoforge.jar
28 Nov 2026
Looking for an older file? The official CurseForge project page is in Resources.