### Pressure Chamber Recipe JSON Example Source: https://context7.com/teampneumatic/pnc-repressurized/llms.txt Example JSON file for a Pressure Chamber recipe. Defines item inputs, required pressure, and item outputs. Supports stacked items and tags. ```json // data/mymod/recipe/pressure_chamber/compressed_diamond.json { "type": "pneumaticcraft:pressure_chamber", "inputs": [ { "item": "minecraft:diamond" }, { "type": "pneumaticcraft:stacked_item", "tag": "c:ingots/compressed_iron", "count": 4 } ], "pressure": 3.5, "results": [ { "item": "mymod:compressed_diamond", "count": 1 } ] } ``` -------------------------------- ### Thermopneumatic Processing Plant Recipe JSON Example Source: https://context7.com/teampneumatic/pnc-repressurized/llms.txt Example JSON for a Thermopneumatic Processing Plant recipe. Specifies fluid and item inputs, required temperature and pressure, and fluid output. ```json // data/mymod/recipe/thermo_plant/lubricant_from_diesel.json { "type": "pneumaticcraft:thermo_plant", "fluid_input": { "tag": "c:diesel", "amount": 1000 }, "item_input": { "tag": "c:dusts/redstone" }, "temperature": { "min_temp": 373 }, "pressure": 1.5, "fluid_output": { "fluid": "pneumaticcraft:lubricant", "amount": 1000 } } ``` -------------------------------- ### Refinery Recipe JSON Example Source: https://context7.com/teampneumatic/pnc-repressurized/llms.txt Example JSON for a Refinery recipe. Defines a fluid input and multiple fluid outputs with specified amounts. Useful for processing crude oil into various fuels. ```json // data/mymod/recipe/refinery/custom_oil.json { "type": "pneumaticcraft:refinery", "input": { "tag": "c:crude_oil", "amount": 10 }, "results": [ { "fluid": "pneumaticcraft:diesel", "amount": 4 }, { "fluid": "pneumaticcraft:kerosene","amount": 2 }, { "fluid": "pneumaticcraft:lpg", "amount": 3 }, { "fluid": "pneumaticcraft:gasoline","amount": 1 } ] } ``` -------------------------------- ### Add Explosion Crafting Recipe Source: https://github.com/teampneumatic/pnc-repressurized/wiki/Recipes-1.14.4-and-1.15.2-1.16.x Example of a JSON recipe for Explosion Crafting. Requires 'type', 'input', 'loss_rate', and 'results' fields. Loss rate is a percentage of items destroyed. ```json { "type": "pneumaticcraft:explosion_crafting", "input": { "tag": "forge:ingots/iron" }, "loss_rate": 20, "results": [ { "item": "pneumaticcraft:ingot_iron_compressed" } ] } ``` -------------------------------- ### Add Assembly System Recipe (Laser) Source: https://github.com/teampneumatic/pnc-repressurized/wiki/Recipes-1.14.4-and-1.15.2-1.16.x Example of a JSON recipe for the Assembly System using a laser program. Requires 'type', 'input', 'result', and 'program' fields. Input and result can be items or tags. ```json { "type": "pneumaticcraft:assembly_laser" "input": { "tag": "forge:storage_blocks/quartz" }, "result": { "item": "pneumaticcraft:aphorism_tile", "count": 4 }, "program": "laser" } ``` -------------------------------- ### Provide IAirHandler for Items Source: https://github.com/teampneumatic/pnc-repressurized/blob/1.21/Changelog.md Extend the `IAirHandler.Provider` abstract class and implement `Item#initCapabilities()` to provide an air handler for your item. This is used to get an instance of the air handler provider. ```java abstract class IAirHandler.Provider ``` ```java IItemRegistry#makeItemAirHandlerProvider() ``` -------------------------------- ### Thermopneumatic Processing Plant Recipe (1.15.2+) Source: https://github.com/teampneumatic/pnc-repressurized/wiki/Recipes-1.14.4-and-1.15.2-1.16.x Example JSON for a Thermopneumatic Processing Plant recipe in versions 1.15.2 and later. This format includes an optional 'temperature' field for min/max temperature constraints. ```json { "type": "pneumaticcraft:thermo_plant", "fluid_input": { "type": "pneumaticcraft:fluid", "tag": "pneumaticcraft:diesel", "amount": 1000 }, "item_input": { "tag": "forge:dusts/redstone" }, "temperature": { "min_temp": 373 }, "fluid_output": { "fluid": "pneumaticcraft:lubricant", "amount": 1000 } } ``` -------------------------------- ### Create Keybinding Checkbox for Upgrades Source: https://github.com/teampneumatic/pnc-repressurized/blob/1.21/Changelog.md Use `IPneumaticHelmetRegistry#makeKeybindingCheckBox()` to get a checkbox widget for toggling pneumatic helmet upgrades. This is part of the effort to make adding custom upgrades easier. ```java interface IPneumaticHelmetRegistry ``` ```java IPneumaticHelmetRegistry#makeKeybindingCheckBox() ``` -------------------------------- ### Query Air on Machine Block Entities Source: https://context7.com/teampneumatic/pnc-repressurized/llms.txt Use PNCCapabilities to get air handler information from a block entity. Handles cases where the capability is not present. ```java import me.desht.pneumaticcraft.api.PNCCapabilities; import me.desht.pneumaticcraft.api.tileentity.IAirHandlerMachine; import net.minecraft.core.Direction; // Query air on a machine block entity (returns Optional) BlockEntity be = /* ... */; PNCCapabilities.getAirHandler(be, Direction.NORTH).ifPresent(handler -> { float pressure = handler.getPressure(); // current pressure in bar int air = handler.getAir(); // mL of air stored int volume = handler.getVolume(); // effective volume in mL float maxPressure = handler.maxPressure(); // hard cap before explosion handler.addAir(1000); // add 1000 mL of air }); ``` -------------------------------- ### Query Heat on Block Entities Source: https://context7.com/teampneumatic/pnc-repressurized/llms.txt Use PNCCapabilities to get heat logic information from block entities. Allows adding heat and setting thermal resistance. ```java import me.desht.pneumaticcraft.api.PNCCapabilities; import me.desht.pneumaticcraft.api.heat.IHeatExchangerLogic; // Query heat on a block entity PNCCapabilities.getHeatLogic(be).ifPresent(heat -> { double temp = heat.getTemperature(); // precise server-side temperature (K) int tempInt = heat.getTemperatureAsInt(); // rounded, synced to client heat.addHeat(5000); // add heat energy heat.setThermalResistance(500.0); // slow heat transfer }); ``` -------------------------------- ### Register Custom Upgrades with IUpgradeRegistry Source: https://context7.com/teampneumatic/pnc-repressurized/llms.txt Use IUpgradeRegistry to register new upgrades, create their corresponding items, and associate them with block entities or entity types. This should be called during item registration and setup events. ```java import me.desht.pneumaticcraft.api.upgrade.IUpgradeRegistry; import me.desht.pneumaticcraft.api.upgrade.PNCUpgrade; IUpgradeRegistry upgradeReg = PneumaticRegistry.getInstance().getUpgradeRegistry(); // Register a new upgrade (call during item registration) PNCUpgrade MY_UPGRADE = upgradeReg.registerUpgrade( ResourceLocation.fromNamespaceAndPath("mymod", "my_upgrade"), 3, // max tier "mymod" // required mod IDs (upgrade only relevant if mymod is present) ); // Create the upgrade Item (call during item registration) Item upgradeItem = upgradeReg.makeUpgradeItem(MY_UPGRADE, 1, Rarity.UNCOMMON); // Register upgradeItem via DeferredRegister as usual // Associate the upgrade with your block entity type (from FMLCommonSetupEvent) upgradeReg.addApplicableUpgrades( MY_BLOCK_ENTITY_TYPE.get(), IUpgradeRegistry.Builder.of(MY_UPGRADE, 3) .with(PNCUpgrades.SPEED.get(), 4) // also allow 4x Speed upgrades ); // Associate with an entity type upgradeReg.addApplicableUpgrades( MY_ENTITY_TYPE.get(), IUpgradeRegistry.Builder.of(MY_UPGRADE, 1) ); // Query max upgrades int max = upgradeReg.getMaxUpgrades(myBlockEntity, MY_UPGRADE); // Count installed upgrades in a ItemStack (e.g. an upgrade container item) int installed = upgradeReg.getUpgradeCount(containerStack, MY_UPGRADE); // Get all upgrades in a stack Map all = upgradeReg.getUpgradesInItem(containerStack); ``` -------------------------------- ### IHeatExchangerLogic and IHeatRegistry Source: https://context7.com/teampneumatic/pnc-repressurized/llms.txt Provides a block entity with a full heat simulation, including ambient temperature, neighbor scanning, heat transfer, and temperature listeners. Use IHeatRegistry to get an instance of IHeatExchangerLogic and configure its thermal properties. ```APIDOC ## Heat Exchanger Logic — `IHeatExchangerLogic` and `IHeatRegistry` Provides a block entity with a full heat simulation: ambient temperature init, neighbour scanning, heat transfer, heat capacity/resistance, and temperature listeners. ```java import me.desht.pneumaticcraft.api.heat.IHeatExchangerLogic; import me.desht.pneumaticcraft.api.heat.IHeatRegistry; import me.desht.pneumaticcraft.api.heat.TemperatureListener; // In your BlockEntity: public class MyHeatableBE extends BlockEntity { private final IHeatExchangerLogic heatExchanger; public MyHeatableBE(BlockPos pos, BlockState state) { super(/* type */, pos, state); IHeatRegistry reg = PneumaticRegistry.getInstance().getHeatRegistry(); heatExchanger = reg.makeHeatExchangerLogic(); heatExchanger.setThermalCapacity(100_000); // large capacity = slow to heat/cool heatExchanger.setThermalResistance(250.0); // high resistance = slow transfer } @Override public void onLoad() { // Must call on first tick to discover neighbours and set ambient temp heatExchanger.initializeAsHull( getLevel(), getBlockPos(), IHeatExchangerLogic.ALL_BLOCKS, // accept all neighbour blocks Direction.values() // check all 6 sides ); // Register a listener for temperature changes heatExchanger.addTemperatureListener(newTemp -> System.out.printf("Temperature changed to %.1f K%n", newTemp)); } public static void tick(Level level, BlockPos pos, BlockState state, MyHeatableBE be) { be.heatExchanger.tick(); // disperses heat to/from neighbours each tick double temp = be.heatExchanger.getTemperature(); if (temp > 373) { // e.g. start processing when above 100°C (373 K) } } // Also expose via HEAT_EXCHANGER_BLOCK capability in RegisterCapabilitiesEvent } // Register a custom heat behaviour (e.g. make furnaces consume heat): IHeatRegistry heatReg = PneumaticRegistry.getInstance().getHeatRegistry(); heatReg.registerHeatBehaviour( ResourceLocation.fromNamespaceAndPath("mymod", "my_heat_behaviour"), MyHeatBehaviour::new ); ``` ``` -------------------------------- ### Using PressureTiers with IAirHandlerMachineFactory Source: https://context7.com/teampneumatic/pnc-repressurized/llms.txt Shows how to define and use different pressure tiers, including built-in and custom tiers, when creating air handlers with the IAirHandlerMachineFactory. Demonstrates accessing danger and critical pressure values. ```java import me.desht.pneumaticcraft.api.pressure.PressureTier; // Three built-in tiers: PressureTier t1 = PressureTier.TIER_ONE; // danger 5 bar, critical 7 bar PressureTier t1h = PressureTier.TIER_ONE_HALF; // danger 10 bar, critical 12 bar PressureTier t2 = PressureTier.TIER_TWO; // danger 20 bar, critical 25 bar // Custom tier (anonymous implementation): PressureTier custom = new PressureTier() { @Override public float getDangerPressure() { return 15f; } @Override public float getCriticalPressure(){ return 18f; } }; // Use with factory: IAirHandlerMachine handler = PneumaticRegistry.getInstance() .getAirHandlerMachineFactory() .createAirHandler(PressureTier.TIER_TWO, 16000); System.out.println(handler.getDangerPressure()); // 20.0 System.out.println(handler.getCriticalPressure()); // 25.0 ``` -------------------------------- ### Access PneumaticCraft API via PneumaticRegistry Source: https://context7.com/teampneumatic/pnc-repressurized/llms.txt Obtain the central API interface and helper methods. Safe to call after FML setup events. ```java import me.desht.pneumaticcraft.api.PneumaticRegistry; import me.desht.pneumaticcraft.api.PneumaticRegistry.IPneumaticCraftInterface; // Obtain the top-level API interface (safe to call after FML setup events) IPneumaticCraftInterface api = PneumaticRegistry.getInstance(); // Convenience: create a mod-namespaced ResourceLocation // equivalent to new ResourceLocation("pneumaticcraft", "my_path") ResourceLocation rl = PneumaticRegistry.RL("my_path"); // Access sub-APIs api.getAirHandlerMachineFactory(); // create air handlers for block entities api.getHeatRegistry(); // create heat exchangers, register heat behaviours api.getDroneRegistry(); // spawn delivery drones, register pathfind blocks api.getFuelRegistry(); // query fluid fuel values api.getUpgradeRegistry(); // register/query upgrades api.getItemRegistry(); // item filtering, volume modifiers, air handler items api.getMiscHelpers(); // security stations, XP fluids, global variables api.getSemiblockAccess(); // query Logistics/Crop Support semiblocks api.getCustomIngredientTypes(); // access FluidContainerIngredient type ``` -------------------------------- ### Create and Manage IAirHandlerMachine in BlockEntity Source: https://context7.com/teampneumatic/pnc-repressurized/llms.txt Demonstrates how to create an IAirHandlerMachine instance using IAirHandlerMachineFactory, integrate it into a custom BlockEntity, and handle its lifecycle including ticking, NBT serialization, and capability registration. ```java import me.desht.pneumaticcraft.api.tileentity.IAirHandlerMachineFactory; import me.desht.pneumaticcraft.api.tileentity.IAirHandlerMachine; import me.desht.pneumaticcraft.api.pressure.PressureTier; import net.neoforged.neoforge.capabilities.RegisterCapabilitiesEvent; // In your BlockEntity class: public class MyPneumaticBE extends BlockEntity { private final IAirHandlerMachine airHandler; public MyPneumaticBE(BlockPos pos, BlockState state) { super(/* type */, pos, state); IAirHandlerMachineFactory factory = PneumaticRegistry.getInstance().getAirHandlerMachineFactory(); // Tier 1: danger 5 bar, critical 7 bar, 5000 mL base volume airHandler = factory.createTierOneAirHandler(5000); // Or: factory.createTierTwoAirHandler(10000) — danger 20 bar, critical 25 bar // Or: factory.createAirHandler(PressureTier.TIER_ONE_HALF, 8000) — danger 10 bar } public static void tick(Level level, BlockPos pos, BlockState state, MyPneumaticBE be) { // Must be called every tick (server side) be.airHandler.tick(be); } @Override protected void saveAdditional(CompoundTag tag, HolderLookup.Provider reg) { super.saveAdditional(tag, reg); tag.put("AirHandler", airHandler.serializeNBT()); } @Override public void loadAdditional(CompoundTag tag, HolderLookup.Provider reg) { super.loadAdditional(tag, reg); airHandler.deserializeNBT(tag.getCompound("AirHandler")); } } // Register the capability in RegisterCapabilitiesEvent: @SubscribeEvent public static void registerCaps(RegisterCapabilitiesEvent event) { event.registerBlockEntity( PNCCapabilities.AIR_HANDLER_MACHINE, MY_BE_TYPE.get(), (be, side) -> be.getAirHandler() // expose from desired sides ); } ``` -------------------------------- ### Semiblock Access Methods Source: https://context7.com/teampneumatic/pnc-repressurized/llms.txt Provides methods to get semiblocks at a given world position, including primary and directional semiblocks, and to stream all semiblocks at a position. ```APIDOC ## Semiblock Access — `SemiblockAccess` Queries Logistics frames, Crop Support, and other semiblocks at a given world position (server-side only). ```java import me.desht.pneumaticcraft.api.semiblock.SemiblockAccess; import me.desht.pneumaticcraft.api.semiblock.ISemiBlock; SemiblockAccess semiblocks = PneumaticRegistry.getInstance().getSemiblockAccess(); // Get the primary (non-directional) semiblock at a position ISemiBlock sb = semiblocks.getSemiblock(level, new BlockPos(10, 64, 10)); if (sb != null) { System.out.println("Semiblock type: " + sb.getType().getRegistryName()); } // Get a directional semiblock on a specific face ISemiBlock directional = semiblocks.getSemiblock(level, pos, Direction.NORTH); // Stream all semiblocks at a position semiblocks.getAllSemiblocks(level, pos) .forEach(s -> System.out.println("Found semiblock: " + s)); ``` ``` -------------------------------- ### Define Campfire Heat Properties Source: https://github.com/teampneumatic/pnc-repressurized/wiki/Block-Heat-Properties Example of a default heat properties entry for Campfires. It specifies temperature, thermal resistance, heat capacity, and a cold transformation. ```json { "type": "pneumaticcraft:heat_properties", "block": "minecraft:campfire", "statePredicate": { "lit": "true" }, "temperature": 1700, "thermalResistance": 5000, "heatCapacity": 10000, "transformCold": { "block": "minecraft:campfire[lit=false]" } } ``` -------------------------------- ### Registering Custom XP Fluids with IMiscHelpers Source: https://context7.com/teampneumatic/pnc-repressurized/llms.txt Register a custom XP fluid using IMiscHelpers. Specify the fluid ingredient and the amount of fluid per XP point. ```java // Register a custom XP fluid (e.g., 30 mB per XP point) misc.registerXPFluid( FluidIngredient.of(FluidTags.create(ResourceLocation.fromNamespaceAndPath("mymod", "xp_fluid"))), 30 ); ``` -------------------------------- ### Assembly System Recipe (Laser) Source: https://context7.com/teampneumatic/pnc-repressurized/llms.txt Defines a recipe for the assembly laser, specifying input material, resulting item, and program type. ```json // data/mymod/recipe/assembly/aphorism_tile.json { "type": "pneumaticcraft:assembly_laser", "input": { "tag": "c:storage_blocks/quartz" }, "result": { "item": "pneumaticcraft:aphorism_tile", "count": 4 }, "program": "laser" } ``` -------------------------------- ### Registering Pneumatic Volume Modifiers with IItemRegistry Source: https://context7.com/teampneumatic/pnc-repressurized/llms.txt Use IItemRegistry to register a pneumatic volume modifier. This allows for dynamic adjustments to an item's volume, for example, based on enchantments. ```java // Register a pneumatic volume modifier (e.g., enchantment increases item volume) itemReg.registerPneumaticVolumeModifier((stack, originalVolume) -> { int holding = EnchantmentHelper.getItemEnchantmentLevel( Enchantments.UNBREAKING, stack); return originalVolume + holding * 1000; }); ``` -------------------------------- ### Register Blocks for TOP & WAILA Probing Source: https://github.com/teampneumatic/pnc-repressurized/blob/1.21/Changelog.md Implement `IPneumaticCraftProbebable` or add blocks to the `pneumaticcraft:probe_target` tag to have them treated like PNC blocks for TOP & WAILA display. This is useful for blocks added by PNC addon mods. ```java interface IPneumaticCraftProbebable ``` ```java block tag pneumaticcraft:probe_target ``` -------------------------------- ### PNCCapabilities - Querying Air, Heat, and Filtering Source: https://context7.com/teampneumatic/pnc-repressurized/llms.txt Utilize NeoForge capabilities to query and interact with air pressure, heat, and item filtering on blocks, items, and entities within PneumaticCraft. ```APIDOC ## Capabilities — `PNCCapabilities` NeoForge capability objects for querying air and heat on blocks, items, and entities. ```java import me.desht.pneumaticcraft.api.PNCCapabilities; import me.desht.pneumaticcraft.api.tileentity.IAirHandlerMachine; import me.desht.pneumaticcraft.api.tileentity.IAirHandlerItem; import me.desht.pneumaticcraft.api.tileentity.IAirHandler; import me.desht.pneumaticcraft.api.heat.IHeatExchangerLogic; import net.minecraft.core.Direction; // Query air on a machine block entity (returns Optional) BlockEntity be = /* ... */; PNCCapabilities.getAirHandler(be, Direction.NORTH).ifPresent(handler -> { float pressure = handler.getPressure(); // current pressure in bar int air = handler.getAir(); // mL of air stored int volume = handler.getVolume(); // effective volume in mL float maxPressure = handler.maxPressure(); // hard cap before explosion handler.addAir(1000); // add 1000 mL of air }); // Query air on an item (e.g. Pneumatic Helmet, Air Canister) ItemStack stack = /* ... */; PNCCapabilities.getAirHandler(stack).ifPresent(itemHandler -> { float p = itemHandler.getPressure(); itemHandler.addAir(500); }); // Query air on an entity (e.g. a Drone) Entity entity = /* ... */; PNCCapabilities.getAirHandler(entity).ifPresent(entityHandler -> { System.out.println("Drone pressure: " + entityHandler.getPressure()); }); // Query heat on a block entity PNCCapabilities.getHeatLogic(be).ifPresent(heat -> { double temp = heat.getTemperature(); // precise server-side temperature (K) int tempInt = heat.getTemperatureAsInt(); // rounded, synced to client heat.addHeat(5000); // add heat energy heat.setThermalResistance(500.0); // slow heat transfer }); // Item filtering capability PNCCapabilities.getItemFiltering(filterStack).ifPresent(filter -> { boolean matches = filter.matchesFilter(checkedStack); }); ``` ``` -------------------------------- ### Query Fuel Properties with IFuelRegistry Source: https://context7.com/teampneumatic/pnc-repressurized/llms.txt Use IFuelRegistry to get the compressed air output and burn rate multiplier for fluid fuels. Custom fuels can be registered via datapacks. ```java import me.desht.pneumaticcraft.api.fuel.IFuelRegistry; import net.minecraft.world.level.material.Fluid; IFuelRegistry fuelReg = PneumaticRegistry.getInstance().getFuelRegistry(); // Get the fuel value (mL of air per 1000 mL of fluid, no speed upgrades) int dieselValue = fuelReg.getFuelValue(level, PNCFluids.DIESEL.get()); // e.g. 1,000,000 for diesel // Get the burn rate multiplier (1.0 = normal, >1.0 = burns faster) float rate = fuelReg.getBurnRateMultiplier(level, PNCFluids.LPG.get()); // List all registered fuels Collection fuels = fuelReg.registeredFuels(level); fuels.forEach(f -> System.out.printf("%s -> %d mL air/bucket%n", BuiltInRegistries.FLUID.getKey(f), fuelReg.getFuelValue(level, f))); ``` -------------------------------- ### Heat Frame Cooling Recipe Source: https://context7.com/teampneumatic/pnc-repressurized/llms.txt Defines a recipe for heat frame cooling, specifying input fluid, resulting item, maximum temperature, and bonus output. ```json // data/mymod/recipe/heat_frame_cooling/plastic_solidify.json { "type": "pneumaticcraft:heat_frame_cooling", "input": { "fluid": "pneumaticcraft:plastic" }, "result": { "item": "pneumaticcraft:plastic" }, "max_temp": 273, "bonus_output": { "multiplier": 0.01, "limit": 0.75 } } ``` -------------------------------- ### Datapack Recipes - Machine Recipes Source: https://context7.com/teampneumatic/pnc-repressurized/llms.txt All machine recipes are defined as JSON files in datapacks. Place files in `data//recipe//`. ```APIDOC ## Datapack Recipes All machine recipes are defined as JSON files in datapacks. Place files in `data//recipe//`. ### Pressure Chamber Recipe ```json { "type": "pneumaticcraft:pressure_chamber", "inputs": [ { "item": "minecraft:diamond" }, { "type": "pneumaticcraft:stacked_item", "tag": "c:ingots/compressed_iron", "count": 4 } ], "pressure": 3.5, "results": [ { "item": "mymod:compressed_diamond", "count": 1 } ] } ``` ### Thermopneumatic Processing Plant Recipe ```json { "type": "pneumaticcraft:thermo_plant", "fluid_input": { "tag": "c:diesel", "amount": 1000 }, "item_input": { "tag": "c:dusts/redstone" }, "temperature": { "min_temp": 373 }, "pressure": 1.5, "fluid_output": { "fluid": "pneumaticcraft:lubricant", "amount": 1000 } } ``` ### Refinery Recipe ```json { "type": "pneumaticcraft:refinery", "input": { "tag": "c:crude_oil", "amount": 10 }, "results": [ { "fluid": "pneumaticcraft:diesel", "amount": 4 }, { "fluid": "pneumaticcraft:kerosene","amount": 2 }, { "fluid": "pneumaticcraft:lpg", "amount": 3 }, { "fluid": "pneumaticcraft:gasoline","amount": 1 } ] } ``` ``` -------------------------------- ### Spawn and Manage Drones with IDroneRegistry Source: https://context7.com/teampneumatic/pnc-repressurized/llms.txt Use IDroneRegistry to spawn delivery drones, retrieve items, deliver fluids, query existing drones, and register pathfindable blocks. Ensure necessary imports are present. ```java import me.desht.pneumaticcraft.api.drone.IDroneRegistry; import me.desht.pneumaticcraft.api.drone.IDrone; import net.minecraft.core.GlobalPos; import net.minecraft.core.BlockPos; IDroneRegistry droneReg = PneumaticRegistry.getInstance().getDroneRegistry(); // Spawn an Amazon-style delivery drone to drop items at a location GlobalPos target = GlobalPos.of(level.dimension(), new BlockPos(100, 64, 200)); PathfinderMob drone = droneReg.deliverItemsAmazonStyle( target, new ItemStack(Items.DIAMOND, 5), new ItemStack(Items.EMERALD, 3) ); drone.setCustomName(Component.literal("My Delivery Drone")); // Retrieve items from an inventory PathfinderMob retriever = droneReg.retrieveItemsAmazonStyle( target, new ItemStack(Items.IRON_INGOT, 64) ); // Deliver a fluid (fluid is lost if no IFluidHandler at destination) FluidStack oil = new FluidStack(PNCFluids.OIL.get(), 16000); droneReg.deliverFluidAmazonStyle(target, oil); // Query an existing drone entity by entity ID droneReg.getDrone(level, entityId).ifPresent((IDrone d) -> { System.out.println("Drone pressure: " + d.getDronePressure()); System.out.println("Owner: " + d.getOwnerUUID()); System.out.println("Position: " + d.getDronePos()); int speedUpgrades = d.getUpgrades(PNCUpgrades.SPEED.get()); System.out.println("Speed upgrades: " + speedUpgrades); d.addAirToDrone(10000); // refuel the drone }); // Query a Programmable Controller drone by block pos droneReg.getDrone(level, new BlockPos(50, 64, 50)).ifPresent(d -> System.out.println("Controller drone active widget: " + d.getActiveWidget()) ); // Register a custom block as drone-pathfindable droneReg.addPathfindableBlock(MyBlocks.MY_SPECIAL_BLOCK.get(), null); // always passable droneReg.addPathfindableBlock(MyBlocks.MY_GATE_BLOCK.get(), (drone, pos) -> drone.getUpgrades(PNCUpgrades.SECURITY.get()) > 0); ``` -------------------------------- ### Heat Frame Cooling Recipe JSON Source: https://github.com/teampneumatic/pnc-repressurized/wiki/Recipes-1.14.4-and-1.15.2-1.16.x Defines a recipe for the Heat Frame Cooling machine. It takes a fluid input and produces an item output, with configurable temperature thresholds and bonus output chances. ```json { "type": "pneumaticcraft:heat_frame_cooling", "input" : { "type": "pneumaticcraft:fluid", "fluid": "pneumaticcraft:plastic" }, "result": { "item": "pneumaticcraft:plastic" }, "max_temp": 273, "bonus_output": { "multiplier": 0.01, "limit": 0.75 } } ``` -------------------------------- ### Amadron Item Offer with NBT Data Source: https://github.com/teampneumatic/pnc-repressurized/wiki/Amadron-and-Datapacks Example of an Amadron offer for an enchanted book with Fortune III. Custom NBT data uses standard Minecraft SNBT syntax. Ensure any embedded quotes within the NBT string are properly escaped. ```json "output": { "type": "ITEM", "id": "minecraft:enchanted_book", "amount": 1, "nbt": "{StoredEnchantments:[{lvl:3s,id:\"minecraft:fortune\"}]}" } ```