Code/net/minecraft/client/renderer/entity/state/PlayerRenderState.java

47 lines
1.7 KiB
Java
Raw Normal View History

2025-07-01 06:20:03 +00:00
package net.minecraft.client.renderer.entity.state;
import javax.annotation.Nullable;
import net.minecraft.client.renderer.item.ItemStackRenderState;
import net.minecraft.client.resources.DefaultPlayerSkin;
import net.minecraft.client.resources.PlayerSkin;
import net.minecraft.network.chat.Component;
import net.minecraft.util.Mth;
import net.minecraft.world.entity.animal.Parrot;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
@OnlyIn(Dist.CLIENT)
public class PlayerRenderState extends HumanoidRenderState {
public PlayerSkin skin = DefaultPlayerSkin.getDefaultSkin();
public float capeFlap;
public float capeLean;
public float capeLean2;
public int arrowCount;
public int stingerCount;
public int useItemRemainingTicks;
public boolean isSpectator;
public boolean showHat = true;
public boolean showJacket = true;
public boolean showLeftPants = true;
public boolean showRightPants = true;
public boolean showLeftSleeve = true;
public boolean showRightSleeve = true;
public boolean showCape = true;
public float fallFlyingTimeInTicks;
public boolean shouldApplyFlyingYRot;
public float flyingYRot;
public boolean swinging;
@Nullable
public Component scoreText;
@Nullable
public Parrot.Variant parrotOnLeftShoulder;
@Nullable
public Parrot.Variant parrotOnRightShoulder;
public int id;
public String name = "Steve";
public final ItemStackRenderState heldOnHead = new ItemStackRenderState();
public float fallFlyingScale() {
return Mth.clamp(this.fallFlyingTimeInTicks * this.fallFlyingTimeInTicks / 100.0F, 0.0F, 1.0F);
}
}