Skip to content

Commit

Permalink
Merge pull request #1026 from dmzz-yyhyy/wrong_event_name_fix
Browse files Browse the repository at this point in the history
修正错拼unload为load
  • Loading branch information
Gu-ZT authored Jul 9, 2024
2 parents 3b99e7d + 10ce4c1 commit 8f945f7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
import org.joml.Vector3f;

public class ChargeCollectorManager {
private final Map<BlockPos, ChargeCollectorBlockEntity> chargeCollectors = new HashMap<>();
private static final Map<Level, ChargeCollectorManager> INSTANCES = new HashMap<>();
private final Map<BlockPos, ChargeCollectorBlockEntity> chargeCollectors = new HashMap<>();
@Getter
private final Level level;

Expand Down Expand Up @@ -89,6 +89,5 @@ public Entry(Double distance, ChargeCollectorBlockEntity blockEntity) {
this.distance = distance;
this.blockEntity = blockEntity;
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import dev.dubhe.anvilcraft.api.chargecollector.ChargeCollectorManager;
import dev.dubhe.anvilcraft.api.chargecollector.HeatedBlockRecorder;
import dev.dubhe.anvilcraft.api.event.server.block.ServerBlockEntityLoadEvent;
import dev.dubhe.anvilcraft.api.event.server.block.ServerBlockEntityUnloadEvent;
import dev.dubhe.anvilcraft.api.power.IPowerComponent;
import dev.dubhe.anvilcraft.api.power.PowerGrid;
import dev.dubhe.anvilcraft.api.world.load.LevelLoadManager;
Expand Down Expand Up @@ -32,7 +33,7 @@ public void onLoad(ServerBlockEntityLoadEvent event) {
*/
@SuppressWarnings("unused")
@SubscribeEvent
public void onUnload(ServerBlockEntityLoadEvent event) {
public void onUnload(ServerBlockEntityUnloadEvent event) {
if (event.getBlockEntity() instanceof IPowerComponent component) {
PowerGrid.removeComponent(component);
}
Expand Down

0 comments on commit 8f945f7

Please sign in to comment.