-
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.
- Loading branch information
1 parent
993e915
commit e173976
Showing
13 changed files
with
144 additions
and
198 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
plugins { | ||
id 'fabric-loom' version '1.5.7' | ||
id 'fabric-loom' version '1.6.5' | ||
id 'maven-publish' | ||
} | ||
|
||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip | ||
networkTimeout=10000 | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
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
15 changes: 11 additions & 4 deletions
15
src/main/java/yancey/openparticle/core/client/OpenParticleClient.java
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 |
---|---|---|
@@ -1,15 +1,22 @@ | ||
package yancey.openparticle.core.client; | ||
|
||
import net.fabricmc.api.ClientModInitializer; | ||
import net.fabricmc.fabric.api.client.networking.v1.ClientPlayNetworking; | ||
import net.fabricmc.fabric.api.networking.v1.PayloadTypeRegistry; | ||
import yancey.openparticle.core.core.OpenParticleCore; | ||
import yancey.openparticle.core.keys.KeyboardManager; | ||
import yancey.openparticle.core.network.NetworkHandler; | ||
import yancey.openparticle.core.network.RunTickPayloadS2C; | ||
|
||
public class OpenParticleClient implements ClientModInitializer { | ||
@Override | ||
public void onInitializeClient() { | ||
NetworkHandler.initClient(); | ||
PayloadTypeRegistry.playS2C().register(RunTickPayloadS2C.ID, RunTickPayloadS2C.CODEC); | ||
ClientPlayNetworking.registerGlobalReceiver(RunTickPayloadS2C.ID, (payload, context) -> { | ||
if (context.player().getWorld() == null) { | ||
return; | ||
} | ||
OpenParticleCore.runTick(payload.path(), payload.tick()); | ||
}); | ||
KeyboardManager.init(true); | ||
// ClientCommandRegistrationCallback.EVENT.register((dispatcher, registryAccess) -> | ||
// CommandPar.init(dispatcher, false)); | ||
} | ||
} |
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
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
Oops, something went wrong.