Skip to content

Commit 8f945f7

Browse files
authored
Merge pull request #1026 from dmzz-yyhyy/wrong_event_name_fix
修正错拼unload为load
2 parents 3b99e7d + 10ce4c1 commit 8f945f7

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

common/src/main/java/dev/dubhe/anvilcraft/api/chargecollector/ChargeCollectorManager.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
import org.joml.Vector3f;
1717

1818
public class ChargeCollectorManager {
19-
private final Map<BlockPos, ChargeCollectorBlockEntity> chargeCollectors = new HashMap<>();
2019
private static final Map<Level, ChargeCollectorManager> INSTANCES = new HashMap<>();
20+
private final Map<BlockPos, ChargeCollectorBlockEntity> chargeCollectors = new HashMap<>();
2121
@Getter
2222
private final Level level;
2323

@@ -89,6 +89,5 @@ public Entry(Double distance, ChargeCollectorBlockEntity blockEntity) {
8989
this.distance = distance;
9090
this.blockEntity = blockEntity;
9191
}
92-
9392
}
9493
}

common/src/main/java/dev/dubhe/anvilcraft/event/ServerBlockEntityEventListener.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import dev.dubhe.anvilcraft.api.chargecollector.ChargeCollectorManager;
55
import dev.dubhe.anvilcraft.api.chargecollector.HeatedBlockRecorder;
66
import dev.dubhe.anvilcraft.api.event.server.block.ServerBlockEntityLoadEvent;
7+
import dev.dubhe.anvilcraft.api.event.server.block.ServerBlockEntityUnloadEvent;
78
import dev.dubhe.anvilcraft.api.power.IPowerComponent;
89
import dev.dubhe.anvilcraft.api.power.PowerGrid;
910
import dev.dubhe.anvilcraft.api.world.load.LevelLoadManager;
@@ -32,7 +33,7 @@ public void onLoad(ServerBlockEntityLoadEvent event) {
3233
*/
3334
@SuppressWarnings("unused")
3435
@SubscribeEvent
35-
public void onUnload(ServerBlockEntityLoadEvent event) {
36+
public void onUnload(ServerBlockEntityUnloadEvent event) {
3637
if (event.getBlockEntity() instanceof IPowerComponent component) {
3738
PowerGrid.removeComponent(component);
3839
}

0 commit comments

Comments
 (0)