Skip to content

Commit

Permalink
fix: minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Slexom committed May 15, 2021
1 parent 76e97c5 commit c609220
Show file tree
Hide file tree
Showing 10 changed files with 52 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@
import net.minecraft.item.ItemStack;
import net.minecraft.item.Items;
import slexom.earthtojava.mobs.client.renderer.entity.model.VilerWitchModel;
import slexom.earthtojava.mobs.entity.monster.VilerWitchEntity;

@Environment(EnvType.CLIENT)
public class VilerWitchHeldItemFeatureRenderer<T extends LivingEntity> extends VillagerHeldItemFeatureRenderer<T, VilerWitchModel<T>> {
public class VilerWitchHeldItemFeatureRenderer<T extends VilerWitchEntity> extends VillagerHeldItemFeatureRenderer<T, VilerWitchModel<T>> {
public VilerWitchHeldItemFeatureRenderer(FeatureRendererContext<T, VilerWitchModel<T>> featureRendererContext) {
super(featureRendererContext);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
package slexom.earthtojava.mobs.client.renderer.entity.model;

import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.minecraft.client.model.ModelPart;
import net.minecraft.client.render.entity.model.BipedEntityModel;
import net.minecraft.client.render.entity.model.ZombieEntityModel;
import net.minecraft.util.math.MathHelper;
import slexom.earthtojava.mobs.entity.monster.BoulderingZombieEntity;

@Environment(EnvType.CLIENT)
public class BoulderingZombieModel<T extends BoulderingZombieEntity> extends ZombieEntityModel<T> {
public BoulderingZombieModel(float scale, boolean bl) {
super(scale, 0.0F, 64, bl ? 32 : 64);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
package slexom.earthtojava.mobs.client.renderer.entity.model;

import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.minecraft.client.render.entity.model.CowEntityModel;
import slexom.earthtojava.mobs.entity.base.E2JBaseShearableCowEntity;

@Environment(EnvType.CLIENT)
public class E2JShearableCowModel<T extends E2JBaseShearableCowEntity> extends CowEntityModel<T> {
private float headPitchModifier;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
package slexom.earthtojava.mobs.client.renderer.entity.model;

import com.google.common.collect.ImmutableList;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.minecraft.client.model.ModelPart;
import net.minecraft.client.render.entity.model.AnimalModel;
import net.minecraft.entity.Entity;
import net.minecraft.util.math.MathHelper;

@Environment(EnvType.CLIENT)
public class FancyChickenModel<T extends Entity> extends AnimalModel<T> {
private final ModelPart head;
private final ModelPart torso;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
package slexom.earthtojava.mobs.client.renderer.entity.model;

import com.google.common.collect.ImmutableList;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.minecraft.client.model.ModelPart;
import net.minecraft.client.render.VertexConsumer;
import net.minecraft.client.render.entity.model.EntityModel;
import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.util.math.MathHelper;
import slexom.earthtojava.mobs.entity.passive.JollyLlamaEntity;

@Environment(EnvType.CLIENT)
public class JollyLlamaModel extends EntityModel<JollyLlamaEntity> {
private final ModelPart head;
private final ModelPart torso;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
package slexom.earthtojava.mobs.client.renderer.entity.model;

import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.minecraft.client.model.ModelPart;
import net.minecraft.client.render.entity.model.ZombieEntityModel;
import slexom.earthtojava.mobs.entity.monster.LobberZombieEntity;

@Environment(EnvType.CLIENT)
public class LobberZombieModel<T extends LobberZombieEntity> extends ZombieEntityModel<T> {

public LobberZombieModel(float scale, boolean bl) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
package slexom.earthtojava.mobs.client.renderer.entity.model;

import com.google.common.collect.ImmutableList;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.minecraft.client.model.ModelPart;
import net.minecraft.client.render.entity.model.CompositeEntityModel;
import net.minecraft.entity.Entity;
import net.minecraft.util.math.MathHelper;

@Environment(EnvType.CLIENT)
public class MelonGolemModel<T extends Entity> extends CompositeEntityModel<T> {
private final ModelPart torso;
private final ModelPart bottomBody;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
package slexom.earthtojava.mobs.client.renderer.entity.model;

import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.minecraft.client.model.ModelPart;
import net.minecraft.client.render.entity.model.SheepEntityModel;
import slexom.earthtojava.mobs.entity.base.E2JBaseMonoColorSheepEntity;

@Environment(EnvType.CLIENT)
public class RainbowSheepModel<T extends E2JBaseMonoColorSheepEntity<T>> extends SheepEntityModel<T> {

public RainbowSheepModel() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
package slexom.earthtojava.mobs.client.renderer.entity.model;

import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.minecraft.client.model.ModelPart;
import net.minecraft.client.render.entity.model.QuadrupedEntityModel;
import slexom.earthtojava.mobs.entity.passive.RainbowSheepEntity;

@Environment(EnvType.CLIENT)
public class RainbowSheepWoolModel<T extends RainbowSheepEntity> extends QuadrupedEntityModel<T> {
private float headRotationAngleX;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,44 +1,48 @@
package slexom.earthtojava.mobs.client.renderer.entity.model;

import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.minecraft.client.model.ModelPart;
import net.minecraft.client.render.entity.model.VillagerResemblingModel;
import net.minecraft.entity.Entity;
import net.minecraft.util.math.MathHelper;
import slexom.earthtojava.mobs.entity.monster.VilerWitchEntity;

public class VilerWitchModel<T extends Entity> extends VillagerResemblingModel<T> {
@Environment(EnvType.CLIENT)
public class VilerWitchModel<T extends VilerWitchEntity> extends VillagerResemblingModel<T> {

private final ModelPart wart = (new ModelPart(this)).setTextureSize(96, 128);
private final ModelPart hood = (new ModelPart(this)).setTextureSize(96, 128);
private final ModelPart hat = (new ModelPart(this)).setTextureSize(96, 128);

private float hatPivotX = 6.75F;
private float hatPivotY = -4.0F;
private float hatPivotZ = 7.0F;
private boolean liftingNose;

public VilerWitchModel(float scale) {
super(scale, 96, 128);
this.wart.setPivot(0.0F, -2.0F, 0.0F);
this.wart.setTextureOffset(0, 0).addCuboid(0.0F, 3.0F, -6.75F, 1.0F, 1.0F, 1.0F, -0.25F);
this.nose.addChild(this.wart);

this.head = (new ModelPart(this)).setTextureSize(96, 128);
this.head.setPivot(0.0F, 0.0F, 0.0F);
this.head.setTextureOffset(0, 0).addCuboid(-4.0F, -10.0F, -4.0F, 8.0F, 10.0F, 8.0F, scale);

this.field_17141 = (new ModelPart(this)).setTextureSize(96, 128);
this.field_17141.setPivot(-10.0F, -11.03125F, -10.0F);
this.field_17141.setTextureOffset(0, 64).addCuboid(0.0F, 0.0F, 0.0F, 20.0F, 3.0F, 20.0F);
this.head.addChild(this.field_17141);
this.head.addChild(this.nose);

ModelPart hatBox1 = (new ModelPart(this)).setTextureSize(96, 128);
hatBox1.setPivot(6.75F, -4.0F, 7.0F);
hatBox1.setTextureOffset(0, 87).addCuboid(0.0F, 0.0F, 0.0F, 7.0F, 4.0F, 7.0F);
hatBox1.pitch = -0.05235988F;
hatBox1.roll = 0.02617994F;
this.field_17141.addChild(hatBox1);
this.hat.setPivot(hatPivotX, hatPivotY, hatPivotZ);
this.hat.setTextureOffset(0, 87).addCuboid(0.0F, 0.0F, 0.0F, 7.0F, 4.0F, 7.0F);
this.hat.pitch = -0.05235988F;
this.hat.roll = 0.02617994F;
this.field_17141.addChild(this.hat);
ModelPart hatBox2 = (new ModelPart(this)).setTextureSize(96, 128);
hatBox2.setPivot(1.75F, -4.0F, 2.0F);
hatBox2.setTextureOffset(0, 98).addCuboid(0.0F, 0.0F, 0.0F, 4.0F, 4.0F, 4.0F);
hatBox2.pitch = -0.10471976F;
hatBox2.roll = 0.05235988F;
hatBox1.addChild(hatBox2);
this.hat.addChild(hatBox2);
ModelPart hatPoint = (new ModelPart(this)).setTextureSize(96, 128);
hatPoint.setPivot(1.75F, -2.0F, 2.0F);
hatPoint.setTextureOffset(16, 103).addCuboid(0.0F, 0.0F, 0.0F, 1.0F, 2.0F, 1.0F, 0.25F);
Expand Down Expand Up @@ -70,9 +74,18 @@ public void setAngles(T entity, float limbAngle, float limbDistance, float anima
this.nose.setPivot(0.0F, 1.0F, -1.5F);
this.nose.pitch = -0.9F;
}

}

//@Override
//public void animateModel(T entity, float limbAngle, float limbDistance, float tickDelta) {
// super.animateModel(entity, limbAngle, limbDistance, tickDelta);
// if (entity.getCastingTicks() > 0) {
// this.hat.pivotY = hatPivotY - 2.0F;
// } else {
// this.hat.pivotY = hatPivotY;
// }
// }

public ModelPart getNose() {
return this.nose;
}
Expand Down

0 comments on commit c609220

Please sign in to comment.