This commit is contained in:
tterrag1098 committed 2015-06-21 11:29:37 -04:00
commit a72f4063ab
9 files changed
+39 -13

No files matched your search

@@ -104,6 +104,7 @@ public final class Config {
public static File configDirectory;
public static boolean useHardRecipes = false;
public static boolean addPeacefulRecipes = false;
public static boolean allowExternalTickSpeedup = true;
public static boolean useSteelInChassi = false;
@@ -586,6 +587,8 @@ public final class Config {
useHardRecipes = config.get(sectionRecipe.name, "useHardRecipes", useHardRecipes, "When enabled machines cost significantly more.")
.getBoolean(useHardRecipes);
addPeacefulRecipes = config.get(sectionRecipe.name, "addPeacefulRecipes", addPeacefulRecipes, "When enabled peaceful recipes are added for soulbinder based crafting components.")
.getBoolean(addPeacefulRecipes);
soulBinderRequiresEndermanSkull = config.getBoolean("soulBinderRequiresEndermanSkull", sectionRecipe.name, soulBinderRequiresEndermanSkull,
"When true the Soul Binder requires an Enderman Skull to craft");
allowTileEntitiesAsPaintSource = config.get(sectionRecipe.name, "allowTileEntitiesAsPaintSource", allowTileEntitiesAsPaintSource,
@@ -56,6 +56,11 @@ public class MachineRecipes {
String binder = CONDUIT_BINDER.oreDict;
String silicon = SILICON.oreDict;
if (Config.addPeacefulRecipes) {
addShaped(frankenZombie, "gdg", "dzd", "gdg", 'g', Items.gold_ingot, 'd', Items.diamond, 'z', zombieController);
addShaped(sentientEnder, "ddd", "ded", "dgd", 'g', Blocks.gold_block, 'd', Items.diamond, 'e', enderRes);
}
//stirling gen
ItemStack stirlingGen = new ItemStack(EnderIO.blockStirlingGenerator, 1, 0);
addShaped(stirlingGen, "bbb", "bfb", "gpg", 'b', Blocks.stonebrick, 'f', Blocks.furnace, 'p', Blocks.piston, 'g', basicGear);
@@ -10,6 +10,7 @@ import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.registry.GameRegistry;
public final class FarmersRegistry {
@@ -209,15 +210,18 @@ public final class FarmersRegistry {
@SuppressWarnings("unchecked")
private static void addGrowableOres() {
String mod = "B0bGrowsOre";
String[] growableOres = { "(.+)Reed", "oreGrowable(.+)" };
if (!Loader.isModLoaded(mod)) {
return;
}
Pattern[] growableOres = { Pattern.compile("(.+)Reed"), Pattern.compile("oreGrowable(.+)") };
Iterator<Block> blockIter = Block.blockRegistry.iterator();
while (blockIter.hasNext()) {
Block block = blockIter.next();
String name = Block.blockRegistry.getNameForObject(block);
if (name.startsWith(mod)) {
for (String blockName : growableOres) {
if (Pattern.compile(blockName).matcher(name).find()) {
if (name != null && name.startsWith(mod)) {
for (Pattern blockPattern : growableOres) {
if (blockPattern.matcher(name).find()) {
FarmersCommune.joinCommune(new StemFarmer(block, new ItemStack(block)));
}
}
@@ -419,11 +419,13 @@ public class TileCombustionGenerator extends AbstractGeneratorEntity implements
@Override
public FluidTank getInputTank(FluidStack forFluidType) {
if (FluidFuelRegister.instance.getCoolant(forFluidType.getFluid()) != null) {
return coolantTank;
}
if (FluidFuelRegister.instance.getFuel(forFluidType.getFluid()) != null) {
return fuelTank;
if (forFluidType != null) {
if (FluidFuelRegister.instance.getCoolant(forFluidType.getFluid()) != null) {
return coolantTank;
}
if (FluidFuelRegister.instance.getFuel(forFluidType.getFluid()) != null) {
return fuelTank;
}
}
return null;
}
@@ -44,7 +44,7 @@ public enum Alloy {
}
public ItemStack getStackBlock() {
return getStackIngot(1);
return getStackBlock(1);
}
public ItemStack getStackBlock(int size) {
@@ -93,7 +93,7 @@ public class MaterialRecipes {
ItemStack capacitor = new ItemStack(itemBasicCapacitor, 1, 0);
//Conduit Binder
ItemStack cbc = CONDUIT_BINDER.getStack(8);
ItemStack cbc = BINDER_COMPOSITE.getStack(8);
if (Config.useAlternateBinderRecipe) {
addShaped(cbc, "gcg", "sgs", "gcg", 'g', Blocks.gravel, 's', Blocks.sand, 'c', Items.clay_ball);
} else {
@@ -346,6 +346,9 @@ public class TileTelePad extends TileTravelAnchor implements IInternalPowerRecei
int distance = new BlockCoord(this).distance(target);
double base = Math.log((0.005 * distance) + 1);
this.maxPower = (int) (base * Config.telepadPowerCoefficient);
if (this.maxPower <= 0) {
this.maxPower = 1;
}
} else {
this.maxPower = Config.telepadPowerInterdimensional;
}
@@ -523,7 +526,7 @@ public class TileTelePad extends TileTravelAnchor implements IInternalPowerRecei
this.target = coords;
this.coordsChanged = true;
} else {
this.master.setCoords(coords);
this.master.setCoords_internal(coords);
}
}
}
+2 -1
View File
@@ -250,7 +250,8 @@ public class FluidUtil {
if (source != null && source.getItem() != null) {
if (source.getItem() instanceof IFluidContainerItem) {
IFluidTank targetTank = tank.getInputTank(((IFluidContainerItem) source.getItem()).getFluid(source));
FluidStack fluid = ((IFluidContainerItem) source.getItem()).getFluid(source);
IFluidTank targetTank = fluid != null ? tank.getInputTank(fluid) : null;
if (targetTank != null) {
FluidStack target = targetTank.getFluid();
int maxDrain = targetTank.getCapacity() - (target != null ? target.amount : 0);