-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: don't listen to
ClientPlayerNetworkEvent
on server
- Loading branch information
1 parent
5237433
commit 7fbda9b
Showing
5 changed files
with
32 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
src/main/kotlin/settingdust/item_converter/client/ClientEntrypoint.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package settingdust.item_converter.client | ||
|
||
import net.minecraftforge.client.event.ClientPlayerNetworkEvent | ||
import net.minecraftforge.eventbus.api.SubscribeEvent | ||
import settingdust.item_converter.ClientConfig | ||
import settingdust.item_converter.ItemConverter.refreshGraph | ||
import thedarkcolour.kotlinforforge.forge.FORGE_BUS | ||
|
||
object ItemConverterClient { | ||
init { | ||
SlotInteractManager | ||
ClientConfig.Companion.reload() | ||
FORGE_BUS.register(this) | ||
} | ||
|
||
@SubscribeEvent | ||
fun onClientPlayerNetwork(event: ClientPlayerNetworkEvent.LoggingIn) { | ||
refreshGraph(event.player.level.registryAccess()) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters