Crafttweaker Integration
All of these methods are added the RecipePrimer zenclass that Modular Machinery uses to build recipes. They work analog to the methods added by Modular Machinery.
- Some of them act on a previously added requirement
- They modify the primer, then return the primer, so you can chain them
Some methods "require" infinity as a value to be passed into them. For example, a position requirement can be set to be a y-level requirement by making the x and z coordinate bounds infinite. I'm not 100% sure if CraftTweaker supports positive and negative infinity as a keyword, but you should be able to always create your own:
val posInfinity = 1.0/0;
val negInfinity = -1.0/0;
primer.setPerTick(boolean perTick)
Sets a requirement to be evaluated every processing tick. Doesn't work on everything.
primer.addAuraInput(float visAdded, float fluxAdded)
primer.addAuraOutput(float visAdded, float fluxAdded)
primer.addVisRequirement(float visMin, float visMax)
Must call addAuraInput or addAuraOutput first.
primer.addFluxRequirement(float fluxMin, float fluxMax)
Must call addAuraInput or addAuraOutput first.
primer.addMineralInput(String name, int added)
primer.addMineralOutput(String name, int added)
primer.addOreRequirement(int min, int max)
Must call addMineralInput or addMineralOutput first.
primer.addReservoirInput(String name, int added)
primer.addReservoirOutput(String name, int added)
primer.addReservoirFluidRequirement(int min, int max)
Must call addReservoirInput or addReservoirOutput first.
primer.addReservoirResidualRequirement(int min, int max)
Must call addReservoirInput or addReservoirOutput first.
primer.addMantleRequirement(float emberMin, float emberMax, float stabilityMin, float stabilityMax)
primer.addManaInput(int mana)
primer.addManaOutput(int mana)
primer.addMechanicalInput(int power)
primer.addMechanicalCrankInput(int power)
primer.addMechanicalOutput(int power)
primer.addEmberInput(double ember)
primer.addEmberOutput(double ember)
primer.addLaserInput(long mMJ)
primer.addMekanismLaserInput(double power)
primer.addHotAirInput(int temperature, int temperatureMin, int temperatureMax)
primer.addHotAirOutput(int temperature, int temperatureMin, int temperatureMax)
primer.addMekanismHeatInput(float temperature, float temperatureMin, double temperatureMax)
primer.addMekanismHeatOutput(float temperature, float temperatureMin, double temperatureMax)
primer.addMysticalMechanicsInput(double min, double max)
primer.addMysticalMechanicsOutput(double level, double time)
primer.addLocalTimeRequirement(long mod, long min, long max)
primer.addGlobalTimeRequirement(long mod, long min, long max)
primer.addClearWeatherRequirement()
primer.addRainWeatherRequirement()
primer.addSnowWeatherRequirement()
primer.addStormWeatherRequirement()
primer.addBiomeRequirement(String[] biomes)
primer.addDimensionRequirement(int[] dimensions)
primer.addPositionRequirement(float x, float y, float z)
primer.addAreaRequirement(float xMin, float xMax, float yMin, float yMax, float zMin, float zMax)
primer.addYRequirement(float yMin, float yMax)
primer.setDistance(float distanceMin, float distanceMax)
primer.setAnchor(AnchorType anchor)
Must call addPositionRequirement, addAreaRequirement or addYRequirement first.
See AnchorType below.
primer.addAnchor(String identifier, int time)
mods.modulardiversity.AnchorType.getWorldSpawn()
mods.modulardiversity.AnchorType.getOffset(double x,double y,double z)
mods.modulardiversity.AnchorType.getAnchor(String identifier)
AnchorTypes can modify the zero point of positional components.