Test with stuff + Forestry potential support
This commit is contained in:
parent
5b05cf651b
commit
bd26e441cb
174 changed files with 5602 additions and 0 deletions
30
BM_src/forestry/api/fuels/EngineBronzeFuel.java
Normal file
30
BM_src/forestry/api/fuels/EngineBronzeFuel.java
Normal file
|
@ -0,0 +1,30 @@
|
|||
package forestry.api.fuels;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
|
||||
public class EngineBronzeFuel {
|
||||
/**
|
||||
* Item that is valid fuel for a biogas engine.
|
||||
*/
|
||||
public final Fluid liquid;
|
||||
/**
|
||||
* Power produced by this fuel per work cycle of the engine.
|
||||
*/
|
||||
public final int powerPerCycle;
|
||||
/**
|
||||
* How many work cycles a single "stack" of this type lasts.
|
||||
*/
|
||||
public final int burnDuration;
|
||||
/**
|
||||
* By how much the normal heat dissipation rate of 1 is multiplied when using this fuel type.
|
||||
*/
|
||||
public final int dissipationMultiplier;
|
||||
|
||||
public EngineBronzeFuel(Fluid liquid, int powerPerCycle, int burnDuration, int dissipationMultiplier) {
|
||||
this.liquid = liquid;
|
||||
this.powerPerCycle = powerPerCycle;
|
||||
this.burnDuration = burnDuration;
|
||||
this.dissipationMultiplier = dissipationMultiplier;
|
||||
}
|
||||
}
|
26
BM_src/forestry/api/fuels/EngineCopperFuel.java
Normal file
26
BM_src/forestry/api/fuels/EngineCopperFuel.java
Normal file
|
@ -0,0 +1,26 @@
|
|||
package forestry.api.fuels;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class EngineCopperFuel {
|
||||
|
||||
/**
|
||||
* Item that is valid fuel for a peat-fired engine.
|
||||
*/
|
||||
public final ItemStack fuel;
|
||||
/**
|
||||
* Power produced by this fuel per work cycle.
|
||||
*/
|
||||
public final int powerPerCycle;
|
||||
/**
|
||||
* Amount of work cycles this item lasts before being consumed.
|
||||
*/
|
||||
public final int burnDuration;
|
||||
|
||||
public EngineCopperFuel(ItemStack fuel, int powerPerCycle, int burnDuration) {
|
||||
this.fuel = fuel;
|
||||
this.powerPerCycle = powerPerCycle;
|
||||
this.burnDuration = burnDuration;
|
||||
}
|
||||
|
||||
}
|
24
BM_src/forestry/api/fuels/FermenterFuel.java
Normal file
24
BM_src/forestry/api/fuels/FermenterFuel.java
Normal file
|
@ -0,0 +1,24 @@
|
|||
package forestry.api.fuels;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class FermenterFuel {
|
||||
/**
|
||||
* Item that is a valid fuel for the fermenter (i.e. fertilizer).
|
||||
*/
|
||||
public final ItemStack item;
|
||||
/**
|
||||
* How much is fermeted per work cycle, i.e. how much biomass is produced per cycle.
|
||||
*/
|
||||
public final int fermentPerCycle;
|
||||
/**
|
||||
* Amount of work cycles a single item of this fuel lasts before expiring.
|
||||
*/
|
||||
public final int burnDuration;
|
||||
|
||||
public FermenterFuel(ItemStack item, int fermentPerCycle, int burnDuration) {
|
||||
this.item = item;
|
||||
this.fermentPerCycle = fermentPerCycle;
|
||||
this.burnDuration = burnDuration;
|
||||
}
|
||||
}
|
29
BM_src/forestry/api/fuels/FuelManager.java
Normal file
29
BM_src/forestry/api/fuels/FuelManager.java
Normal file
|
@ -0,0 +1,29 @@
|
|||
package forestry.api.fuels;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
|
||||
public class FuelManager {
|
||||
/**
|
||||
* Add new fuels for the fermenter here (i.e. fertilizer). Will accept Items, ItemStacks and Strings (Ore Dictionary)
|
||||
*/
|
||||
public static HashMap<Object, FermenterFuel> fermenterFuel;
|
||||
/**
|
||||
* Add new resources for the moistener here (i.e. wheat)
|
||||
*/
|
||||
public static HashMap<Object, MoistenerFuel> moistenerResource;
|
||||
/**
|
||||
* Add new substrates for the rainmaker here
|
||||
*/
|
||||
public static HashMap<Object, RainSubstrate> rainSubstrate;
|
||||
/**
|
||||
* Add new fuels for EngineBronze (= biogas engine) here
|
||||
*/
|
||||
public static HashMap<Object, EngineBronzeFuel> bronzeEngineFuel;
|
||||
/**
|
||||
* Add new fuels for EngineCopper (= peat-fired engine) here
|
||||
*/
|
||||
public static HashMap<Object, EngineCopperFuel> copperEngineFuel;
|
||||
|
||||
// Generator fuel list in GeneratorFuel.class
|
||||
}
|
31
BM_src/forestry/api/fuels/GeneratorFuel.java
Normal file
31
BM_src/forestry/api/fuels/GeneratorFuel.java
Normal file
|
@ -0,0 +1,31 @@
|
|||
package forestry.api.fuels;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
|
||||
public class GeneratorFuel {
|
||||
|
||||
public static HashMap<Integer, GeneratorFuel> fuels = new HashMap<Integer, GeneratorFuel>();
|
||||
|
||||
/**
|
||||
* LiquidStack representing the fuel type and amount consumed per triggered cycle.
|
||||
*/
|
||||
public final FluidStack fuelConsumed;
|
||||
/**
|
||||
* EU emitted per tick while this fuel is being consumed in the generator (i.e. biofuel = 32, biomass = 8).
|
||||
*/
|
||||
public final int eu;
|
||||
/**
|
||||
* Rate at which the fuel is consumed. 1 - Every tick 2 - Every second tick 3 - Every third tick etc.
|
||||
*/
|
||||
public final int rate;
|
||||
|
||||
public GeneratorFuel(FluidStack fuelConsumed, int eu, int rate) {
|
||||
this.fuelConsumed = fuelConsumed;
|
||||
this.eu = eu;
|
||||
this.rate = rate;
|
||||
}
|
||||
|
||||
}
|
29
BM_src/forestry/api/fuels/MoistenerFuel.java
Normal file
29
BM_src/forestry/api/fuels/MoistenerFuel.java
Normal file
|
@ -0,0 +1,29 @@
|
|||
package forestry.api.fuels;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class MoistenerFuel {
|
||||
/**
|
||||
* The item to use
|
||||
*/
|
||||
public final ItemStack item;
|
||||
/**
|
||||
* The item that leaves the moistener's working slot (i.e. mouldy wheat, decayed wheat, mulch)
|
||||
*/
|
||||
public final ItemStack product;
|
||||
/**
|
||||
* How much this item contributes to the final product of the moistener (i.e. mycelium)
|
||||
*/
|
||||
public final int moistenerValue;
|
||||
/**
|
||||
* What stage this product represents. Resources with lower stage value will be consumed first.
|
||||
*/
|
||||
public final int stage;
|
||||
|
||||
public MoistenerFuel(ItemStack item, ItemStack product, int stage, int moistenerValue) {
|
||||
this.item = item;
|
||||
this.product = product;
|
||||
this.stage = stage;
|
||||
this.moistenerValue = moistenerValue;
|
||||
}
|
||||
}
|
35
BM_src/forestry/api/fuels/RainSubstrate.java
Normal file
35
BM_src/forestry/api/fuels/RainSubstrate.java
Normal file
|
@ -0,0 +1,35 @@
|
|||
package forestry.api.fuels;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class RainSubstrate {
|
||||
/**
|
||||
* Rain substrate capable of activating the rainmaker.
|
||||
*/
|
||||
public ItemStack item;
|
||||
/**
|
||||
* Duration of the rain shower triggered by this substrate in Minecraft ticks.
|
||||
*/
|
||||
public int duration;
|
||||
/**
|
||||
* Speed of activation sequence triggered.
|
||||
*/
|
||||
public float speed;
|
||||
|
||||
public boolean reverse;
|
||||
|
||||
public RainSubstrate(ItemStack item, int duration, float speed) {
|
||||
this(item, duration, speed, false);
|
||||
}
|
||||
|
||||
public RainSubstrate(ItemStack item, float speed) {
|
||||
this(item, 0, speed, true);
|
||||
}
|
||||
|
||||
public RainSubstrate(ItemStack item, int duration, float speed, boolean reverse) {
|
||||
this.item = item;
|
||||
this.duration = duration;
|
||||
this.speed = speed;
|
||||
this.reverse = reverse;
|
||||
}
|
||||
}
|
3
BM_src/forestry/api/fuels/package-info.java
Normal file
3
BM_src/forestry/api/fuels/package-info.java
Normal file
|
@ -0,0 +1,3 @@
|
|||
@API(apiVersion="1.0", owner="ForestryAPI|core", provides="ForestryAPI|fuels")
|
||||
package forestry.api.fuels;
|
||||
import cpw.mods.fml.common.API;
|
Loading…
Add table
Add a link
Reference in a new issue