Shuts down wind gens in space and HS

This commit is contained in:
Bysokar 2019-07-28 08:07:47 +10:00
parent 9e0f71dae4
commit d9a16a7342
2 changed files with 12 additions and 2 deletions

View file

@ -29,10 +29,12 @@ dist.javadoc.dir=${dist.dir}/javadoc
excludes=
file.reference.api-java=src/api/java
file.reference.main-java=src/main/java
file.reference.RPCore-2.0.7.jar=C:\\Users\\draks\\Documents\\GitHub\\StargateMC\\common\\mods\\RPCore-2.0.7.jar
includes=**
jar.compress=false
java.dir=${file.reference.main-java}
javac.classpath=
javac.classpath=\
${file.reference.RPCore-2.0.7.jar}
# Space-separated list of extra javac options
javac.compilerargs=
javac.deprecation=false

View file

@ -1,5 +1,6 @@
package mekanism.generators.common.tile;
import buildcraft.api.core.Position;
import io.netty.buffer.ByteBuf;
import java.util.ArrayList;
@ -13,6 +14,9 @@ import net.minecraft.item.ItemStack;
import net.minecraftforge.common.util.ForgeDirection;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import rpcore.api.DimensionAPI;
import rpcore.constants.CelestialType;
import rpcore.module.dimension.ForgeDimension;
public class TileEntityWindGenerator extends TileEntityGenerator implements IBoundingBlock
{
@ -40,7 +44,11 @@ public class TileEntityWindGenerator extends TileEntityGenerator implements IBou
{
setActive((currentMultiplier = getMultiplier()) > 0);
}
ForgeDimension dim = ((ForgeDimension)DimensionAPI.getForgeDimension(this.worldObj.provider.dimensionId));
if (dim != null && (dim.getType().equals(CelestialType.System) || dim.getType().equals(CelestialType.Cluster)) && getActive()) {
setActive(false);
}
if(getActive())
{
setEnergy(electricityStored + (generators.windGenerationMin*currentMultiplier));