mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-28 07:36:01 +00:00
Fix various height checks for the different solar devices
This commit is contained in:
3 files changed
+11
-2
No files matched your search
@@ -89,7 +89,7 @@ public class TileEntitySolarNeutronActivator extends TileEntityContainerBlock im
|
||||
// changing this would dramatically affect a lot of setups with Fusion reactors which can take
|
||||
// a long time to relight. I don't want to be chased by a mob right now, so just doing basic
|
||||
// rain checks.
|
||||
boolean seesSun = world.isDaytime() && world.canSeeSky(getPos().up(4)) && !world.provider.isNether();
|
||||
boolean seesSun = world.isDaytime() && world.canSeeSky(getPos().up()) && !world.provider.isNether();
|
||||
if (needsRainCheck) {
|
||||
seesSun &= !(world.isRaining() || world.isThundering());
|
||||
}
|
||||
|
||||
@@ -61,4 +61,9 @@ public class TileEntityAdvancedSolarGenerator extends TileEntitySolarGenerator i
|
||||
}
|
||||
return super.getCapability(capability, side);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean canSeeSky() {
|
||||
return world.canSeeSky(getPos().up(3));
|
||||
}
|
||||
}
|
||||
@@ -74,7 +74,7 @@ public class TileEntitySolarGenerator extends TileEntityGenerator {
|
||||
// Sort out if the generator can see the sun; we no longer check if it's raining here,
|
||||
// since under the new rules, we can still generate power when it's raining, albeit at a
|
||||
// significant penalty.
|
||||
seesSun = world.isDaytime() && world.canSeeSky(getPos().up(4)) && !world.provider.isNether();
|
||||
seesSun = world.isDaytime() && canSeeSky() && !world.provider.isNether();
|
||||
|
||||
if (canOperate()) {
|
||||
setActive(true);
|
||||
@@ -85,6 +85,10 @@ public class TileEntitySolarGenerator extends TileEntityGenerator {
|
||||
}
|
||||
}
|
||||
|
||||
protected boolean canSeeSky() {
|
||||
return world.canSeeSky(getPos());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canExtractItem(int slotID, @Nonnull ItemStack itemstack, @Nonnull EnumFacing side) {
|
||||
if (slotID == 0) {
|
||||
|
||||
Reference in new issue
Block a user