Compatibility
Minecraft: Java Edition
Platforms
Supported environments
Creators
Details
This library provides a variety of largely data-driven APIs for mod and modpack developers, and contains code common to my Create add-ons and other mods. Most of its systems are designed to be very versatile to allow modders and modpack developers to do things with the game they can't normally.
The library is heavily integrated with Create, but does depend on it. Create-required features will simply be disabled if the mod is not installed.
Here is a list of API features in order of size and utility:
API Features
Contaminants
Contaminants are data-driven flags that can be added to Item Stacks, Fluid Stacks and other objects like Block Entities. They persist through vanilla processes like Crafting, Smelting etc., most Create processes, and processes from this library like Ageing and Recycling (these can all be changed in the Configs). For example, Items crafted from an Item contaminated with "poison" will also have the "poison" contaminant.
Decaying Items
Decay can be applied to Items that will cause them to change after a given time, even if they are in an arbitrary modded inventory, allowing for things like rotting Items or aging wine. They are based on the similar feature in Factorio, and are data-driven. Decays can change the Item itself, or modify Components (such as adding or removing Contaminants).
Ageing Recipes
A Recipe Type that causes Items placed in a Barrel (or other implementing container) to start a given Decay. The Decay is stopped if the Item is removed from the container.
Teams
A system for checking whether Players belong to a specific group, and storing data for that group. Implementations include a single Player, vanilla's Scoreboard Teams, and FTB Teams (upcoming). Team-Bound Items and Block Entities allow a Player to select a Team of which they are a member, and then any members of that Team will access the same information for that object.
Wishes (WIP)
Designed to remove RNG grind, Wishes are Items that can be granted as quest rewards, Shop Rewards crafted, etc. and allow the Player to choose Items (specifically, specify an Advanced Ingredient, see below). Whenever the Player rolls a Loot Table, the game will try its best to manipulate the Loot Table to fulfill the Player's existing Wishes. It is a lot more involved than just rolling the Loot Table until the Item is found, and as such works for Wishes more complex than just a specific Item, such as Items with particular Enchantments.
Extended Inventory (Experimental)
Adds two new Attribute Types, petrolpark:player.extra_inventory_slots and petrolpark:player.extra_hotbar_slots that do exactly what they say on the tin. The extra slots will not only show in the inventory screen, but in vanilla and most arbitrary modded menus. Being Attributes, they can be modified by Armor, Potions, Enchantments etc. just with datapacks and/or commands. The aim is to provide a backpack system that does not involve having to click into a separate screen.
Loot Table Modifications
Data-driven modification of existing vanilla or modded Loot Tables without having to overwrite the whole Loot Table, with greater versatility than NeoForge's Global Loot Modifiers (such as being able to add, remove and modify individual Loot Pools and Loot Pool Entries). This allows multiple mods or datapacks to modify an existing Loot Table at once with datapacks.
Recycling (WIP)
A versatile and balanced "uncrafting" system. Automatically scans Recipes and tries to create reverse Recycling Recipes that accept as a parameter the proportion of Ingredients to recycle, and if an Item has numerous different Recipes then Recycling will usually produce nothing unless explicitly defined. If a Recipe Ingredient does not have a single obvious inverse Item, it is omitted from the Recycing results. Ingredient inverses can be defined with a datapack. For example, you can register your Item "Scrap Planks" to the minecraft:planks Tag Ingredient, and then any recipe that takes the minecraft:planks Tag as an Ingredient will recycle into the correspondong number of Scrap Planks.
This system interfaces with the Item Compression system (see below), so if a modded Recipe requires one Moddium Ingot, then the corresponding Recycling Recipe with 25% returns will give 2 or 3 Moddium Nuggets, without you having to tell it that. Modders can also register Recycling Output Modifiers to affect the results based on the input Item, and built-in implementations of this include reducing the returns based on the input Item's durability and transferring Contaminants from the input to the outputs.
Recipe Books
Allows for the gating of Recipes behind Items called Recipe Books, which could be given as quest rewards, Shop Rewards, from advanced crafts, etc. Crafts will not be possible unless a Chiseled Bookshelf (or other implementing Block) containing the Recipe Book is placed next to the Block doing the craft.
Implementation currently exists for vanilla Blocks like Crafting Tables, Crafters and Furnaces, and for most Create machines. If JEI is installed, the Recipe the Recipe Book unlocks will be rendered nicely in the tooltip for the Item.
Item Compression (WIP)
Automatically scan for and index reversible "compression" Recipes, e.g. nine Ingots into one Block, also including mods that add things like quintuple compressed Cobblestone. Compressions do not have to be registered by a mod; they are automatically scanned for. These compressions can then be easily accessed.
Advanced Ingredients
Like vanilla/NeoForge Ingredients, but generically typed. They also have captions to make it easier to see what a more complicated Ingredient actually requires in Recipe viewers like JEI, and interface with the Wishes system. The library provides several implementations, such as testing whether an object has a particular Contaminant.
Shops (WIP)
Data-driven system of randomly-generated requests for Items that give Rewards like Items (e.g. Recipe Books), Villager Gossips, unlocking Trades, and XP. Customers pick random requests based on things like the Shop's level, randomly apply Modifiers (e.g. 1.5x if the Item has this Contaminant) and randomly pick Rewards. All this Random selection is data-driven.
Shops can have levels and are bound to Teams, so Players in the same Team can progress a Shop together.
Compat Recipe Serializers
Allow Recipes from another mod to be done in machines from your mod, without having that mod as a dependency or even requiring it in the build environment, by reading the Recipe JSON file for that mod directly.
Loot Number Providers, Conditions and Functions
Several new implementations of vanilla's data-driven Number Providers, Loot Item Conditions and Loot Item Functions, allowing for much greater versatility with things like Loot Tables. Added Number Providers include getting properties of Entities, Items and Teams.
Advanced Recipes
Interfaces for Recipes that impose additonal restrictions on their use.
Recipe-Book-Required Recipes
See above.
Biome-Dependent Recipes
Recipes than can only be conducted in a given set of Biomes. This information can be rendered in JEI and its derivatives.
First-Time-Lucky Recipes
Used with Recipes with random results (particularly Create's processing Recipes) to guarantee a result the first time a Player does the Recipe, reducing grind. Implemented for some Create Recipe Types.
Badges
Badges are in-game cosmetic rewards I give out for things like being early to download my mods, donating, or winning community competitions. If you have the Badge unlocked they will appear in any world you join. They can be placed in a new Badge Curios slot if that mod is installed.
Customizable Creative Mode Tabs
Allows better control over where Items are placed in the Creative mode tab, and allows the addition of section labels.
Wood Compat
Allows for the creation of Items and Blocks than can be crafted from any wood (vanilla or modded), and will adjust their textures to show it.
Events
A few new events allowing to hook into systems you couldn't prior:
- Blended Block Colors: change the color of a Block before it is blended with surrounding Blocks, allowing for much smoother transitions than just vanilla's built-in
BlockColors. - Handle Precipitation: for when any Block is rained or snowed on
- Villager Special Prices: modify the price bonus or penalty for Trades (like if you have Hero of the Village or a bad reputation)
Small Client Features
- Extruded Block Models: A model definition that takes a Mask and textures and creates a model by applying that mask to a given texture, then extruding it by a given amount with a given side-texture
- Mean Shift Cluster Sprite Source: A sprite loader that averages the colors in a texture, creating stylized textures
- Small Banner Sprite Source: A sprite loader that creates one-block versions of Banner patterns by suitably cutting the base two-block versions
- Transparent Item Colors: Things like Leather Armor that can have arbitrary colors can now also specify a transparency
Create API Features
These are APIs and templates available if Create is also in the environment.
Splined Tubular Blocks
The placement and rendering of arbitrarily curved splines in the world. Used to good effect in Petrol's Parts with the Hydraulic Transmission and Pneumatic Tube.
Additional Ponder Instructions
- Shake the camera
- Create a fishing line
- Highlight a Ponder tag
- Make an entity swing an arm
- Outline any box
Off-Grid Tiling Blocks
Blocks whose textures tile at intervals greater than a single Block, allowing for a greater array of tesselating patterns.
Remember Placer Behaviour
Allows Create blocks to remember who placed them, used for things like First-Time-Lucky Recipes.
Shared Features
These are content-adding features (not just API) which are only enabled by certain dependent mods. Non-Petrolpark Mods can also enable these.
Redstone Programmer
Connects to Create's Redstone Links and allows programming specific sequences of signals. Essentially a MIDI editor for Redstone Link Frequencies. Used in Destroy and Petrol's Parts.
Basin Lid
Idea copied with permission from Create: Diesel Generators. Place on top of a Basin to to Lidded Basin Recipes (identically execept in name to other Basin Recipes) such as fermentation and pyrolysis. Used in Destroy. Lidded Basin Recipes also support Biome specificity, unlike base Create Basin Recipes.
Extrusion Die
Push Blocks through with a Create contraption to slice them, with a beautiful animation. Used in Destroy to slice Mashed Potato into Fries and Quartz into Quartz Pillars, for example. Recipes are of course data-driven and can be added by any mod, modpack or datapack.



