simple .obj cosmetics example
This commit is contained in:
@@ -10,9 +10,24 @@ repositories {}
|
|||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
minecraft "com.mojang:minecraft:${project.minecraft_version}"
|
minecraft "com.mojang:minecraft:${project.minecraft_version}"
|
||||||
|
|
||||||
|
// Switch back to Yarn
|
||||||
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
|
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
|
||||||
|
|
||||||
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
|
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
|
||||||
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
|
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
|
||||||
|
|
||||||
|
modApi "dev.felnull:special-model-loader:1.4.0+pre.1"
|
||||||
|
include "dev.felnull:special-model-loader:1.4.0+pre.1"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
maven { url "https://maven.parchmentmc.org" }
|
||||||
|
maven {
|
||||||
|
name = "FelNull Maven"
|
||||||
|
url = "https://maven.felnull.dev"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
processResources {
|
processResources {
|
||||||
|
|||||||
@@ -16,6 +16,8 @@ import org.saturnclient.saturnmods.ModManager;
|
|||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
import dev.felnull.specialmodelloader.api.event.SpecialModelLoaderEvents;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Main class for the Saturn Client mod.
|
* Main class for the Saturn Client mod.
|
||||||
*/
|
*/
|
||||||
@@ -32,11 +34,16 @@ public class SaturnClient implements ModInitializer {
|
|||||||
|
|
||||||
ClientLifecycleEvents.CLIENT_STOPPING.register(_o -> ConfigManager.save());
|
ClientLifecycleEvents.CLIENT_STOPPING.register(_o -> ConfigManager.save());
|
||||||
ScreenEvents.BEFORE_INIT.register((client, screen, scaledWidth, scaledHeight) -> {
|
ScreenEvents.BEFORE_INIT.register((client, screen, scaledWidth, scaledHeight) -> {
|
||||||
if (SaturnClientConfig.saturnTitleScreen.value && screen instanceof TitleScreen && !(screen instanceof SaturnMenu)) {
|
if (SaturnClientConfig.saturnTitleScreen.value && screen instanceof TitleScreen
|
||||||
|
&& !(screen instanceof SaturnMenu)) {
|
||||||
client.setScreen(new SaturnTitleScreen());
|
client.setScreen(new SaturnTitleScreen());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
SpecialModelLoaderEvents.LOAD_SCOPE.register(() -> {
|
||||||
|
return (resourceManager, location) -> MOD_ID.equals(location.getNamespace());
|
||||||
|
});
|
||||||
|
|
||||||
KeyInputHandler.register();
|
KeyInputHandler.register();
|
||||||
if (SaturnSocket.authenticate()) {
|
if (SaturnSocket.authenticate()) {
|
||||||
Cloaks.initialize();
|
Cloaks.initialize();
|
||||||
|
|||||||
@@ -42,8 +42,6 @@ public class HatFeatureRenderer extends FeatureRenderer<PlayerEntityRenderState,
|
|||||||
matrices.multiply(net.minecraft.util.math.RotationAxis.POSITIVE_X.rotationDegrees(180.0f));
|
matrices.multiply(net.minecraft.util.math.RotationAxis.POSITIVE_X.rotationDegrees(180.0f));
|
||||||
matrices.multiply(net.minecraft.util.math.RotationAxis.POSITIVE_Y.rotationDegrees(180.0f));
|
matrices.multiply(net.minecraft.util.math.RotationAxis.POSITIVE_Y.rotationDegrees(180.0f));
|
||||||
|
|
||||||
matrices.translate(0.0f, 0.5f, 0.0f);
|
|
||||||
|
|
||||||
ItemStack customHat = new ItemStack(Items.STICK);
|
ItemStack customHat = new ItemStack(Items.STICK);
|
||||||
customHat.set(DataComponentTypes.ITEM_MODEL,
|
customHat.set(DataComponentTypes.ITEM_MODEL,
|
||||||
Identifier.of("saturnclient:hat_" + player.hat));
|
Identifier.of("saturnclient:hat_" + player.hat));
|
||||||
@@ -54,7 +52,7 @@ public class HatFeatureRenderer extends FeatureRenderer<PlayerEntityRenderState,
|
|||||||
|
|
||||||
itemRenderer.renderItem(
|
itemRenderer.renderItem(
|
||||||
customHat,
|
customHat,
|
||||||
ModelTransformationMode.HEAD,
|
ModelTransformationMode.THIRD_PERSON_RIGHT_HAND,
|
||||||
light,
|
light,
|
||||||
OverlayTexture.DEFAULT_UV,
|
OverlayTexture.DEFAULT_UV,
|
||||||
matrices,
|
matrices,
|
||||||
|
|||||||
@@ -1,240 +1,12 @@
|
|||||||
{
|
{
|
||||||
"credit": "Made with Blockbench",
|
"parent": "special-model-loader:builtin/obj",
|
||||||
"textures": {
|
"flip_v": true,
|
||||||
"1": "saturnclient:item/halo"
|
"model": "saturnclient:models/item/obj_model_item.obj",
|
||||||
},
|
"display": {
|
||||||
"elements": [
|
"thirdperson_righthand": {
|
||||||
{
|
"rotation": [ 0, 0, 0 ],
|
||||||
"name": "hexadecagon",
|
"translation": [ 0, 9.5, 0],
|
||||||
"from": [7.40326, 10, 5],
|
"scale": [ 0.375, 0.375, 0.375 ]
|
||||||
"to": [8.59674, 11, 6],
|
|
||||||
"rotation": { "angle": -45, "axis": "y", "origin": [8, 11, 8] },
|
|
||||||
"faces": {
|
|
||||||
"north": { "uv": [0, 0, 1, 1], "texture": "#1" },
|
|
||||||
"east": { "uv": [0, 0, 1, 1], "texture": "#1" },
|
|
||||||
"south": { "uv": [0, 0, 1, 1], "texture": "#1" },
|
|
||||||
"west": { "uv": [0, 0, 1, 1], "texture": "#1" },
|
|
||||||
"up": { "uv": [0, 0, 1, 1], "texture": "#1" },
|
|
||||||
"down": { "uv": [0, 0, 1, 1], "texture": "#1" }
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "hexadecagon",
|
|
||||||
"from": [7.40326, 10, 5],
|
|
||||||
"to": [8.59674, 11, 6],
|
|
||||||
"rotation": { "angle": -22.5, "axis": "y", "origin": [8, 11, 8] },
|
|
||||||
"faces": {
|
|
||||||
"north": { "uv": [0, 0, 1, 1], "texture": "#1" },
|
|
||||||
"east": { "uv": [0, 0, 1, 1], "texture": "#1" },
|
|
||||||
"south": { "uv": [0, 0, 1, 1], "texture": "#1" },
|
|
||||||
"west": { "uv": [0, 0, 1, 1], "texture": "#1" },
|
|
||||||
"up": { "uv": [0, 0, 1, 1], "texture": "#1" },
|
|
||||||
"down": { "uv": [0, 0, 1, 1], "texture": "#1" }
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "hexadecagon",
|
|
||||||
"from": [7.40326, 10, 5],
|
|
||||||
"to": [8.59674, 11, 6],
|
|
||||||
"rotation": { "angle": 0, "axis": "y", "origin": [8, 11, 8] },
|
|
||||||
"faces": {
|
|
||||||
"north": { "uv": [0, 0, 1, 1], "texture": "#1" },
|
|
||||||
"east": { "uv": [0, 0, 1, 1], "texture": "#1" },
|
|
||||||
"south": { "uv": [0, 0, 1, 1], "texture": "#1" },
|
|
||||||
"west": { "uv": [0, 0, 1, 1], "texture": "#1" },
|
|
||||||
"up": { "uv": [0, 0, 1, 1], "texture": "#1" },
|
|
||||||
"down": { "uv": [0, 0, 1, 1], "texture": "#1" }
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "hexadecagon",
|
|
||||||
"from": [7.40326, 10, 5],
|
|
||||||
"to": [8.59674, 11, 6],
|
|
||||||
"rotation": { "angle": 22.5, "axis": "y", "origin": [8, 11, 8] },
|
|
||||||
"faces": {
|
|
||||||
"north": { "uv": [0, 0, 1, 1], "texture": "#1" },
|
|
||||||
"east": { "uv": [0, 0, 1, 1], "texture": "#1" },
|
|
||||||
"south": { "uv": [0, 0, 1, 1], "texture": "#1" },
|
|
||||||
"west": { "uv": [0, 0, 1, 1], "texture": "#1" },
|
|
||||||
"up": { "uv": [0, 0, 1, 1], "texture": "#1" },
|
|
||||||
"down": { "uv": [0, 0, 1, 1], "texture": "#1" }
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "hexadecagon",
|
|
||||||
"from": [7.40326, 10, 5],
|
|
||||||
"to": [8.59674, 11, 6],
|
|
||||||
"rotation": { "angle": 45, "axis": "y", "origin": [8, 11, 8] },
|
|
||||||
"faces": {
|
|
||||||
"north": { "uv": [0, 0, 1, 1], "texture": "#1" },
|
|
||||||
"east": { "uv": [0, 0, 1, 1], "texture": "#1" },
|
|
||||||
"south": { "uv": [0, 0, 1, 1], "texture": "#1" },
|
|
||||||
"west": { "uv": [0, 0, 1, 1], "texture": "#1" },
|
|
||||||
"up": { "uv": [0, 0, 1, 1], "texture": "#1" },
|
|
||||||
"down": { "uv": [0, 0, 1, 1], "texture": "#1" }
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "hexadecagon",
|
|
||||||
"from": [7.40326, 10, 10],
|
|
||||||
"to": [8.59674, 11, 11],
|
|
||||||
"rotation": { "angle": -45, "axis": "y", "origin": [8, 11, 8] },
|
|
||||||
"faces": {
|
|
||||||
"north": { "uv": [0, 0, 1, 1], "texture": "#1" },
|
|
||||||
"east": { "uv": [0, 0, 1, 1], "texture": "#1" },
|
|
||||||
"south": { "uv": [0, 0, 1, 1], "texture": "#1" },
|
|
||||||
"west": { "uv": [0, 0, 1, 1], "texture": "#1" },
|
|
||||||
"up": { "uv": [0, 0, 1, 1], "texture": "#1" },
|
|
||||||
"down": { "uv": [0, 0, 1, 1], "texture": "#1" }
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "hexadecagon",
|
|
||||||
"from": [7.40326, 10, 10],
|
|
||||||
"to": [8.59674, 11, 11],
|
|
||||||
"rotation": { "angle": -22.5, "axis": "y", "origin": [8, 11, 8] },
|
|
||||||
"faces": {
|
|
||||||
"north": { "uv": [0, 0, 1, 1], "texture": "#1" },
|
|
||||||
"east": { "uv": [0, 0, 1, 1], "texture": "#1" },
|
|
||||||
"south": { "uv": [0, 0, 1, 1], "texture": "#1" },
|
|
||||||
"west": { "uv": [0, 0, 1, 1], "texture": "#1" },
|
|
||||||
"up": { "uv": [0, 0, 1, 1], "texture": "#1" },
|
|
||||||
"down": { "uv": [0, 0, 1, 1], "texture": "#1" }
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "hexadecagon",
|
|
||||||
"from": [7.40326, 10, 10],
|
|
||||||
"to": [8.59674, 11, 11],
|
|
||||||
"rotation": { "angle": 0, "axis": "y", "origin": [8, 11, 8] },
|
|
||||||
"faces": {
|
|
||||||
"north": { "uv": [0, 0, 1, 1], "texture": "#1" },
|
|
||||||
"east": { "uv": [0, 0, 1, 1], "texture": "#1" },
|
|
||||||
"south": { "uv": [0, 0, 1, 1], "texture": "#1" },
|
|
||||||
"west": { "uv": [0, 0, 1, 1], "texture": "#1" },
|
|
||||||
"up": { "uv": [0, 0, 1, 1], "texture": "#1" },
|
|
||||||
"down": { "uv": [0, 0, 1, 1], "texture": "#1" }
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "hexadecagon",
|
|
||||||
"from": [7.40326, 10, 10],
|
|
||||||
"to": [8.59674, 11, 11],
|
|
||||||
"rotation": { "angle": 22.5, "axis": "y", "origin": [8, 11, 8] },
|
|
||||||
"faces": {
|
|
||||||
"north": { "uv": [0, 0, 1, 1], "texture": "#1" },
|
|
||||||
"east": { "uv": [0, 0, 1, 1], "texture": "#1" },
|
|
||||||
"south": { "uv": [0, 0, 1, 1], "texture": "#1" },
|
|
||||||
"west": { "uv": [0, 0, 1, 1], "texture": "#1" },
|
|
||||||
"up": { "uv": [0, 0, 1, 1], "texture": "#1" },
|
|
||||||
"down": { "uv": [0, 0, 1, 1], "texture": "#1" }
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "hexadecagon",
|
|
||||||
"from": [7.40326, 10, 10],
|
|
||||||
"to": [8.59674, 11, 11],
|
|
||||||
"rotation": { "angle": 45, "axis": "y", "origin": [8, 11, 8] },
|
|
||||||
"faces": {
|
|
||||||
"north": { "uv": [0, 0, 1, 1], "texture": "#1" },
|
|
||||||
"east": { "uv": [0, 0, 1, 1], "texture": "#1" },
|
|
||||||
"south": { "uv": [0, 0, 1, 1], "texture": "#1" },
|
|
||||||
"west": { "uv": [0, 0, 1, 1], "texture": "#1" },
|
|
||||||
"up": { "uv": [0, 0, 1, 1], "texture": "#1" },
|
|
||||||
"down": { "uv": [0, 0, 1, 1], "texture": "#1" }
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "hexadecagon",
|
|
||||||
"from": [5, 10, 7.40326],
|
|
||||||
"to": [6, 11, 8.59674],
|
|
||||||
"rotation": { "angle": -22.5, "axis": "y", "origin": [8, 11, 8] },
|
|
||||||
"faces": {
|
|
||||||
"north": { "uv": [0, 0, 1, 1], "texture": "#1" },
|
|
||||||
"east": { "uv": [0, 0, 1, 1], "texture": "#1" },
|
|
||||||
"south": { "uv": [0, 0, 1, 1], "texture": "#1" },
|
|
||||||
"west": { "uv": [0, 0, 1, 1], "texture": "#1" },
|
|
||||||
"up": { "uv": [0, 0, 1, 1], "texture": "#1" },
|
|
||||||
"down": { "uv": [0, 0, 1, 1], "texture": "#1" }
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "hexadecagon",
|
|
||||||
"from": [5, 10, 7.40326],
|
|
||||||
"to": [6, 11, 8.59674],
|
|
||||||
"rotation": { "angle": 0, "axis": "y", "origin": [8, 11, 8] },
|
|
||||||
"faces": {
|
|
||||||
"north": { "uv": [0, 0, 1, 1], "texture": "#1" },
|
|
||||||
"east": { "uv": [0, 0, 1, 1], "texture": "#1" },
|
|
||||||
"south": { "uv": [0, 0, 1, 1], "texture": "#1" },
|
|
||||||
"west": { "uv": [0, 0, 1, 1], "texture": "#1" },
|
|
||||||
"up": { "uv": [0, 0, 1, 1], "texture": "#1" },
|
|
||||||
"down": { "uv": [0, 0, 1, 1], "texture": "#1" }
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "hexadecagon",
|
|
||||||
"from": [5, 10, 7.40326],
|
|
||||||
"to": [6, 11, 8.59674],
|
|
||||||
"rotation": { "angle": 22.5, "axis": "y", "origin": [8, 11, 8] },
|
|
||||||
"faces": {
|
|
||||||
"north": { "uv": [0, 0, 1, 1], "texture": "#1" },
|
|
||||||
"east": { "uv": [0, 0, 1, 1], "texture": "#1" },
|
|
||||||
"south": { "uv": [0, 0, 1, 1], "texture": "#1" },
|
|
||||||
"west": { "uv": [0, 0, 1, 1], "texture": "#1" },
|
|
||||||
"up": { "uv": [0, 0, 1, 1], "texture": "#1" },
|
|
||||||
"down": { "uv": [0, 0, 1, 1], "texture": "#1" }
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "hexadecagon",
|
|
||||||
"from": [10, 10, 7.40326],
|
|
||||||
"to": [11, 11, 8.59674],
|
|
||||||
"rotation": { "angle": -22.5, "axis": "y", "origin": [8, 11, 8] },
|
|
||||||
"faces": {
|
|
||||||
"north": { "uv": [0, 0, 1, 1], "texture": "#1" },
|
|
||||||
"east": { "uv": [0, 0, 1, 1], "texture": "#1" },
|
|
||||||
"south": { "uv": [0, 0, 1, 1], "texture": "#1" },
|
|
||||||
"west": { "uv": [0, 0, 1, 1], "texture": "#1" },
|
|
||||||
"up": { "uv": [0, 0, 1, 1], "texture": "#1" },
|
|
||||||
"down": { "uv": [0, 0, 1, 1], "texture": "#1" }
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "hexadecagon",
|
|
||||||
"from": [10, 10, 7.40326],
|
|
||||||
"to": [11, 11, 8.59674],
|
|
||||||
"rotation": { "angle": 0, "axis": "y", "origin": [8, 11, 8] },
|
|
||||||
"faces": {
|
|
||||||
"north": { "uv": [0, 0, 1, 1], "texture": "#1" },
|
|
||||||
"east": { "uv": [0, 0, 1, 1], "texture": "#1" },
|
|
||||||
"south": { "uv": [0, 0, 1, 1], "texture": "#1" },
|
|
||||||
"west": { "uv": [0, 0, 1, 1], "texture": "#1" },
|
|
||||||
"up": { "uv": [0, 0, 1, 1], "texture": "#1" },
|
|
||||||
"down": { "uv": [0, 0, 1, 1], "texture": "#1" }
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "hexadecagon",
|
|
||||||
"from": [10, 10, 7.40326],
|
|
||||||
"to": [11, 11, 8.59674],
|
|
||||||
"rotation": { "angle": 22.5, "axis": "y", "origin": [8, 11, 8] },
|
|
||||||
"faces": {
|
|
||||||
"north": { "uv": [0, 0, 1, 1], "texture": "#1" },
|
|
||||||
"east": { "uv": [0, 0, 1, 1], "texture": "#1" },
|
|
||||||
"south": { "uv": [0, 0, 1, 1], "texture": "#1" },
|
|
||||||
"west": { "uv": [0, 0, 1, 1], "texture": "#1" },
|
|
||||||
"up": { "uv": [0, 0, 1, 1], "texture": "#1" },
|
|
||||||
"down": { "uv": [0, 0, 1, 1], "texture": "#1" }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
|
||||||
"groups": [
|
|
||||||
{
|
|
||||||
"name": "hexadecagon",
|
|
||||||
"origin": [8, 8, 8],
|
|
||||||
"color": 0,
|
|
||||||
"children": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
# Blender MTL File: 'None'
|
||||||
|
# Material Count: 1
|
||||||
|
|
||||||
|
newmtl tex
|
||||||
|
Ns 250.000000
|
||||||
|
Ka 1.000000 1.000000 1.000000
|
||||||
|
Kd 0.800000 0.800000 0.800000
|
||||||
|
Ks 0.500000 0.500000 0.500000
|
||||||
|
Ke 0.000000 0.000000 0.000000
|
||||||
|
Ni 1.450000
|
||||||
|
d 1.000000
|
||||||
|
illum 2
|
||||||
|
map_Kd saturnclient:item/halo
|
||||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user