-
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
Showing
11 changed files
with
115 additions
and
12 deletions.
There are no files selected for viewing
Binary file not shown.
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
18 changes: 16 additions & 2 deletions
18
src/client/java/com/ztrolix/zlibs/mixin/client/ExampleClientMixin.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,29 @@ | ||
package com.ztrolix.zlibs.mixin.client; | ||
|
||
import me.shedaniel.autoconfig.AutoConfig; | ||
import net.minecraft.client.MinecraftClient; | ||
import org.slf4j.Logger; | ||
import org.slf4j.LoggerFactory; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.Unique; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
import org.spongepowered.asm.mixin.injection.Inject; | ||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; | ||
import com.ztrolix.zlibs.config.ZLibsConfig; | ||
|
||
@Mixin(MinecraftClient.class) | ||
public class ExampleClientMixin { | ||
@Inject(at = @At("HEAD"), method = "run") | ||
private void init(CallbackInfo info) { | ||
@Unique | ||
ZLibsConfig config = AutoConfig.getConfigHolder(ZLibsConfig.class).getConfig(); | ||
@Unique | ||
Logger LOGGER = LoggerFactory.getLogger("ztrolix-libs"); | ||
|
||
@Inject(at = @At("HEAD"), method = "joinWorld") | ||
private void init(CallbackInfo info) { | ||
//if (config.injectToWorld) { | ||
// LOGGER.info("-----------------------------------"); | ||
// LOGGER.info("ZtrolixLibs - Injected to World!"); | ||
// LOGGER.info("-----------------------------------"); | ||
//} | ||
} | ||
} |
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,11 @@ | ||
package com.ztrolix.zlibs; | ||
|
||
import net.minecraft.util.Identifier; | ||
|
||
public class ModNetworkHandler { | ||
public static final Identifier CONFIG_SYNC_PACKET = Identifier.of(ZtrolixLibs.MOD_ID, "config_sync"); | ||
|
||
public static void registerServer() { | ||
|
||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"text.autoconfig.ztrolix-libs.option.modEnabled": "Enable Mod", | ||
"text.autoconfig.ztrolix-libs.option.injectToWorld": "Inject To World", | ||
"text.autoconfig.ztrolix-libs.option.contributeToPlayerCount": "Contribute To Player Count", | ||
"text.autoconfig.ztrolix-libs.title": "Ztrolix Libs", | ||
"itemGroup.ztrolix-libs.example_group": "Ztrolix Libs", | ||
"item.ztrolix-libs.example_item": "ZLibs Item" | ||
} |
44 changes: 44 additions & 0 deletions
44
src/main/resources/assets/ztrolix-libs/models/item/example_item.json
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,44 @@ | ||
{ | ||
"credit": "Ztrolix", | ||
"textures": { | ||
"0": "ztrolix-libs:item/example_item", | ||
"particle": "ztrolix-libs:item/example_item" | ||
}, | ||
"elements": [ | ||
{ | ||
"name": "model", | ||
"from": [15, 0, -10], | ||
"to": [16, 16, 6], | ||
"rotation": {"angle": 0, "axis": "y", "origin": [0, 0, -2]}, | ||
"faces": { | ||
"north": {"uv": [0, 0, 1, 16], "texture": "#0"}, | ||
"east": {"uv": [0, 0, 16, 16], "texture": "#0"}, | ||
"south": {"uv": [0, 0, 1, 16], "texture": "#0"}, | ||
"west": {"uv": [0, 0, 16, 16], "texture": "#0"}, | ||
"up": {"uv": [0, 0, 16, 1], "rotation": 270, "texture": "#0"}, | ||
"down": {"uv": [0, 0, 16, 1], "rotation": 90, "texture": "#0"} | ||
} | ||
}, | ||
{ | ||
"name": "item", | ||
"from": [0, 0, 32], | ||
"to": [16, 16, 32], | ||
"rotation": {"angle": 0, "axis": "y", "origin": [0, 0, 30]}, | ||
"faces": { | ||
"north": {"uv": [0, 0, 16, 16], "texture": "#0"}, | ||
"east": {"uv": [0, 0, 0, 16], "texture": "#0"}, | ||
"south": {"uv": [0, 0, 16, 16], "texture": "#0"}, | ||
"west": {"uv": [0, 0, 0, 16], "texture": "#0"}, | ||
"up": {"uv": [0, 0, 16, 0], "texture": "#0"}, | ||
"down": {"uv": [0, 0, 16, 0], "texture": "#0"} | ||
} | ||
} | ||
], | ||
"display": { | ||
"thirdperson_righthand": { | ||
"rotation": [0.5, 0, 0], | ||
"translation": [-7.25, -2.5, 2.75], | ||
"scale": [1, 0.49414, 0.4668] | ||
} | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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