35 lines
		
	
	
	
		
			1.1 KiB
		
	
	
	
		
			Java
		
	
	
	
	
	
			
		
		
	
	
			35 lines
		
	
	
	
		
			1.1 KiB
		
	
	
	
		
			Java
		
	
	
	
	
	
| package net.minecraft.client.renderer.entity.state;
 | |
| 
 | |
| import net.fabricmc.api.EnvType;
 | |
| import net.fabricmc.api.Environment;
 | |
| import net.minecraft.resources.ResourceLocation;
 | |
| import net.minecraft.util.Mth;
 | |
| import net.minecraft.world.item.DyeColor;
 | |
| import net.minecraft.world.item.ItemStack;
 | |
| import org.jetbrains.annotations.Nullable;
 | |
| 
 | |
| @Environment(EnvType.CLIENT)
 | |
| public class WolfRenderState extends LivingEntityRenderState {
 | |
| 	private static final ResourceLocation DEFAULT_TEXTURE = ResourceLocation.withDefaultNamespace("textures/entity/wolf/wolf.png");
 | |
| 	public boolean isAngry;
 | |
| 	public boolean isSitting;
 | |
| 	public float tailAngle = (float) (Math.PI / 5);
 | |
| 	public float headRollAngle;
 | |
| 	public float shakeAnim;
 | |
| 	public float wetShade = 1.0F;
 | |
| 	public ResourceLocation texture = DEFAULT_TEXTURE;
 | |
| 	@Nullable
 | |
| 	public DyeColor collarColor;
 | |
| 	public ItemStack bodyArmorItem = ItemStack.EMPTY;
 | |
| 
 | |
| 	public float getBodyRollAngle(float angle) {
 | |
| 		float f = (this.shakeAnim + angle) / 1.8F;
 | |
| 		if (f < 0.0F) {
 | |
| 			f = 0.0F;
 | |
| 		} else if (f > 1.0F) {
 | |
| 			f = 1.0F;
 | |
| 		}
 | |
| 
 | |
| 		return Mth.sin(f * (float) Math.PI) * Mth.sin(f * (float) Math.PI * 11.0F) * 0.15F * (float) Math.PI;
 | |
| 	}
 | |
| }
 |