Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: makes solar panels generate less energy when more of it is covered (inverted multiplier equation) #358

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public void tickConstant(@NotNull ServerLevel world, @NotNull BlockPos pos, @Not
if (this.blocked >= 9) return GCMachineStatuses.BLOCKED;
if (this.energyStorage().isFull()) return MachineStatuses.CAPACITOR_FULL;
MachineStatus status = null;
double multiplier = blocked == 0 ? 1 : this.blocked / 9.0;
double multiplier = blocked == 0 ? 1 : (9.0 - this.blocked) / 9.0;
if (this.blocked > 1) status = GCMachineStatuses.PARTIALLY_BLOCKED;
if (level.isRaining() || level.isThundering()) {
if (status == null) status = GCMachineStatuses.RAIN;
Expand Down