From d9a16a734250b0b91ec8b948aa7f1ed330b62c38 Mon Sep 17 00:00:00 2001 From: Bysokar Date: Sun, 28 Jul 2019 08:07:47 +1000 Subject: [PATCH] Shuts down wind gens in space and HS --- nbproject/project.properties | 4 +++- .../common/tile/TileEntityWindGenerator.java | 10 +++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/nbproject/project.properties b/nbproject/project.properties index 332843035..8322350f3 100644 --- a/nbproject/project.properties +++ b/nbproject/project.properties @@ -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 diff --git a/src/main/java/mekanism/generators/common/tile/TileEntityWindGenerator.java b/src/main/java/mekanism/generators/common/tile/TileEntityWindGenerator.java index c3e455473..4de7f3d04 100644 --- a/src/main/java/mekanism/generators/common/tile/TileEntityWindGenerator.java +++ b/src/main/java/mekanism/generators/common/tile/TileEntityWindGenerator.java @@ -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));