Added new cloud entity textures

This commit is contained in:
Sollace 2019-01-30 15:49:30 +02:00
parent 124612d02e
commit 37e9c17940
4 changed files with 25 additions and 13 deletions

View file

@ -5,25 +5,32 @@ import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
public class ModelCloud extends ModelBase { public class ModelCloud extends ModelBase {
ModelRenderer body;
public ModelCloud() { ModelRenderer body;
init();
}
private void init() { public ModelCloud() {
body = new ModelRenderer(this, 0, 0); init();
}
body.addBox(-24, 5, -24, 48, 10, 48); private void init() {
boxList.clear();
body.addBox(-10, 14.999F, -10, 30, 2, 30); body = new ModelRenderer(this, 0, 0);
body.addBox(-19.999F, 14.999F, -15, 15, 3, 25); body.setTextureSize(250, 90);
body.addBox(-10, 3.001F, -10, 30, 2, 30); body.setTextureOffset(0, 0);
body.rotationPointY += 4.2; body.addBox(-24, 5, -24, 48, 10, 48);
}
public void render(Entity entityIn, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scale) { body.setTextureOffset(0, 58);
body.addBox(-10, 14.999F, -10, 30, 2, 30);
body.setTextureOffset(120, 58);
body.addBox(-10, 3.001F, -10, 30, 2, 30);
body.rotationPointY += 4.2;
}
public void render(Entity entityIn, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scale) {
body.render(scale); body.render(scale);
} }
} }

View file

@ -18,6 +18,7 @@ public class RenderCloud extends RenderLiving<EntityCloud> {
super(rendermanagerIn, new ModelCloud(), 1f); super(rendermanagerIn, new ModelCloud(), 1f);
} }
@Override
public float prepareScale(EntityCloud entity, float par2) { public float prepareScale(EntityCloud entity, float par2) {
float scale = entity.getCloudSize(); float scale = entity.getCloudSize();
@ -25,6 +26,7 @@ public class RenderCloud extends RenderLiving<EntityCloud> {
return 0.0625F; return 0.0625F;
} }
@Override
protected void renderModel(EntityCloud entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) { protected void renderModel(EntityCloud entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) {
if (!entity.isDead) { if (!entity.isDead) {
@ -48,6 +50,7 @@ public class RenderCloud extends RenderLiving<EntityCloud> {
} }
} }
@Override
protected ResourceLocation getEntityTexture(EntityCloud entity) { protected ResourceLocation getEntityTexture(EntityCloud entity) {
if (entity.getIsRaining() && entity.getIsThundering()) { if (entity.getIsRaining() && entity.getIsThundering()) {
return rainCloud; return rainCloud;
@ -55,10 +58,12 @@ public class RenderCloud extends RenderLiving<EntityCloud> {
return cloud; return cloud;
} }
@Override
protected int getColorMultiplier(EntityCloud par1EntityLivingBase, float yaw, float pitch) { protected int getColorMultiplier(EntityCloud par1EntityLivingBase, float yaw, float pitch) {
return 0; return 0;
} }
@Override
protected float getDeathMaxRotation(EntityCloud par1EntityLivingBase) { protected float getDeathMaxRotation(EntityCloud par1EntityLivingBase) {
return 0; return 0;
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 6.1 KiB