simple .obj cosmetics example
This commit is contained in:
@@ -16,6 +16,8 @@ import org.saturnclient.saturnmods.ModManager;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import dev.felnull.specialmodelloader.api.event.SpecialModelLoaderEvents;
|
||||
|
||||
/**
|
||||
* Main class for the Saturn Client mod.
|
||||
*/
|
||||
@@ -32,11 +34,16 @@ public class SaturnClient implements ModInitializer {
|
||||
|
||||
ClientLifecycleEvents.CLIENT_STOPPING.register(_o -> ConfigManager.save());
|
||||
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());
|
||||
}
|
||||
});
|
||||
|
||||
SpecialModelLoaderEvents.LOAD_SCOPE.register(() -> {
|
||||
return (resourceManager, location) -> MOD_ID.equals(location.getNamespace());
|
||||
});
|
||||
|
||||
KeyInputHandler.register();
|
||||
if (SaturnSocket.authenticate()) {
|
||||
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_Y.rotationDegrees(180.0f));
|
||||
|
||||
matrices.translate(0.0f, 0.5f, 0.0f);
|
||||
|
||||
ItemStack customHat = new ItemStack(Items.STICK);
|
||||
customHat.set(DataComponentTypes.ITEM_MODEL,
|
||||
Identifier.of("saturnclient:hat_" + player.hat));
|
||||
@@ -54,7 +52,7 @@ public class HatFeatureRenderer extends FeatureRenderer<PlayerEntityRenderState,
|
||||
|
||||
itemRenderer.renderItem(
|
||||
customHat,
|
||||
ModelTransformationMode.HEAD,
|
||||
ModelTransformationMode.THIRD_PERSON_RIGHT_HAND,
|
||||
light,
|
||||
OverlayTexture.DEFAULT_UV,
|
||||
matrices,
|
||||
|
||||
Reference in New Issue
Block a user