Skip to content

Commit

Permalink
fix solar panels not outputting to cables (GregTechCEu#2416)
Browse files Browse the repository at this point in the history
  • Loading branch information
TechLord22 authored Mar 16, 2024
1 parent e85169e commit fea6440
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/main/java/gregtech/common/covers/CoverSolarPanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
import net.minecraft.util.BlockRenderLayer;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.ITickable;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
Expand Down Expand Up @@ -50,10 +49,9 @@ public void renderCover(@NotNull CCRenderState renderState, @NotNull Matrix4 tra
public void update() {
CoverableView coverable = getCoverableView();
World world = coverable.getWorld();
BlockPos blockPos = coverable.getPos();
if (GTUtility.canSeeSunClearly(world, blockPos)) {
if (GTUtility.canSeeSunClearly(world, coverable.getPos())) {
IEnergyContainer energyContainer = coverable.getCapability(GregtechCapabilities.CAPABILITY_ENERGY_CONTAINER,
null);
getAttachedSide());
if (energyContainer != null) {
energyContainer.acceptEnergyFromNetwork(null, EUt, 1);
}
Expand Down

0 comments on commit fea6440

Please sign in to comment.