Config for blocks below crops

This commit is contained in:
Blood-Asp 2017-03-31 21:19:04 +02:00
parent 32a21a0ac1
commit f030951982
4 changed files with 7 additions and 2 deletions

View file

@ -259,6 +259,7 @@ public class GT_Mod implements IGT_Mod {
gregtechproxy.mLowGravProcessing = Loader.isModLoaded(GT_Values.MOD_ID_GC_CORE) && tMainConfig.get("general", "LowGravProcessing", true).getBoolean(true);
LocalDate tDate = new Date().toInstant().atZone(ZoneId.systemDefault()).toLocalDate();
gregtechproxy.mAprilFool = GregTech_API.sSpecialFile.get(ConfigCategories.general, "AprilFool", tDate.getMonthValue()==4 && tDate.getDayOfMonth() == 1);
gregtechproxy.mCropNeedBlock = tMainConfig.get("general", "CropNeedBlockBelow", true).getBoolean(true);
GregTech_API.mOutputRF = GregTech_API.sOPStuff.get(ConfigCategories.general, "OutputRF", true);
GregTech_API.mInputRF = GregTech_API.sOPStuff.get(ConfigCategories.general, "InputRF", false);

View file

@ -1,6 +1,7 @@
package gregtech.api.util;
import cpw.mods.fml.common.Loader;
import gregtech.GT_Mod;
import gregtech.api.GregTech_API;
import gregtech.api.enums.ConfigCategories;
import gregtech.api.enums.Materials;
@ -135,7 +136,7 @@ public class GT_BaseCrop extends CropCard implements ICropCardInfo {
@Override
public final boolean canGrow(ICropTile aCrop) {
if (mBlock != null && aCrop.getSize() == mMaxSize - 1) {
if (GT_Mod.gregtechproxy.mCropNeedBlock && mBlock != null && aCrop.getSize() == mMaxSize - 1) {
return isBlockBelow(aCrop);
}
return aCrop.getSize() < maxSize();

View file

@ -195,6 +195,7 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler {
public boolean mAddGTRecipesToIC2Machines = true;
public boolean mLowGravProcessing = false;
public boolean mAprilFool = false;
public boolean mCropNeedBlock = true;
public GT_Proxy() {
GameRegistry.registerFuelHandler(this);

View file

@ -116,8 +116,10 @@ public class GT_Worldgenerator
int tDimensionType = this.mWorld.provider.dimensionId;
String tDimensionName = this.mWorld.provider.getDimensionName();
Random aRandom = new Random();
System.out.println("try asteroid gen");
if (((tDimensionType == 1) && endAsteroids && ((mEndAsteroidProbability <= 1) || (aRandom.nextInt(mEndAsteroidProbability) == 0))) || ((tDimensionName.equals("Asteroids")) && gcAsteroids && ((mGCAsteroidProbability <= 1) || (aRandom.nextInt(mGCAsteroidProbability) == 0)))) {
short primaryMeta = 0;
System.out.println("do asteroid gen: "+this.mX+" "+this.mZ);
short primaryMeta = 0;
short secondaryMeta = 0;
short betweenMeta = 0;
short sporadicMeta = 0;