Skip to content

Commit

Permalink
Removed unwanted comment and removed useless files.
Browse files Browse the repository at this point in the history
  • Loading branch information
MoonstoneWebber committed Jan 17, 2025
1 parent a272e43 commit 13a1051
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 115 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import net.minecraft.client.gui.GuiGraphics;
import net.minecraft.client.gui.components.AbstractWidget;
import net.minecraft.client.gui.narration.NarrationElementOutput;
import net.minecraft.client.model.geom.EntityModelSet;
import net.minecraft.client.model.geom.builders.CubeDeformation;
import net.minecraft.client.model.geom.builders.LayerDefinition;
import net.minecraft.client.renderer.RenderType;
Expand All @@ -25,9 +24,9 @@ public class FancyPlayerEntityWidget extends AbstractWidget {
private float rotationX = -5.0F;
private float rotationY = 30.0F;

public FancyPlayerEntityWidget(int x, int y, int width, int height, EntityModelSet model, Supplier<PlayerSkin> skin) {
public FancyPlayerEntityWidget(int x, int y, int width, int height, Supplier<PlayerSkin> skin) {
super(x, y, width, height, CommonComponents.EMPTY);
this.model = FancyPlayerEntityWidget.Model.bake(model);
this.model = FancyPlayerEntityWidget.Model.bake();
this.skin = skin;
}

Expand Down Expand Up @@ -57,9 +56,7 @@ protected void renderWidget(GuiGraphics gfx, int mouseX, int mouseY, float parti
}

@Override
protected void updateWidgetNarration(NarrationElementOutput _f) {

}
protected void updateWidgetNarration(@NotNull NarrationElementOutput output) {}

@Override
protected void onDrag(double p_299829_, double p_299876_, double p_300028_, double p_299872_) {
Expand All @@ -69,16 +66,16 @@ protected void onDrag(double p_299829_, double p_299876_, double p_300028_, doub

record Model(PlayerModel wideModel, PlayerModel slimModel) {

public static FancyPlayerEntityWidget.Model bake(EntityModelSet modelSet) {
public static FancyPlayerEntityWidget.Model bake() {
// Qui al posto di prendere il modelSEt ecc, creo direttamente le cose.
PlayerModel wideModel = new PlayerModel(LayerDefinition.create(PlayerModel.createMesh(CubeDeformation.NONE, false), 64, 64)/*.apply(PlayerModel.BABY_TRANSFORMER)*/.bakeRoot(), false);
PlayerModel slimModel = new PlayerModel(LayerDefinition.create(PlayerModel.createMesh(CubeDeformation.NONE, true), 64, 64)/*.apply(PlayerModel.BABY_TRANSFORMER)*/.bakeRoot(), true);
PlayerModel slimModel = new PlayerModel(LayerDefinition.create(PlayerModel.createMesh(CubeDeformation.NONE, true), 64, 64).apply(PlayerModel.BABY_TRANSFORMER).bakeRoot(), true);
return new FancyPlayerEntityWidget.Model(wideModel, slimModel);
}

public void render(GuiGraphics gfx, PlayerSkin skin) {
gfx.pose().pushPose();
//gfx.pose().scale(1.0F, 1.0F, -1.0F);
gfx.pose().scale(1.0F, 1.0F, -1.0F);
gfx.pose().translate(0.0F, -1.501F, 0.0F);
PlayerModel model = skin.model() == PlayerSkin.Model.SLIM ? this.slimModel : this.wideModel;

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
package it.crystalnest.fancy_entity_renderer.entity.player.model;

import it.crystalnest.fancy_entity_renderer.Constants;
import net.minecraft.client.model.geom.ModelLayerLocation;
import net.minecraft.client.model.geom.ModelPart;
import net.minecraft.resources.ResourceLocation;

public class PlayerModel extends net.minecraft.client.model.PlayerModel {
public static ModelLayerLocation BABY_PLAYER = new ModelLayerLocation(ResourceLocation.fromNamespaceAndPath(Constants.MOD_ID, "baby_player"), "main");


public PlayerModel(ModelPart root, boolean isSlim) {
super(root, isSlim);
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ protected TitleScreenMixin(Component title) {
@Inject(method = "init", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/screens/TitleScreen;addRenderableWidget(Lnet/minecraft/client/gui/components/events/GuiEventListener;)Lnet/minecraft/client/gui/components/events/GuiEventListener;", ordinal = 3, shift = At.Shift.AFTER))
private void onInit(CallbackInfo ci) {
//this.addRenderableWidget(new PlayerSkinWidget(85, 120, this.minecraft.getEntityModels(), DefaultPlayerSkin::getDefaultSkin));
this.addRenderableWidget(new FancyPlayerEntityWidget(0,0,85, 120, this.minecraft.getEntityModels(), DefaultPlayerSkin::getDefaultSkin));
this.addRenderableWidget(new FancyPlayerEntityWidget(0,0,85, 120, DefaultPlayerSkin::getDefaultSkin));
}
}

This file was deleted.

0 comments on commit 13a1051

Please sign in to comment.