- Java 100%
Rewrites replaced fluid ids inside fluid-stack-like compounds in the saved data of every block entity first (Oritech machines and cores, Create pipes/pumps/valves with fluid in transit), then converts leftovers through the capability. Fixes losing fluid when a drainable output tank refused the refill. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q1m84FhEm563sA3fe2TUX7 |
||
|---|---|---|
| docs | ||
| gradle/wrapper | ||
| src/main | ||
| .gitattributes | ||
| .gitignore | ||
| build.gradle | ||
| gradle.properties | ||
| gradlew | ||
| gradlew.bat | ||
| LICENSE | ||
| README.md | ||
| settings.gradle | ||
ZalienFuel
One fuel of every kind. A NeoForge mod for Minecraft 1.21.1 that ends duplicate fuel fluids in modpacks.
English
What it does
Big modpacks ship the same fuel many times. Create: The Factory Must Grow, Create Diesel Generators, PneumaticCraft, Oritech, Modern Industrialization and others each register their own diesel, gasoline, crude oil, kerosene, naphtha and LPG. In game that means:
- five different "Diesel" fluids that don't mix in one tank,
- an engine from one mod refusing diesel refined by another,
- JEI full of near-identical fluids and buckets.
ZalienFuel does for fuels what AllTheOres + Almost Unified do for ores. It replaces the other mods' fuels:
- It registers one canonical fluid per fuel type (table below), with bucket and
c:tags. - Every recipe of every other mod that produces or consumes one of the replaced fluids (or its bucket) is rewritten on load to use the ZalienFuel one, including KubeJS recipes.
- Machines that hardcode their own fluid (TFMG pumpjack and oil worldgen, Immersive Engineering and Railcraft coke ovens, MorePropulsion centrifuge, Modern Industrialization compostable plant oil) are redirected with small mixins.
- Oil in world generation (PneumaticCraft lakes, Oritech springs, TFMG wells and deposits) is ZalienFuel crude oil.
- The replaced fluids and buckets are hidden from JEI.
- Leftovers in tanks and buckets can be converted 1:1 in game (crafting table and Create mixer).
Fuels that are unique to one mod (Oritech turbofuel and biofuel, Integrated Foregoing biofuel, EnderIO rocket fuel, Modern Industrialization intermediates, TFMG propane/butane, ...) are left alone.
Fuels
| Fuel | Fluid ID | Common tag |
|---|---|---|
| Crude Oil | zalienfuel:crude_oil |
c:crude_oil (also c:oil, c:crude_oils) |
| Heavy Oil | zalienfuel:heavy_oil |
c:heavy_oil |
| Diesel | zalienfuel:diesel |
c:diesel, c:fuel |
| Gasoline | zalienfuel:gasoline |
c:gasoline, c:fuel |
| Kerosene | zalienfuel:kerosene |
c:kerosene, c:fuel |
| Naphtha | zalienfuel:naphtha |
c:naphtha |
| LPG | zalienfuel:lpg |
c:lpg |
| Biodiesel | zalienfuel:biodiesel |
c:biodiesel, c:fuel |
| Ethanol | zalienfuel:ethanol |
c:ethanol (also c:bioethanol, c:biofuel) |
| Plant Oil | zalienfuel:plant_oil |
c:plant_oil, c:plantoil |
| Creosote | zalienfuel:creosote |
c:creosote |
Every fluid comes with a bucket (stack size 1, shown in the ZalienFuel creative tab) and the matching c: tag,
so any recipe or machine built on common tags accepts it without extra work. The jar also adds the fluids to the
TFMG fuel tags (tfmg:firebox_fuel, tfmg:flammable, tfmg:gas, tfmg:blast_stove_fuel).
Converting old fluids
Fluids and buckets from other mods keep working as they are; nothing is converted automatically. Convert them in game, 1:1:
- Crafting table: one old bucket → one ZalienFuel bucket (shapeless).
- Create mixer (basin): 1000 mB of the old fluid → 1000 mB of the ZalienFuel fluid.
Recipes exist for every replaced fluid (zalienfuel:convert/<fuel>/<mod>) and only load when the source mod is installed,
so the jar works without any of them.
What is replaced
Each fuel replaces the same-named fluid of these mods (full list: FuelType.java):
| Fuel | Replaced fluids from |
|---|---|
| Crude Oil | TFMG, Create Diesel Generators, PneumaticCraft (Oil), Oritech, Modern Industrialization, XyCraft |
| Heavy Oil | TFMG, Oritech |
| Diesel | TFMG, Create Diesel Generators, PneumaticCraft, Oritech, Modern Industrialization |
| Gasoline | TFMG, Create Diesel Generators, PneumaticCraft |
| Kerosene | TFMG, PneumaticCraft, MorePropulsion |
| Naphtha | TFMG, Oritech, Modern Industrialization |
| LPG | TFMG, PneumaticCraft (the TFMG "Lpg Tank" item stays) |
| Biodiesel | Immersive Engineering, PneumaticCraft, Create Diesel Generators, Modern Industrialization |
| Ethanol | Immersive Engineering, PneumaticCraft, Create Diesel Generators, Modern Industrialization, Mekanism Generators (Bioethanol), Create Crafts & Additions (Biofuel) |
| Plant Oil | Immersive Engineering, PneumaticCraft (Vegetable Oil), Create Diesel Generators, Modern Industrialization, Create Crafts & Additions (Seed Oil) |
| Creosote | Immersive Engineering, TFMG, Modern Industrialization, Railcraft |
Left alone on purpose: Oritech turbofuel and biofuel (biofuel is also taken out of c:biodiesel), Integrated Foregoing
biofuel, EnderIO rocket fuel, Modern Industrialization intermediates (boosted diesel, light/heavy fuel, ...), TFMG
propane/butane/furnace gas/napalm, lubricant, food oils.
Supported mods
Status of the built-in handling per mod. "Recipes" = rewritten on load, "data" = tags, fuel registries and datamaps that name a fluid, "mixin" = a hardcoded producer redirected.
| Mod | Status |
|---|---|
| Create: The Factory Must Grow | recipes, data (flamethrower fuels, tags), mixin: pumpjack, oil wells and deposits |
| Create Diesel Generators | recipes, data (pumpjack output tag, engines through tags) |
| PneumaticCraft: Repressurized | recipes (refinery, thermo plant, Amadron, ...), oil lake worldgen |
| Oritech | recipes, oil spring and resource node worldgen, biofuel kept separate |
| Modern Industrialization | recipes, diesel generator datamap, mixin: compostable plant oil |
| Immersive Engineering | recipes, mixin: coke oven creosote |
| Railcraft | mixin: coke oven creosote (recipe output and container slot) |
| MorePropulsion | mixin: centrifuge kerosene and its tank |
| Create Propulsion | data: thruster fuels for the ZalienFuel fluids |
| Mekanism Generators, Create Crafts & Additions, XyCraft | recipes and tags |
Anything that takes fluids by c: tag |
works out of the box |
Per-mod handling only loads when that mod is installed; if a mod update moves a hook, ZalienFuel logs a warning and that one redirect is inactive, nothing crashes.
Admin tools
Op level 2. Works with loaded chunks only and never loads or generates chunks.
/zalienfuel migrate [radius <r> | box <x1 y1 z1> <x2 y2 z2>]converts replaced fuel fluids that sit in tanks (any block entity with a fluid handler: Create tanks, TFMG tanks, machines, ...) 1:1 into the ZalienFuel fluid, default radius 64 around you./zalienfuel migrate dryrun ...only reports. It works in two passes. First it rewrites the fluid stored in the saved data of every block entity in the area (this reaches tanks that refuse to be drained or filled, such as Oritech machines and their multiblock cores, and the fluid in transit inside Create pipes, pumps and valves, which have no tank at all); these show as "rewritten via NBT" and "pipes rewritten via NBT". Then anything still holding an old fluid through its fluid capability is converted 1:1 with a simulated drain first; if a tank refuses the new fluid the old one is put back and the tank is listed as skipped. The result (mB and block entities per fuel, skipped positions) goes to chat and the log. Items (buckets in chests) are not touched: use the conversion recipes./zalienfuel fillfluid <pos> <fluid> <mB>fills a tank through its fluid handler (testing).
Oil Scanner, electric heaters, Industrial Cooler
These moved to their own mod, ZalienTools (https://git.zatto.pl/ZalienCraft-mods/ZalienTools). Worlds saved with
ZalienFuel 0.4.x load fine with ZalienTools installed (the old zalienfuel: ids are aliased); without ZalienTools those items
and blocks disappear. ZalienFuel 0.5.0 is fuel unification only.
Installation
- Requires Minecraft 1.21.1 and NeoForge 21.1.x.
- Put
zalienfuel-<version>.jarin themods/folder on both the server and every client (fluids are registered blocks and items). - Start the game. No other setup is required.
Configuration
config/zalienfuel-common.toml:
| Option | Default | What it does |
|---|---|---|
redirectRecipes |
true |
Rewrite other mods' recipes to the ZalienFuel fluids and buckets (takes effect on the next recipe reload; a full restart is safest). |
redirectMachines |
true |
Enable the mixins that redirect hardcoded producers and worldgen. |
recipeExclusions |
[] |
Recipe ids (ns:path) or whole namespaces (ns:*) that are never rewritten. |
logRewrittenRecipes |
false |
Log every rewritten recipe id (debugging). |
Recipes in the zalienfuel namespace (the conversion recipes) are never rewritten. At load the log shows
ZalienFuel: rewrote N recipes ... with a count per fuel. A modpack can still extend or override everything with its
own datapack or KubeJS (#c:diesel, or zalienfuel:diesel directly). TFMG caches fuel types statically, so a pack
that changes fuel tags needs a restart, not /reload.
Adding to an existing world
- Fluids already sitting in tanks stay what they were (there is no automatic migration). Machines keep accepting the old fluids where they used tags; run them through a conversion recipe to turn them into ZalienFuel.
- Oil lakes and springs that are already generated stay as the old mod's oil; only new chunks get ZalienFuel crude oil.
- Removing ZalienFuel later deletes its fluids from tanks and buckets, as with any mod that adds fluids.
Building from source
Requires JDK 21.
./gradlew build # jar in build/libs/
./gradlew runClient # development client
The per-mod mixins target classes by name (@Pseudo), so no third-party jar is needed to compile. To check them,
put the target mods in a NeoForge 21.1.250 server's mods/ together with the built jar and start it: each hook logs
Applied <Mixin> to <class> and, once the server is up, Mixin OK/Mixin NOT applied.
Bugs and ideas
Open an issue. Include the mod list (or modpack name
and version), what you did, and the latest.log.
License
MIT. You can use ZalienFuel in any modpack.
Polski
Co robi
Duże modpacki mają to samo paliwo po kilka razy. Create: The Factory Must Grow, Create Diesel Generators, PneumaticCraft, Oritech, Modern Industrialization i inne mody rejestrują każdy swój diesel, benzynę, ropę, naftę, kerozynę i LPG. W grze wychodzi z tego:
- pięć różnych „Dieseli”, które nie mieszają się w jednym zbiorniku,
- silnik jednego moda, który nie przyjmuje diesla z rafinerii innego,
- JEI pełne prawie identycznych płynów i wiader.
ZalienFuel robi dla paliw to, co AllTheOres + Almost Unified dla rud. Zastępuje paliwa innych modów:
- Rejestruje jeden kanoniczny płyn na każdy typ paliwa (tabela niżej), z wiadrem i tagami
c:. - Każda receptura każdego innego moda, która produkuje lub zużywa zastępowany płyn (albo jego wiadro), jest przy ładowaniu przepisywana na płyn ZalienFuel, razem z recepturami z KubeJS.
- Maszyny z płynem wpisanym na sztywno (pompa i szyby naftowe TFMG, piece koksownicze Immersive Engineering i Railcraft, wirówka MorePropulsion, olej roślinny z kompostu w Modern Industrialization) są przekierowane małymi mixinami.
- Ropa w generowaniu świata (jeziora PneumaticCraft, źródła Oritecha, szyby i złoża TFMG) to ropa ZalienFuel.
- Zastępowane płyny i wiadra są ukryte w JEI.
- Resztki w zbiornikach i wiadrach można przelać 1:1 w grze (stół rzemieślniczy i mikser Create).
Paliwa unikatowe dla jednego moda (turbopaliwo i biopaliwo Oritecha, biopaliwo Integrated Foregoing, paliwo rakietowe EnderIO, półprodukty Modern Industrialization, propan/butan TFMG, ...) zostają bez zmian.
Paliwa
| Paliwo | ID płynu | Wspólny tag |
|---|---|---|
| Ropa naftowa (Crude Oil) | zalienfuel:crude_oil |
c:crude_oil (także c:oil, c:crude_oils) |
| Ciężki olej (Heavy Oil) | zalienfuel:heavy_oil |
c:heavy_oil |
| Diesel | zalienfuel:diesel |
c:diesel, c:fuel |
| Benzyna (Gasoline) | zalienfuel:gasoline |
c:gasoline, c:fuel |
| Kerozyna (Kerosene) | zalienfuel:kerosene |
c:kerosene, c:fuel |
| Nafta (Naphtha) | zalienfuel:naphtha |
c:naphtha |
| LPG | zalienfuel:lpg |
c:lpg |
| Biodiesel | zalienfuel:biodiesel |
c:biodiesel, c:fuel |
| Etanol (Ethanol) | zalienfuel:ethanol |
c:ethanol (także c:bioethanol, c:biofuel) |
| Olej roślinny (Plant Oil) | zalienfuel:plant_oil |
c:plant_oil, c:plantoil |
| Kreozot (Creosote) | zalienfuel:creosote |
c:creosote |
Każdy płyn ma wiadro (stack 1, w zakładce ZalienFuel w trybie kreatywnym) i pasujący tag c:, więc każda receptura
i maszyna oparta na wspólnych tagach przyjmuje go bez dodatkowej pracy. Jar dopisuje też płyny do tagów paliw TFMG
(tfmg:firebox_fuel, tfmg:flammable, tfmg:gas, tfmg:blast_stove_fuel).
Zamiana starych płynów
Płyny i wiadra z innych modów działają jak dotąd; nic nie jest zamieniane automatycznie. Zamieniasz je w grze, 1:1:
- Stół rzemieślniczy: jedno stare wiadro → jedno wiadro ZalienFuel (bezkształtna).
- Mikser Create (kadź): 1000 mB starego płynu → 1000 mB płynu ZalienFuel.
Receptury istnieją dla każdego zastępowanego płynu (zalienfuel:convert/<paliwo>/<mod>) i ładują się tylko, gdy
mod źródłowy jest zainstalowany, więc jar działa bez żadnego z nich.
Co jest zastępowane
Każde paliwo zastępuje płyn o tej samej nazwie z tych modów (pełna lista: FuelType.java):
| Paliwo | Zastępowane płyny z |
|---|---|
| Ropa naftowa | TFMG, Create Diesel Generators, PneumaticCraft (Oil), Oritech, Modern Industrialization, XyCraft |
| Ciężki olej | TFMG, Oritech |
| Diesel | TFMG, Create Diesel Generators, PneumaticCraft, Oritech, Modern Industrialization |
| Benzyna | TFMG, Create Diesel Generators, PneumaticCraft |
| Kerozyna | TFMG, PneumaticCraft, MorePropulsion |
| Nafta | TFMG, Oritech, Modern Industrialization |
| LPG | TFMG, PneumaticCraft (przedmiot „Lpg Tank” z TFMG zostaje) |
| Biodiesel | Immersive Engineering, PneumaticCraft, Create Diesel Generators, Modern Industrialization |
| Etanol | Immersive Engineering, PneumaticCraft, Create Diesel Generators, Modern Industrialization, Mekanism Generators (Bioethanol), Create Crafts & Additions (Biofuel) |
| Olej roślinny | Immersive Engineering, PneumaticCraft (Vegetable Oil), Create Diesel Generators, Modern Industrialization, Create Crafts & Additions (Seed Oil) |
| Kreozot | Immersive Engineering, TFMG, Modern Industrialization, Railcraft |
Celowo bez zmian: turbopaliwo i biopaliwo Oritecha (biopaliwo jest też wyjęte z c:biodiesel), biopaliwo
Integrated Foregoing, paliwo rakietowe EnderIO, półprodukty Modern Industrialization (boosted diesel, light/heavy fuel, ...),
propan/butan/gaz piecowy/napalm z TFMG, smar, oleje spożywcze.
Wspierane mody
Stan wbudowanej obsługi per mod. „Receptury” = przepisywane przy ładowaniu, „dane” = tagi, rejestry paliw i datamapy z nazwą płynu, „mixin” = przekierowany producent z płynem wpisanym na sztywno.
| Mod | Status |
|---|---|
| Create: The Factory Must Grow | receptury, dane (paliwa miotacza ognia, tagi), mixin: pompa, szyby i złoża ropy |
| Create Diesel Generators | receptury, dane (tag wyjścia pompy, silniki przez tagi) |
| PneumaticCraft: Repressurized | receptury (rafineria, zakład termiczny, Amadron, ...), jeziora ropy |
| Oritech | receptury, źródła ropy i węzły zasobów, biopaliwo osobno |
| Modern Industrialization | receptury, datamapa generatora diesla, mixin: olej roślinny z kompostu |
| Immersive Engineering | receptury, mixin: kreozot z pieca koksowniczego |
| Railcraft | mixin: kreozot z pieca koksowniczego (wyjście receptury i slot na pojemnik) |
| MorePropulsion | mixin: kerozyna z wirówki i jej zbiornik |
| Create Propulsion | dane: paliwa dla silników na płyny ZalienFuel |
| Mekanism Generators, Create Crafts & Additions, XyCraft | receptury i tagi |
Wszystko, co bierze płyny po tagu c: |
działa od razu |
Obsługa danego moda ładuje się tylko, gdy mod jest zainstalowany; jeśli aktualizacja moda przesunie hak, ZalienFuel zapisze ostrzeżenie w logu i to jedno przekierowanie nie działa, nic się nie wywala.
Narzędzia admina
Poziom op 2. Działają tylko na załadowanych chunkach i nigdy ich nie ładują ani nie generują.
/zalienfuel migrate [radius <r> | box <x1 y1 z1> <x2 y2 z2>]zamienia 1:1 zastępowane płyny paliwowe stojące w zbiornikach (każdy block entity z obsługą płynów: zbiorniki Create, TFMG, maszyny, ...) na płyn ZalienFuel, domyślnie w promieniu 64 wokół ciebie./zalienfuel migrate dryrun ...tylko raportuje. Działa w dwóch przebiegach. Najpierw przepisuje płyn zapisany w danych każdego block entity w obszarze (dociera do zbiorników, które nie dają się opróżnić ani napełnić, jak maszyny Oritecha i ich rdzenie multibloków, oraz do płynu w przesyle wewnątrz rur, pomp i zaworów Create, które nie mają zbiornika); w raporcie jako „rewritten via NBT” i „pipes rewritten via NBT”. Potem wszystko, co nadal trzyma stary płyn przez swoje capability, jest zamieniane 1:1 po wcześniejszej symulacji; jeśli zbiornik odrzuci nowy płyn, stary wraca na miejsce, a zbiornik trafia na listę pominiętych. Wynik (mB i block entity na paliwo, pozycje pominiętych) idzie na czat i do logu. Przedmiotów (wiadra w skrzyniach) nie rusza: użyj receptur zamiany./zalienfuel fillfluid <poz> <płyn> <mB>napełnia zbiornik przez jego obsługę płynów (testy).
Skaner ropy, grzałki elektryczne, Industrial Cooler
Przeniesione do osobnego moda ZalienTools (https://git.zatto.pl/ZalienCraft-mods/ZalienTools). Światy zapisane z
ZalienFuel 0.4.x wczytują się poprawnie z zainstalowanym ZalienTools (stare ID zalienfuel: są aliasowane); bez ZalienTools te
przedmioty i bloki znikają. ZalienFuel 0.5.0 to wyłącznie unifikacja paliw.
Instalacja
- Wymaga Minecrafta 1.21.1 i NeoForge 21.1.x.
- Wrzuć
zalienfuel-<wersja>.jardo folderumods/na serwerze i u każdego gracza (płyny to bloki i przedmioty, muszą być po obu stronach). - Uruchom grę. Nic więcej nie trzeba ustawiać.
Konfiguracja
config/zalienfuel-common.toml:
| Opcja | Domyślnie | Co robi |
|---|---|---|
redirectRecipes |
true |
Przepisuje receptury innych modów na płyny i wiadra ZalienFuel (działa od następnego przeładowania receptur; najpewniej restart). |
redirectMachines |
true |
Włącza mixiny przekierowujące producentów z płynem na sztywno i generowanie świata. |
recipeExclusions |
[] |
ID receptur (ns:ścieżka) albo całe przestrzenie nazw (ns:*), których nigdy nie przepisujemy. |
logRewrittenRecipes |
false |
Loguje ID każdej przepisanej receptury (debug). |
Receptury w przestrzeni zalienfuel (zamiany 1:1) nigdy nie są przepisywane. Przy ładowaniu log pokazuje
ZalienFuel: rewrote N recipes ... z liczbą na paliwo. Modpack nadal może rozszerzyć albo nadpisać wszystko własnym
datapackiem lub KubeJS (#c:diesel albo bezpośrednio zalienfuel:diesel). TFMG trzyma typy paliw w statycznym
cache, więc zmiana tagów paliw wymaga restartu, nie /reload.
Dodanie do istniejącego świata
- Płyny, które już stoją w zbiornikach, zostają takie, jakie były (nie ma automatycznej migracji). Maszyny dalej przyjmują stare płyny tam, gdzie używały tagów; przelej je przez recepturę konwersji, żeby zamienić je na ZalienFuel.
- Już wygenerowane jeziora i źródła ropy zostają ropą starego moda; ropę ZalienFuel dostają tylko nowe chunki.
- Późniejsze usunięcie ZalienFuel kasuje jego płyny ze zbiorników i wiader, jak przy każdym modzie dodającym płyny.
Budowanie ze źródeł
Wymaga JDK 21.
./gradlew build # jar w build/libs/
./gradlew runClient # klient deweloperski
Mixiny per mod celują w klasy po nazwie (@Pseudo), więc do kompilacji nie trzeba żadnych cudzych jarów. Żeby je
sprawdzić, wrzuć docelowe mody do mods/ serwera NeoForge 21.1.250 razem z zbudowanym jarem i uruchom go: każdy hak
zapisze Applied <Mixin> to <klasa>, a po starcie Mixin OK albo Mixin NOT applied.
Błędy i pomysły
Załóż zgłoszenie. Dołącz listę modów (albo nazwę
i wersję modpacka), co robiłeś i plik latest.log.
Licencja
MIT. ZalienFuel można używać w dowolnym modpacku.