Skip to content

Commit

Permalink
fix: 太阳能发电机能源显示
Browse files Browse the repository at this point in the history
  • Loading branch information
ybw0014 committed Oct 29, 2024
1 parent bfe0a32 commit 3f3f1b9
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package io.github.schntgaispock.slimehud.waila;

import com.xzavier0722.mc.plugin.slimefun4.storage.controller.SlimefunBlockData;
import io.github.schntgaispock.slimehud.SlimeHUD;
import io.github.schntgaispock.slimehud.util.HudBuilder;
import io.github.schntgaispock.slimehud.util.Util;
Expand Down Expand Up @@ -151,7 +152,7 @@ private String processSolarGenerator(@Nonnull HudRequest request) {

SolarGenerator gen = (SolarGenerator) request.getSlimefunItem();
// Solar Generators dont use any fuel, so it's ok to call getGeneratedOutput
int generation = gen.getGeneratedOutput(request.getLocation(), null);
int generation = gen.getGeneratedOutput(request.getLocation(), (SlimefunBlockData) null);
if (generation > 0) {
hudText.append(HudBuilder.formatEnergyGenerated(generation));
} else {
Expand Down

0 comments on commit 3f3f1b9

Please sign in to comment.