
For example, a block getting 1 liquid a frame when it needs 10 liquid a frame will have 10% efficiency every frame, instead of having consValid() return true every 10 frames.
MINDUSTRY MODS GITHUB CODES HOW TO
DrawDefault draws the default block sprites (in this case, the top with its glass cover)įor a variety of examples on how to use DrawBlocks, consult the source code.
MINDUSTRY MODS GITHUB CODES FULL
DrawLiquidTile draws an animated square region of cryofluid liquid, with opacity depending on how full the block is.DrawRegion draws a region named cryofluid-mixer-bottom as the first layer.DrawMulti simply combines multiple draw implementations.Block drawers are now modular, which means you can compose different layers instead of using one specific DrawBlock type.Īs an example, here is how a cryofluid mixer's drawer is implemented:ĭrawer = new DrawMulti( new DrawRegion( "-bottom"), new DrawLiquidTile( Liquids. Many DrawBlock subclasses have been removed, as they are now redundant. ShootMulti: Chain together patterns, so you can have something like a duo that shoots a shotgun out of each barrel.ShootBarrel: Similar to ShootAlternate, but barrels can be at any position or rotation.ShootAlternate: Duo/spectre double barrel shots.ShootSpread: Shotgun of projectiles with configurable spread.The default ShootPattern implementation has no spread, and only supports a firstShotDelay (charging) and shotDelay (delay between shots).Fields like shots, chargeTime and spread have been moved into this object.This pattern controls how, where and when bullets are created.Weapons and turrets now have a ShootPattern shoot field.Why? Because JITPack sucks, but that's a story for another time.įor the absolute latest versions of Mindustry/Arc, replace the commit hashes at the ends with the latest commit hash of the corresponding repository.

Note that the jitpack repository is now MindustryJitpack, not Mindustry.
