-
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
5181fe7
commit 3ddb4f6
Showing
6 changed files
with
23 additions
and
20 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,16 @@ | ||
package com.liamxsage.shaderapi | ||
|
||
import net.minecraft.util.Identifier | ||
import org.slf4j.Logger | ||
import org.slf4j.LoggerFactory | ||
|
||
object Constants { | ||
@JvmStatic | ||
val REQUEST_SHADER_PACKET_ID: Identifier = Identifier.of("shaderapi", "request_shader_url") | ||
|
||
@JvmStatic | ||
val RECEIVE_SHADER_PACKET_ID: Identifier = Identifier.of("shaderapi", "receive_shader_url") | ||
|
||
@JvmStatic | ||
val logger: Logger = LoggerFactory.getLogger(Shaderapi::class.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,18 +1,18 @@ | ||
package com.liamxsage.shaderapi | ||
|
||
import com.liamxsage.klassicx.extensions.getLogger | ||
import com.liamxsage.shaderapi.Constants.logger | ||
import net.fabricmc.api.ModInitializer | ||
import net.fabricmc.fabric.api.networking.v1.PayloadTypeRegistry | ||
|
||
|
||
class Shaderapi : ModInitializer { | ||
|
||
override fun onInitialize() { | ||
getLogger().info("Initializing ShaderAPI") | ||
logger.info("Initializing ShaderAPI") | ||
|
||
PayloadTypeRegistry.playC2S().register(ShaderRequestPayload.ID, ShaderRequestPayload.CODEC) | ||
PayloadTypeRegistry.playS2C().register(ShaderReceivePayload.ID, ShaderReceivePayload.CODEC) | ||
|
||
getLogger().info("ShaderAPI initialized") | ||
logger.info("ShaderAPI initialized") | ||
} | ||
} |