removed herobrine??!
|
@ -115,6 +115,7 @@ import common.entity.animal.EntityHorse;
|
|||
import common.entity.npc.Energy;
|
||||
import common.entity.npc.EntityCpu;
|
||||
import common.entity.npc.EntityNPC;
|
||||
import common.entity.npc.EntityWaterNPC;
|
||||
import common.entity.npc.PlayerCharacter;
|
||||
import common.entity.types.EntityLiving;
|
||||
import common.future.Futures;
|
||||
|
@ -1022,7 +1023,6 @@ public class Client implements IThreadListener {
|
|||
int color = potion.getColor();
|
||||
String name = (potion.isBadEffect() ? TextColor.ORANGE : TextColor.ACID) + effect.getEffectName();
|
||||
String desc = TextColor.NEON + effect.getDurationString();
|
||||
// Drawing.drawRectColor(x, y, 250, Font.DEFAULT.yglyph + 2, color | 0xff000000);
|
||||
Drawing.drawRectBorder(x, y, 250, Font.YGLYPH + 6, 0xff000000, 0xff202020, 0xffcfcfcf, 0xff6f6f6f);
|
||||
Drawing.drawGradient(x + 2, y + 2, effect.isInfinite() ? 246 : ((int)(246.0f * ((float)effect.getRemaining() / (float)effect.getDuration()))), Font.YGLYPH + 2, color | 0xff000000, Util.mixColor(color | 0xff000000, 0xff000000));
|
||||
Drawing.drawText(name, x + 4, y + 3, 0xffffffff);
|
||||
|
@ -1035,7 +1035,7 @@ public class Client implements IThreadListener {
|
|||
int absorb = entity.getAbsorptionAmount();
|
||||
int armor = entity.getTotalArmorValue();
|
||||
int stats = 1 + (absorb > 0 ? 1 : 0) + (armor > 0 ? 1 : 0) + (entity.vehicle instanceof EntityLiving ? 1 : 0)
|
||||
+ (entity instanceof EntityNPC npc && npc.getManaPoints() > 0 ? 1 : 0);
|
||||
+ (entity.getManaPoints() > 0 ? 1 : 0) + (entity instanceof EntityWaterNPC ? 1 : 0);
|
||||
for(Energy energy : Energy.values()) {
|
||||
if(entity.getEnergy(energy) > 0)
|
||||
stats += 1;
|
||||
|
@ -1047,17 +1047,21 @@ public class Client implements IThreadListener {
|
|||
y = stats(x, y, TextColor.RED + "Schaden", hp, max, 0xff0000);
|
||||
if(absorb > 0)
|
||||
y = stats(x, y, TextColor.YELLOW + "Schadenspuffer", absorb, 1024, 0xffff00);
|
||||
if(entity instanceof EntityWaterNPC npc) {
|
||||
int moist = npc.getMoisture();
|
||||
int maxm = npc.getMaxMoisture();
|
||||
y = stats(x, y, TextColor.BLUE + "Feuchtigkeit", moist, maxm, 0x4f4fff);
|
||||
}
|
||||
if(armor > 0)
|
||||
y = stats(x, y, TextColor.GRAY + "Rüstung", armor, 1024, 0x707070);
|
||||
if(entity.vehicle instanceof EntityLiving) {
|
||||
EntityLiving living = (EntityLiving)entity.vehicle;
|
||||
if(entity.vehicle instanceof EntityLiving living) {
|
||||
int vh = living.getHealth();
|
||||
int vhMax = living.getMaxHealth();
|
||||
y = stats(x, y, living.getDisplayName() /* + " (Reittier)" */, vh, vhMax, 0xff6060);
|
||||
y = stats(x, y, living.getDisplayName(), vh, vhMax, 0xff6060);
|
||||
}
|
||||
if(entity instanceof EntityNPC npc && npc.getManaPoints() > 0) {
|
||||
int mana = npc.getManaPoints();
|
||||
int maxm = npc.getMaxMana();
|
||||
if(entity.getManaPoints() > 0) {
|
||||
int mana = entity.getManaPoints();
|
||||
int maxm = entity.getMaxMana();
|
||||
y = stats(x, y, TextColor.CYAN + "Mana", mana, maxm, 0x0000ff);
|
||||
}
|
||||
for(int z = 0; z < Energy.values().length; z++) {
|
||||
|
|
|
@ -31,31 +31,28 @@ import client.renderer.entity.RenderLightning;
|
|||
import client.renderer.entity.RenderManager;
|
||||
import client.renderer.entity.RenderMinecart;
|
||||
import client.renderer.entity.RenderMissile;
|
||||
import client.renderer.entity.RenderMooshroom;
|
||||
import client.renderer.entity.RenderMouse;
|
||||
import client.renderer.entity.RenderNpc;
|
||||
import client.renderer.entity.RenderOcelot;
|
||||
import client.renderer.entity.RenderCat;
|
||||
import client.renderer.entity.RenderPig;
|
||||
import client.renderer.entity.RenderPotion;
|
||||
import client.renderer.entity.RenderRabbit;
|
||||
import client.renderer.entity.RenderSheep;
|
||||
import client.renderer.entity.RenderSlime;
|
||||
import client.renderer.entity.RenderSpaceMarine;
|
||||
import client.renderer.entity.RenderSquid;
|
||||
import client.renderer.entity.RenderTntMinecart;
|
||||
import client.renderer.entity.RenderTntPrimed;
|
||||
import client.renderer.entity.RenderWolf;
|
||||
import client.renderer.entity.RenderXpOrb;
|
||||
import client.renderer.entity.RenderXp;
|
||||
import client.renderer.model.ModelChicken;
|
||||
import client.renderer.model.ModelCow;
|
||||
import client.renderer.model.ModelFox;
|
||||
import client.renderer.model.ModelHorse;
|
||||
import client.renderer.model.ModelMouse;
|
||||
import client.renderer.model.ModelOcelot;
|
||||
import client.renderer.model.ModelCat;
|
||||
import client.renderer.model.ModelPig;
|
||||
import client.renderer.model.ModelRabbit;
|
||||
import client.renderer.model.ModelSheep2;
|
||||
import client.renderer.model.ModelSquid;
|
||||
import client.renderer.model.ModelWolf;
|
||||
import client.renderer.texture.TextureTicked;
|
||||
import client.renderer.ticked.TextureFlamesFX1;
|
||||
|
@ -73,13 +70,11 @@ import common.entity.animal.EntityCow;
|
|||
import common.entity.animal.EntityDragon;
|
||||
import common.entity.animal.EntityFox;
|
||||
import common.entity.animal.EntityHorse;
|
||||
import common.entity.animal.EntityMooshroom;
|
||||
import common.entity.animal.EntityMouse;
|
||||
import common.entity.animal.EntityOcelot;
|
||||
import common.entity.animal.EntityCat;
|
||||
import common.entity.animal.EntityPig;
|
||||
import common.entity.animal.EntityRabbit;
|
||||
import common.entity.animal.EntitySheep;
|
||||
import common.entity.animal.EntitySquid;
|
||||
import common.entity.animal.EntityWolf;
|
||||
import common.entity.effect.EntityLightning;
|
||||
import common.entity.item.EntityBoat;
|
||||
|
@ -119,13 +114,11 @@ public abstract class RenderRegistry {
|
|||
map.put(EntityPig.class, new RenderPig(mgr, new ModelPig()));
|
||||
map.put(EntitySheep.class, new RenderSheep(mgr, new ModelSheep2()));
|
||||
map.put(EntityCow.class, new RenderCow(mgr, new ModelCow()));
|
||||
map.put(EntityMooshroom.class, new RenderMooshroom(mgr, new ModelCow()));
|
||||
map.put(EntityWolf.class, new RenderWolf(mgr, new ModelWolf()));
|
||||
map.put(EntityFox.class, new RenderFox(mgr, new ModelFox()));
|
||||
map.put(EntityChicken.class, new RenderChicken(mgr, new ModelChicken()));
|
||||
map.put(EntityOcelot.class, new RenderOcelot(mgr, new ModelOcelot()));
|
||||
map.put(EntityCat.class, new RenderCat(mgr, new ModelCat()));
|
||||
map.put(EntityRabbit.class, new RenderRabbit(mgr, new ModelRabbit()));
|
||||
map.put(EntitySquid.class, new RenderSquid(mgr, new ModelSquid()));
|
||||
map.put(EntityBat.class, new RenderBat(mgr));
|
||||
map.put(EntityDragon.class, new RenderDragon(mgr));
|
||||
map.put(EntityCrystal.class, new RenderCrystal(mgr));
|
||||
|
@ -141,7 +134,7 @@ public abstract class RenderRegistry {
|
|||
map.put(EntityFireCharge.class, new RenderFireball(mgr, 0.5F));
|
||||
map.put(EntityBox.class, new RenderFlyingBox(mgr));
|
||||
map.put(EntityItem.class, new RenderEntityItem(mgr, ritem));
|
||||
map.put(EntityXp.class, new RenderXpOrb(mgr));
|
||||
map.put(EntityXp.class, new RenderXp(mgr));
|
||||
map.put(EntityTnt.class, new RenderTntPrimed(mgr));
|
||||
map.put(EntityFalling.class, new RenderFallingBlock(mgr));
|
||||
map.put(EntityTntCart.class, new RenderTntMinecart(mgr));
|
||||
|
@ -156,11 +149,11 @@ public abstract class RenderRegistry {
|
|||
map.put(EntityBullet.class, new RenderBullet(mgr));
|
||||
map.put(EntityMissile.class, new RenderMissile(mgr));
|
||||
map.put(EntityLightning.class, new RenderLightning(mgr));
|
||||
models.put(ModelType.HUMANOID, new RenderHumanoid(mgr, 12, 12, "textures/entity/char.png"));
|
||||
models.put(ModelType.HUMANOID, new RenderHumanoid(mgr, 12, 12, "textures/npc/char.png"));
|
||||
models.put(ModelType.ARACHNOID, new RenderArachnoid(mgr));
|
||||
models.put(ModelType.SLIME, new RenderSlime(mgr));
|
||||
models.put(ModelType.DWARF, new RenderHumanoid(mgr, 10, 10, "textures/entity/dwarf.png"));
|
||||
models.put(ModelType.HALFLING, new RenderHumanoid(mgr, 8, 8, "textures/entity/goblin.png"));
|
||||
models.put(ModelType.DWARF, new RenderHumanoid(mgr, 10, 10, "textures/npc/dwarf.png"));
|
||||
models.put(ModelType.HALFLING, new RenderHumanoid(mgr, 8, 8, "textures/npc/goblin.png"));
|
||||
models.put(ModelType.SPACE_MARINE, new RenderSpaceMarine(mgr));
|
||||
for(int z = 0; z < SpeciesRegistry.SPECIMEN.size(); z++) {
|
||||
SpeciesInfo info = SpeciesRegistry.SPECIMEN.get(z);
|
||||
|
|
|
@ -748,18 +748,14 @@ public class EntityRenderer {
|
|||
if (world != null)
|
||||
{
|
||||
float sun = world.getSunBrightness(1.0F);
|
||||
float msun = sun * 0.95F + 0.05F;
|
||||
float msun = world.getLastLightning() > 0 ? 1.0f : sun * 0.95F + 0.05F;
|
||||
float fsun = world.getLastLightning() > 0 ? 1.0f : sun;
|
||||
|
||||
for (int n = 0; n < 256; ++n)
|
||||
{
|
||||
float sky = World.BRIGHTNESS[world.dimension.getBrightness()][n / 16] * msun;
|
||||
float block = World.BRIGHTNESS[world.dimension.getBrightness()][n % 16] * (this.torchFlickerX * 0.1F + 1.5F);
|
||||
|
||||
if (world.getLastLightning() > 0)
|
||||
{
|
||||
sky = World.BRIGHTNESS[world.dimension.getBrightness()][n / 16];
|
||||
}
|
||||
|
||||
float sred = sky * (sun * 0.65F + 0.35F);
|
||||
float sgreen = sky * (sun * 0.65F + 0.35F);
|
||||
float bgreen = block * ((block * 0.6F + 0.4F) * 0.6F + 0.4F);
|
||||
|
@ -771,20 +767,35 @@ public class EntityRenderer {
|
|||
green = green * 0.96F + 0.03F;
|
||||
blue = blue * 0.96F + 0.03F;
|
||||
|
||||
// if (this.bossColorModifier > 0.0F)
|
||||
// {
|
||||
// float f11 = this.bossColorModifierPrev + (this.bossColorModifier - this.bossColorModifierPrev) * partialTicks;
|
||||
// f8 = f8 * (1.0F - f11) + f8 * 0.7F * f11;
|
||||
// f9 = f9 * (1.0F - f11) + f9 * 0.6F * f11;
|
||||
// f10 = f10 * (1.0F - f11) + f10 * 0.6F * f11;
|
||||
// }
|
||||
if (world.dimension.getLightColor() != 0xffffffff)
|
||||
{
|
||||
Vec3 lightColor = new Vec3(world.dimension.getLightColor());
|
||||
float light = (float)(15 - (n % 16)) / 15.0f * (float)(n / 16) / 15.0f;
|
||||
red = red * (1.0F - light) + (float)lightColor.xCoord * fsun * light;
|
||||
green = green * (1.0F - light) + (float)lightColor.yCoord * fsun * light;
|
||||
blue = blue * (1.0F - light) + (float)lightColor.zCoord * fsun * light;
|
||||
}
|
||||
|
||||
// if (world.dimension.getDimensionId() == 1)
|
||||
// {
|
||||
// f8 = 0.22F + f3 * 0.75F;
|
||||
// f9 = 0.28F + f6 * 0.75F;
|
||||
// f10 = 0.25F + f7 * 0.75F;
|
||||
// }
|
||||
if (world.dimension.getBlockColor() != 0xffffffff)
|
||||
{
|
||||
Vec3 lightColor = new Vec3(world.dimension.getBlockColor());
|
||||
float light = (float)(15 - (n / 16)) / 15.0f * (float)(n % 16) / 15.0f;
|
||||
red = red * (1.0F - light) + (float)lightColor.xCoord * light;
|
||||
green = green * (1.0F - light) + (float)lightColor.yCoord * light;
|
||||
blue = blue * (1.0F - light) + (float)lightColor.zCoord * light;
|
||||
}
|
||||
|
||||
if (world.getLastLightning() > 0)
|
||||
{
|
||||
Vec3 lightColor = world.getLightColor();
|
||||
float light = (float)world.getLastLightning() - partialTicks;
|
||||
if(light > 1.0F)
|
||||
light = 1.0F;
|
||||
light *= (float)(15 - (n % 16)) / 15.0f * (float)(n / 16) / 15.0f;
|
||||
red = red * (1.0F - light) + (float)lightColor.xCoord * light;
|
||||
green = green * (1.0F - light) + (float)lightColor.yCoord * light;
|
||||
blue = blue * (1.0F - light) + (float)lightColor.zCoord * light;
|
||||
}
|
||||
|
||||
if (this.gm.player.hasEffect(Effect.NIGHT_VISION))
|
||||
{
|
||||
|
@ -821,7 +832,7 @@ public class EntityRenderer {
|
|||
blue = 1.0F;
|
||||
}
|
||||
|
||||
float bright = this.gm.setGamma || this.gm.xrayActive ? 100.0f : 0.1f;
|
||||
float bright = this.gm.setGamma || this.gm.xrayActive ? 100.0f : this.gm.player.getVisionBrightness();
|
||||
float ri = 1.0F - red;
|
||||
float gi = 1.0F - green;
|
||||
float bi = 1.0F - blue;
|
||||
|
|
|
@ -11,7 +11,7 @@ public class RenderArachnoid extends RenderHumanoid
|
|||
{
|
||||
public RenderArachnoid(RenderManager renderManagerIn)
|
||||
{
|
||||
super(renderManagerIn, new ModelArachnoid(), 12, 12, false, "textures/entity/arachnoid.png");
|
||||
super(renderManagerIn, new ModelArachnoid(), 12, 12, false, "textures/npc/arachnoid.png");
|
||||
this.addLayer(new LayerArachnoidArmor(this));
|
||||
// this.addLayer(new LayerSpiderEyes(this));
|
||||
}
|
||||
|
@ -36,11 +36,6 @@ public class RenderArachnoid extends RenderHumanoid
|
|||
// public boolean canSneak() {
|
||||
// return false;
|
||||
// }
|
||||
|
||||
// public String getDefaultTexture()
|
||||
// {
|
||||
// return "textures/entity/npc/arachnoid.png";
|
||||
// }
|
||||
|
||||
// public int getCompressedSize() {
|
||||
// return super.getCompressedSize() + 2616;
|
||||
|
|
|
@ -12,7 +12,7 @@ import common.util.ExtMath;
|
|||
|
||||
public class RenderArrow extends Render<EntityArrow>
|
||||
{
|
||||
private static final String arrowTextures = "textures/entity/arrow.png";
|
||||
private static final String arrowTextures = "textures/object/arrow.png";
|
||||
|
||||
public RenderArrow(RenderManager renderManagerIn)
|
||||
{
|
||||
|
|
|
@ -9,7 +9,7 @@ import common.util.ExtMath;
|
|||
|
||||
public class RenderBat extends RenderLiving<EntityBat>
|
||||
{
|
||||
private static final String batTextures = "textures/entity/bat.png";
|
||||
private static final String batTextures = "textures/creature/bat.png";
|
||||
|
||||
public RenderBat(RenderManager renderManagerIn)
|
||||
{
|
||||
|
|
|
@ -10,7 +10,7 @@ import common.util.ExtMath;
|
|||
|
||||
public class RenderBoat extends Render<EntityBoat>
|
||||
{
|
||||
private static final String boatTextures = "textures/entity/boat.png";
|
||||
private static final String boatTextures = "textures/object/boat.png";
|
||||
|
||||
/** instance of ModelBoat for rendering */
|
||||
protected ModelBase modelBoat = new ModelBoat();
|
||||
|
|
|
@ -11,7 +11,7 @@ import common.entity.projectile.EntityBullet;
|
|||
|
||||
public class RenderBullet extends Render<EntityBullet>
|
||||
{
|
||||
private static final String bulletTextures = "textures/entity/bullet.png";
|
||||
private static final String bulletTextures = "textures/object/bullet.png";
|
||||
|
||||
public RenderBullet(RenderManager renderManagerIn)
|
||||
{
|
||||
|
|
56
client/src/main/java/client/renderer/entity/RenderCat.java
Executable file
|
@ -0,0 +1,56 @@
|
|||
package client.renderer.entity;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import client.renderer.model.ModelBase;
|
||||
import common.entity.animal.EntityCat;
|
||||
|
||||
|
||||
public class RenderCat extends RenderLiving<EntityCat>
|
||||
{
|
||||
private static final String TEXTURE_BLACK = "textures/creature/cat_black.png";
|
||||
private static final String TEXTURE_WILD = "textures/creature/cat_wild.png";
|
||||
private static final String TEXTURE_RED = "textures/creature/cat_red.png";
|
||||
private static final String TEXTURE_SIAMESE = "textures/creature/cat_siamese.png";
|
||||
|
||||
public RenderCat(RenderManager renderManagerIn, ModelBase modelBaseIn)
|
||||
{
|
||||
super(renderManagerIn, modelBaseIn);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture.
|
||||
*/
|
||||
protected String getEntityTexture(EntityCat entity)
|
||||
{
|
||||
switch (entity.getTameSkin())
|
||||
{
|
||||
case 0:
|
||||
default:
|
||||
return TEXTURE_WILD;
|
||||
|
||||
case 1:
|
||||
return TEXTURE_BLACK;
|
||||
|
||||
case 2:
|
||||
return TEXTURE_RED;
|
||||
|
||||
case 3:
|
||||
return TEXTURE_SIAMESE;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Allows the render to do any OpenGL state modifications necessary before the model is rendered. Args:
|
||||
* entityLiving, partialTickTime
|
||||
*/
|
||||
protected void preRenderCallback(EntityCat entitylivingbaseIn, float partialTickTime)
|
||||
{
|
||||
super.preRenderCallback(entitylivingbaseIn, partialTickTime);
|
||||
|
||||
if (entitylivingbaseIn.isTamed())
|
||||
{
|
||||
GL11.glScalef(0.8F, 0.8F, 0.8F);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -7,7 +7,7 @@ import common.util.ExtMath;
|
|||
|
||||
public class RenderChicken extends RenderLiving<EntityChicken>
|
||||
{
|
||||
private static final String chickenTextures = "textures/entity/chicken.png";
|
||||
private static final String chickenTextures = "textures/creature/chicken.png";
|
||||
|
||||
public RenderChicken(RenderManager renderManagerIn, ModelBase modelBaseIn)
|
||||
{
|
||||
|
|
|
@ -6,7 +6,7 @@ import common.entity.animal.EntityCow;
|
|||
|
||||
public class RenderCow extends RenderLiving<EntityCow>
|
||||
{
|
||||
private static final String cowTextures = "textures/entity/cow.png";
|
||||
private static final String cowTextures = "textures/creature/cow.png";
|
||||
|
||||
public RenderCow(RenderManager renderManagerIn, ModelBase modelBaseIn)
|
||||
{
|
||||
|
|
|
@ -10,7 +10,7 @@ import common.util.ExtMath;
|
|||
|
||||
public class RenderCrystal extends Render<EntityCrystal>
|
||||
{
|
||||
private static final String crystalTextures = "textures/entity/crystal.png";
|
||||
private static final String crystalTextures = "textures/object/crystal.png";
|
||||
|
||||
private ModelBase modelCrystal = new ModelCrystal(0.0F, false);
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ import common.util.ExtMath;
|
|||
|
||||
public class RenderDragon extends RenderLiving<EntityDragon>
|
||||
{
|
||||
private static final String enderDragonTextures = "textures/entity/dragon.png";
|
||||
private static final String enderDragonTextures = "textures/creature/dragon.png";
|
||||
|
||||
/** An instance of the dragon model in RenderDragon */
|
||||
protected ModelDragon modelDragon;
|
||||
|
|
|
@ -13,7 +13,7 @@ import common.util.Vec3;
|
|||
|
||||
public class RenderFish extends Render<EntityHook>
|
||||
{
|
||||
private static final String TEXTURE = "textures/entity/hook.png";
|
||||
private static final String TEXTURE = "textures/object/hook.png";
|
||||
|
||||
public RenderFish(RenderManager renderManagerIn)
|
||||
{
|
||||
|
|
|
@ -9,8 +9,8 @@ import common.entity.projectile.EntityBox;
|
|||
|
||||
public class RenderFlyingBox extends Render<EntityBox>
|
||||
{
|
||||
private static final String BOX_TEX = "textures/entity/box.png";
|
||||
private static final String BRITTLE_TEX = "textures/entity/box_brittle.png";
|
||||
private static final String BOX_TEX = "textures/object/box.png";
|
||||
private static final String BRITTLE_TEX = "textures/object/box_brittle.png";
|
||||
private final ModelHead boxModel = new ModelHead();
|
||||
|
||||
public RenderFlyingBox(RenderManager renderManagerIn)
|
||||
|
|
|
@ -4,7 +4,7 @@ import client.renderer.model.ModelBase;
|
|||
import common.entity.animal.EntityFox;
|
||||
|
||||
public class RenderFox extends RenderLiving<EntityFox> {
|
||||
private static final String FOX_TEXTURE = "textures/entity/fox.png";
|
||||
private static final String FOX_TEXTURE = "textures/creature/fox.png";
|
||||
|
||||
public RenderFox(RenderManager renderManagerIn, ModelBase modelBaseIn) {
|
||||
super(renderManagerIn, modelBaseIn);
|
||||
|
|
|
@ -13,11 +13,9 @@ import common.entity.animal.EntityHorse;
|
|||
public class RenderHorse extends RenderLiving<EntityHorse>
|
||||
{
|
||||
private static final Set<String> loaded = Sets.<String>newHashSet();
|
||||
private static final String whiteHorseTextures = "textures/entity/horse_white.png";
|
||||
private static final String muleTextures = "textures/entity/mule.png";
|
||||
private static final String donkeyTextures = "textures/entity/donkey.png";
|
||||
private static final String zombieHorseTextures = "textures/entity/horse_zombie.png";
|
||||
private static final String skeletonHorseTextures = "textures/entity/horse_skeleton.png";
|
||||
private static final String whiteHorseTextures = "textures/creature/horse_white.png";
|
||||
private static final String muleTextures = "textures/creature/mule.png";
|
||||
private static final String donkeyTextures = "textures/creature/donkey.png";
|
||||
|
||||
public RenderHorse(RenderManager rendermanagerIn, ModelHorse model)
|
||||
{
|
||||
|
@ -64,12 +62,6 @@ public class RenderHorse extends RenderLiving<EntityHorse>
|
|||
|
||||
case 2:
|
||||
return muleTextures;
|
||||
|
||||
case 3:
|
||||
return zombieHorseTextures;
|
||||
|
||||
case 4:
|
||||
return skeletonHorseTextures;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
@ -9,7 +9,7 @@ import common.entity.item.EntityLeashKnot;
|
|||
|
||||
public class RenderLeashKnot extends Render<EntityLeashKnot>
|
||||
{
|
||||
private static final String leashKnotTextures = "textures/entity/lead_knot.png";
|
||||
private static final String leashKnotTextures = "textures/object/lead_knot.png";
|
||||
private ModelLeashKnot leashKnotModel = new ModelLeashKnot();
|
||||
|
||||
public RenderLeashKnot(RenderManager renderManagerIn)
|
||||
|
|
|
@ -14,7 +14,7 @@ import common.world.State;
|
|||
|
||||
public class RenderMinecart<T extends EntityCart> extends Render<T>
|
||||
{
|
||||
private static final String minecartTextures = "textures/entity/minecart.png";
|
||||
private static final String minecartTextures = "textures/object/minecart.png";
|
||||
|
||||
/** instance of ModelMinecart for rendering */
|
||||
protected ModelBase modelMinecart = new ModelMinecart();
|
||||
|
|
|
@ -3,7 +3,7 @@ package client.renderer.entity;
|
|||
import common.entity.projectile.EntityBullet;
|
||||
|
||||
public class RenderMissile extends RenderBullet {
|
||||
private static final String MISSILE_TEXTURE = "textures/entity/missile.png";
|
||||
private static final String MISSILE_TEXTURE = "textures/object/missile.png";
|
||||
|
||||
public RenderMissile(RenderManager renderManagerIn) {
|
||||
super(renderManagerIn);
|
||||
|
|
|
@ -1,25 +0,0 @@
|
|||
package client.renderer.entity;
|
||||
|
||||
import client.renderer.layers.LayerMooshroomMushroom;
|
||||
import client.renderer.model.ModelBase;
|
||||
import common.entity.animal.EntityMooshroom;
|
||||
|
||||
|
||||
public class RenderMooshroom extends RenderLiving<EntityMooshroom>
|
||||
{
|
||||
private static final String mooshroomTextures = "textures/entity/mooshroom.png";
|
||||
|
||||
public RenderMooshroom(RenderManager renderManagerIn, ModelBase modelBaseIn)
|
||||
{
|
||||
super(renderManagerIn, modelBaseIn);
|
||||
this.addLayer(new LayerMooshroomMushroom(this));
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture.
|
||||
*/
|
||||
protected String getEntityTexture(EntityMooshroom entity)
|
||||
{
|
||||
return mooshroomTextures;
|
||||
}
|
||||
}
|
|
@ -6,7 +6,7 @@ import common.entity.animal.EntityMouse;
|
|||
|
||||
public class RenderMouse extends RenderLiving<EntityMouse>
|
||||
{
|
||||
private static final String mouseTextures = "textures/entity/mouse.png";
|
||||
private static final String mouseTextures = "textures/creature/mouse.png";
|
||||
|
||||
public RenderMouse(RenderManager renderManagerIn, ModelBase modelBaseIn)
|
||||
{
|
||||
|
|
|
@ -1,56 +0,0 @@
|
|||
package client.renderer.entity;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import client.renderer.model.ModelBase;
|
||||
import common.entity.animal.EntityOcelot;
|
||||
|
||||
|
||||
public class RenderOcelot extends RenderLiving<EntityOcelot>
|
||||
{
|
||||
private static final String blackOcelotTextures = "textures/entity/cat_black.png";
|
||||
private static final String ocelotTextures = "textures/entity/cat_ocelot.png";
|
||||
private static final String redOcelotTextures = "textures/entity/cat_red.png";
|
||||
private static final String siameseOcelotTextures = "textures/entity/cat_siamese.png";
|
||||
|
||||
public RenderOcelot(RenderManager renderManagerIn, ModelBase modelBaseIn)
|
||||
{
|
||||
super(renderManagerIn, modelBaseIn);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture.
|
||||
*/
|
||||
protected String getEntityTexture(EntityOcelot entity)
|
||||
{
|
||||
switch (entity.getTameSkin())
|
||||
{
|
||||
case 0:
|
||||
default:
|
||||
return ocelotTextures;
|
||||
|
||||
case 1:
|
||||
return blackOcelotTextures;
|
||||
|
||||
case 2:
|
||||
return redOcelotTextures;
|
||||
|
||||
case 3:
|
||||
return siameseOcelotTextures;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Allows the render to do any OpenGL state modifications necessary before the model is rendered. Args:
|
||||
* entityLiving, partialTickTime
|
||||
*/
|
||||
protected void preRenderCallback(EntityOcelot entitylivingbaseIn, float partialTickTime)
|
||||
{
|
||||
super.preRenderCallback(entitylivingbaseIn, partialTickTime);
|
||||
|
||||
if (entitylivingbaseIn.isTamed())
|
||||
{
|
||||
GL11.glScalef(0.8F, 0.8F, 0.8F);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -7,7 +7,7 @@ import common.entity.animal.EntityPig;
|
|||
|
||||
public class RenderPig extends RenderLiving<EntityPig>
|
||||
{
|
||||
private static final String pigTextures = "textures/entity/pig.png";
|
||||
private static final String pigTextures = "textures/creature/pig.png";
|
||||
|
||||
public RenderPig(RenderManager renderManagerIn, ModelBase modelBaseIn)
|
||||
{
|
||||
|
|
|
@ -7,19 +7,19 @@ import common.entity.animal.EntityRabbit;
|
|||
|
||||
public class RenderRabbit extends RenderLiving<EntityRabbit> {
|
||||
private static final String[] TYPES = new String[] {
|
||||
"textures/entity/rabbit_brown.png",
|
||||
"textures/entity/rabbit_white.png",
|
||||
"textures/entity/rabbit_black.png",
|
||||
"textures/entity/rabbit_white_splotched.png",
|
||||
"textures/entity/rabbit_gold.png",
|
||||
"textures/entity/rabbit_salt.png",
|
||||
"textures/entity/rabbit_gray.png",
|
||||
"textures/entity/rabbit_dark_gray.png",
|
||||
"textures/entity/rabbit_dark.png",
|
||||
"textures/entity/rabbit_black_splotched.png"
|
||||
"textures/creature/rabbit_brown.png",
|
||||
"textures/creature/rabbit_white.png",
|
||||
"textures/creature/rabbit_black.png",
|
||||
"textures/creature/rabbit_white_splotched.png",
|
||||
"textures/creature/rabbit_gold.png",
|
||||
"textures/creature/rabbit_salt.png",
|
||||
"textures/creature/rabbit_gray.png",
|
||||
"textures/creature/rabbit_dark_gray.png",
|
||||
"textures/creature/rabbit_dark.png",
|
||||
"textures/creature/rabbit_black_splotched.png"
|
||||
};
|
||||
private static final String TOAST = "textures/entity/rabbit_toast.png";
|
||||
private static final String CAERBANNOG = "textures/entity/rabbit_caerbannog.png";
|
||||
private static final String HALF = "textures/creature/rabbit_half.png";
|
||||
private static final String EVIL = "textures/creature/rabbit_evil.png";
|
||||
|
||||
public RenderRabbit(RenderManager manager, ModelBase model) {
|
||||
super(manager, model);
|
||||
|
@ -27,11 +27,11 @@ public class RenderRabbit extends RenderLiving<EntityRabbit> {
|
|||
|
||||
protected String getEntityTexture(EntityRabbit entity) {
|
||||
String name = TextColor.stripCodes(entity.getCustomNameTag());
|
||||
if(name != null && name.equals("Toast"))
|
||||
return TOAST;
|
||||
if("Lola".equalsIgnoreCase(name) || "Lolo".equalsIgnoreCase(name))
|
||||
return HALF;
|
||||
int type = entity.getRabbitType();
|
||||
if(type == 99)
|
||||
return CAERBANNOG;
|
||||
return type >= 0 && type < TYPES.length ? TYPES[type] : TOAST;
|
||||
return EVIL;
|
||||
return type >= 0 && type < TYPES.length ? TYPES[type] : HALF;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@ import common.entity.animal.EntitySheep;
|
|||
|
||||
public class RenderSheep extends RenderLiving<EntitySheep>
|
||||
{
|
||||
private static final String shearedSheepTextures = "textures/entity/sheep.png";
|
||||
private static final String shearedSheepTextures = "textures/creature/sheep.png";
|
||||
|
||||
public RenderSheep(RenderManager renderManagerIn, ModelBase modelBaseIn)
|
||||
{
|
||||
|
|
|
@ -35,7 +35,7 @@ public class RenderSlime extends RenderNpc
|
|||
|
||||
public String getDefaultTexture()
|
||||
{
|
||||
return "textures/entity/slime.png";
|
||||
return "textures/npc/slime.png";
|
||||
}
|
||||
|
||||
// public int getCompressedSize() {
|
||||
|
|
|
@ -99,7 +99,7 @@ public class RenderSpaceMarine extends RenderNpc
|
|||
|
||||
public final String getDefaultTexture()
|
||||
{
|
||||
return "textures/entity/marine.png";
|
||||
return "textures/npc/marine.png";
|
||||
}
|
||||
|
||||
public void getSegments(TexList opaque, TexList alpha) {
|
||||
|
|
|
@ -1,44 +0,0 @@
|
|||
package client.renderer.entity;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import client.renderer.model.ModelBase;
|
||||
import common.entity.animal.EntitySquid;
|
||||
|
||||
|
||||
public class RenderSquid extends RenderLiving<EntitySquid>
|
||||
{
|
||||
private static final String squidTextures = "textures/entity/squid.png";
|
||||
|
||||
public RenderSquid(RenderManager renderManagerIn, ModelBase modelBaseIn)
|
||||
{
|
||||
super(renderManagerIn, modelBaseIn);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture.
|
||||
*/
|
||||
protected String getEntityTexture(EntitySquid entity)
|
||||
{
|
||||
return squidTextures;
|
||||
}
|
||||
|
||||
protected void rotateCorpse(EntitySquid bat, float p_77043_2_, float p_77043_3_, float partialTicks)
|
||||
{
|
||||
float f = bat.prevSquidPitch + (bat.squidPitch - bat.prevSquidPitch) * partialTicks;
|
||||
float f1 = bat.prevSquidYaw + (bat.squidYaw - bat.prevSquidYaw) * partialTicks;
|
||||
GL11.glTranslatef(0.0F, 0.5F, 0.0F);
|
||||
GL11.glRotatef(180.0F - p_77043_3_, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(f, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glRotatef(f1, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glTranslatef(0.0F, -1.2F, 0.0F);
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines what float the third param in setRotationAngles of ModelBase is
|
||||
*/
|
||||
protected float handleRotationFloat(EntitySquid livingBase, float partialTicks)
|
||||
{
|
||||
return livingBase.lastTentacleAngle + (livingBase.tentacleAngle - livingBase.lastTentacleAngle) * partialTicks;
|
||||
}
|
||||
}
|
|
@ -8,9 +8,9 @@ import common.entity.animal.EntityWolf;
|
|||
|
||||
public class RenderWolf extends RenderLiving<EntityWolf>
|
||||
{
|
||||
private static final String wolfTextures = "textures/entity/wolf.png";
|
||||
private static final String tamedWolfTextures = "textures/entity/wolf_tame.png";
|
||||
private static final String anrgyWolfTextures = "textures/entity/wolf_angry.png";
|
||||
private static final String wolfTextures = "textures/creature/wolf.png";
|
||||
private static final String tamedWolfTextures = "textures/creature/wolf_tame.png";
|
||||
private static final String anrgyWolfTextures = "textures/creature/wolf_angry.png";
|
||||
|
||||
public RenderWolf(RenderManager renderManagerIn, ModelBase modelBaseIn)
|
||||
{
|
||||
|
|
69
client/src/main/java/client/renderer/entity/RenderXp.java
Executable file
|
@ -0,0 +1,69 @@
|
|||
package client.renderer.entity;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL13;
|
||||
|
||||
import client.renderer.DefaultVertexFormats;
|
||||
import client.renderer.GlState;
|
||||
import client.renderer.RenderBuffer;
|
||||
import client.renderer.Tessellator;
|
||||
import common.entity.item.EntityXp;
|
||||
import common.util.ExtMath;
|
||||
|
||||
public class RenderXp extends Render<EntityXp> {
|
||||
private static final String TEXTURE = "textures/object/experience.png";
|
||||
|
||||
public RenderXp(RenderManager renderManagerIn) {
|
||||
super(renderManagerIn);
|
||||
}
|
||||
|
||||
public void doRender(EntityXp entity, double x, double y, double z, float partial) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float)x, (float)y, (float)z);
|
||||
this.bindEntityTexture(entity);
|
||||
int value = entity.getXpValue();
|
||||
float u1 = (float)(value % 4 * 16 + 0) / 64.0F;
|
||||
float u2 = (float)(value % 4 * 16 + 16) / 64.0F;
|
||||
float v1 = (float)(value / 4 * 16 + 0) / 64.0F;
|
||||
float v2 = (float)(value / 4 * 16 + 16) / 64.0F;
|
||||
float bx = 1.0F;
|
||||
float dx = 0.5F;
|
||||
float dy = 0.25F;
|
||||
int light = entity.getBrightnessForRender(partial);
|
||||
int block = light % 65536;
|
||||
int sky = light / 65536;
|
||||
GL13.glMultiTexCoord2f(GL13.GL_TEXTURE1, (float)block / 1.0F, (float)sky / 1.0F);
|
||||
GlState.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
float color = ((float)entity.xpColor + partial) / 2.0F;
|
||||
int r = (int)((ExtMath.sin(color + 0.0F) + 1.0F) * 0.5F * 255.0F);
|
||||
int g = 255;
|
||||
int b = (int)((ExtMath.sin(color + 4.1887903F) + 1.0F) * 0.1F * 255.0F);
|
||||
GL11.glRotatef(180.0F - this.renderManager.playerViewY, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(-this.renderManager.playerViewX, 1.0F, 0.0F, 0.0F);
|
||||
float size = 0.3F;
|
||||
GL11.glScalef(size, size, size);
|
||||
RenderBuffer rb = Tessellator.getBuffer();
|
||||
rb.begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION_TEX_COLOR_NORMAL);
|
||||
rb.pos((double)(0.0F - dx), (double)(0.0F - dy), 0.0D).tex((double)u1, (double)v2).color(r, g, b, 128).normal(0.0F, 1.0F, 0.0F)
|
||||
.endVertex();
|
||||
rb.pos((double)(bx - dx), (double)(0.0F - dy), 0.0D).tex((double)u2, (double)v2).color(r, g, b, 128).normal(0.0F, 1.0F, 0.0F)
|
||||
.endVertex();
|
||||
rb.pos((double)(bx - dx), (double)(1.0F - dy), 0.0D).tex((double)u2, (double)v1).color(r, g, b, 128).normal(0.0F, 1.0F, 0.0F)
|
||||
.endVertex();
|
||||
rb.pos((double)(0.0F - dx), (double)(1.0F - dy), 0.0D).tex((double)u1, (double)v1).color(r, g, b, 128).normal(0.0F, 1.0F, 0.0F)
|
||||
.endVertex();
|
||||
Tessellator.draw();
|
||||
GlState.disableBlend();
|
||||
GlState.disableRescaleNormal();
|
||||
GL11.glPopMatrix();
|
||||
super.doRender(entity, x, y, z, partial);
|
||||
}
|
||||
|
||||
protected String getEntityTexture(EntityXp entity) {
|
||||
return TEXTURE;
|
||||
}
|
||||
|
||||
protected void renderLivingLabel(EntityXp entityIn, String str, double x, double y, double z, int maxDistance) {
|
||||
super.renderLivingLabel(entityIn, str, x, y - 0.5, z, maxDistance);
|
||||
}
|
||||
}
|
|
@ -1,85 +0,0 @@
|
|||
package client.renderer.entity;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL13;
|
||||
|
||||
import client.renderer.DefaultVertexFormats;
|
||||
import client.renderer.GlState;
|
||||
import client.renderer.RenderBuffer;
|
||||
import client.renderer.Tessellator;
|
||||
import common.entity.item.EntityXp;
|
||||
import common.util.ExtMath;
|
||||
|
||||
|
||||
public class RenderXpOrb extends Render<EntityXp>
|
||||
{
|
||||
private static final String experienceOrbTextures = "textures/entity/experience_orb.png";
|
||||
|
||||
public RenderXpOrb(RenderManager renderManagerIn)
|
||||
{
|
||||
super(renderManagerIn);
|
||||
// this.shadowSize = 0.15F;
|
||||
// this.shadowOpaque = 0.75F;
|
||||
}
|
||||
|
||||
/**
|
||||
* Renders the desired {@code T} type Entity.
|
||||
*/
|
||||
public void doRender(EntityXp entity, double x, double y, double z, float partialTicks)
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float)x, (float)y, (float)z);
|
||||
this.bindEntityTexture(entity);
|
||||
int i = entity.getXpValue();
|
||||
float f = (float)(i % 4 * 16 + 0) / 64.0F;
|
||||
float f1 = (float)(i % 4 * 16 + 16) / 64.0F;
|
||||
float f2 = (float)(i / 4 * 16 + 0) / 64.0F;
|
||||
float f3 = (float)(i / 4 * 16 + 16) / 64.0F;
|
||||
float f4 = 1.0F;
|
||||
float f5 = 0.5F;
|
||||
float f6 = 0.25F;
|
||||
int j = entity.getBrightnessForRender(partialTicks);
|
||||
int k = j % 65536;
|
||||
int l = j / 65536;
|
||||
GL13.glMultiTexCoord2f(GL13.GL_TEXTURE1, (float)k / 1.0F, (float)l / 1.0F);
|
||||
GlState.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
float f8 = 255.0F;
|
||||
float f9 = ((float)entity.xpColor + partialTicks) / 2.0F;
|
||||
l = (int)((ExtMath.sin(f9 + 0.0F) + 1.0F) * 0.5F * 255.0F);
|
||||
int i1 = 255;
|
||||
int j1 = (int)((ExtMath.sin(f9 + 4.1887903F) + 1.0F) * 0.1F * 255.0F);
|
||||
GL11.glRotatef(180.0F - this.renderManager.playerViewY, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(-this.renderManager.playerViewX, 1.0F, 0.0F, 0.0F);
|
||||
float f7 = 0.3F;
|
||||
GL11.glScalef(0.3F, 0.3F, 0.3F);
|
||||
// Tessellator tessellator = Tessellator.getInstance();
|
||||
RenderBuffer worldrenderer = Tessellator.getBuffer();
|
||||
worldrenderer.begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION_TEX_COLOR_NORMAL);
|
||||
worldrenderer.pos((double)(0.0F - f5), (double)(0.0F - f6), 0.0D).tex((double)f, (double)f3).color(l, 255, j1, 128).normal(0.0F, 1.0F, 0.0F).endVertex();
|
||||
worldrenderer.pos((double)(f4 - f5), (double)(0.0F - f6), 0.0D).tex((double)f1, (double)f3).color(l, 255, j1, 128).normal(0.0F, 1.0F, 0.0F).endVertex();
|
||||
worldrenderer.pos((double)(f4 - f5), (double)(1.0F - f6), 0.0D).tex((double)f1, (double)f2).color(l, 255, j1, 128).normal(0.0F, 1.0F, 0.0F).endVertex();
|
||||
worldrenderer.pos((double)(0.0F - f5), (double)(1.0F - f6), 0.0D).tex((double)f, (double)f2).color(l, 255, j1, 128).normal(0.0F, 1.0F, 0.0F).endVertex();
|
||||
Tessellator.draw();
|
||||
GlState.disableBlend();
|
||||
GlState.disableRescaleNormal();
|
||||
GL11.glPopMatrix();
|
||||
super.doRender(entity, x, y, z, partialTicks);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture.
|
||||
*/
|
||||
protected String getEntityTexture(EntityXp entity)
|
||||
{
|
||||
return experienceOrbTextures;
|
||||
}
|
||||
|
||||
// protected boolean canRenderName(EntityXp entity)
|
||||
// {
|
||||
// return entity.hasCustomName() || super.canRenderName(entity);
|
||||
// }
|
||||
|
||||
protected void renderLivingLabel(EntityXp entityIn, String str, double x, double y, double z, int maxDistance) {
|
||||
super.renderLivingLabel(entityIn, str, x, y - 0.5, z, maxDistance);
|
||||
}
|
||||
}
|
|
@ -28,7 +28,7 @@ import common.util.ExtMath;
|
|||
public abstract class RendererLivingEntity<T extends EntityLiving> extends Render<T>
|
||||
{
|
||||
private static final DynamicTexture textureBrightness = new DynamicTexture(16, 16);
|
||||
private static final String crystalBeamTextures = "textures/entity/crystal_beam.png";
|
||||
private static final String crystalBeamTextures = "textures/world/beam.png";
|
||||
protected ModelBase mainModel;
|
||||
protected FloatBuffer brightnessBuffer = ByteBuffer.allocateDirect(4 << 2).order(ByteOrder.nativeOrder()).asFloatBuffer();
|
||||
protected List<LayerRenderer<T>> layerRenderers = Lists.<LayerRenderer<T>>newArrayList();
|
||||
|
|
|
@ -5,7 +5,6 @@ import org.lwjgl.opengl.GL11;
|
|||
import client.renderer.GlState;
|
||||
import client.renderer.entity.RenderHumanoid;
|
||||
import client.renderer.model.ModelRenderer;
|
||||
import client.renderer.texture.EntityTexManager;
|
||||
import common.entity.npc.EntityNPC;
|
||||
import common.util.ExtMath;
|
||||
|
||||
|
@ -29,9 +28,9 @@ public class LayerCape implements LayerRenderer<EntityNPC>
|
|||
{
|
||||
if(/* !entitylivingbaseIn.isInvisible() && */ // entitylivingbaseIn.isWearing(ModelPart.CAPE)
|
||||
// &&
|
||||
EntityTexManager.getCape(entitylivingbaseIn) != null) {
|
||||
entitylivingbaseIn.getCape() != null) {
|
||||
GlState.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
this.renderer.bindTexture(EntityTexManager.getCape(entitylivingbaseIn));
|
||||
this.renderer.bindTexture("textures/npc/cape_" + entitylivingbaseIn.getCape() + ".png");
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(0.0F, 0.0F, 0.125F);
|
||||
if(entitylivingbaseIn.isPlayer()) {
|
||||
|
|
|
@ -10,7 +10,7 @@ import common.entity.npc.EntityNPC;
|
|||
|
||||
public class LayerCharge implements LayerRenderer<EntityNPC>
|
||||
{
|
||||
private static final String LIGHTNING_TEXTURE = "textures/entity/charge.png";
|
||||
private static final String LIGHTNING_TEXTURE = "textures/npc/charge.png";
|
||||
|
||||
private final RenderHumanoid main;
|
||||
private final ModelCharge charge = new ModelCharge(2.0F);
|
||||
|
|
|
@ -10,7 +10,7 @@ import common.entity.animal.EntityDragon;
|
|||
|
||||
public class LayerEnderDragonEyes implements LayerRenderer<EntityDragon>
|
||||
{
|
||||
private static final String TEXTURE = "textures/entity/dragon_eyes.png";
|
||||
private static final String TEXTURE = "textures/creature/dragon_eyes.png";
|
||||
private final RenderDragon dragonRenderer;
|
||||
|
||||
public LayerEnderDragonEyes(RenderDragon dragonRendererIn)
|
||||
|
|
|
@ -58,11 +58,10 @@ public class LayerExtra implements LayerRenderer<EntityNPC>
|
|||
|
||||
public void doRenderLayer(EntityNPC entity, float p_177141_2_, float p_177141_3_, float partialTicks, float p_177141_5_, float p_177141_6_, float p_177141_7_, float scale)
|
||||
{
|
||||
EntityNPC extended = entity;
|
||||
// if (!entity.isInvisible())
|
||||
// {
|
||||
GlState.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
Client.CLIENT.getTextureManager().bindTexture(EntityTexManager.getSkin(extended));
|
||||
Client.CLIENT.getTextureManager().bindTexture(EntityTexManager.getSkin(entity));
|
||||
GL11.glPushMatrix();
|
||||
|
||||
if (entity.isSneakingVisually())
|
||||
|
@ -81,7 +80,7 @@ public class LayerExtra implements LayerRenderer<EntityNPC>
|
|||
GL11.glPushMatrix();
|
||||
this.model.bipedBody.postRender(0.0625F);
|
||||
for(ModelRenderer model : this.wing) {
|
||||
if(extended.hasDualWings()) {
|
||||
if(entity.hasDualWings()) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glRotatef(model.rotateAngleY < 0.0f ? -10.0f : 10.0f, 0.0f, 1.0f, 0.0f);
|
||||
GL11.glTranslatef(0.0f, 0.125f, -0.0625f);
|
||||
|
|
|
@ -1,63 +0,0 @@
|
|||
package client.renderer.layers;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import client.Client;
|
||||
import client.renderer.BlockRenderer;
|
||||
import client.renderer.GlState;
|
||||
import client.renderer.entity.RenderMooshroom;
|
||||
import client.renderer.model.ModelQuadruped;
|
||||
import client.renderer.texture.TextureMap;
|
||||
import common.entity.animal.EntityMooshroom;
|
||||
import common.init.Blocks;
|
||||
|
||||
public class LayerMooshroomMushroom implements LayerRenderer<EntityMooshroom>
|
||||
{
|
||||
private final RenderMooshroom mooshroomRenderer;
|
||||
|
||||
public LayerMooshroomMushroom(RenderMooshroom mooshroomRendererIn)
|
||||
{
|
||||
this.mooshroomRenderer = mooshroomRendererIn;
|
||||
}
|
||||
|
||||
public void doRenderLayer(EntityMooshroom entitylivingbaseIn, float p_177141_2_, float p_177141_3_, float partialTicks, float p_177141_5_, float p_177141_6_, float p_177141_7_, float scale)
|
||||
{
|
||||
if (!entitylivingbaseIn.isChild()) // && !entitylivingbaseIn.isInvisible())
|
||||
{
|
||||
BlockRenderer blockrendererdispatcher = Client.CLIENT.getBlockRendererDispatcher();
|
||||
this.mooshroomRenderer.bindTexture(TextureMap.BLOCKS);
|
||||
GlState.enableCull();
|
||||
GlState.cullFace(GL11.GL_FRONT);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(1.0F, -1.0F, 1.0F);
|
||||
GL11.glTranslatef(0.2F, 0.35F, 0.5F);
|
||||
GL11.glRotatef(42.0F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(-0.5F, -0.5F, 0.5F);
|
||||
blockrendererdispatcher.renderBlockBrightness(Blocks.red_mushroom.getState(), 1.0F);
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(0.1F, 0.0F, -0.6F);
|
||||
GL11.glRotatef(42.0F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glTranslatef(-0.5F, -0.5F, 0.5F);
|
||||
blockrendererdispatcher.renderBlockBrightness(Blocks.red_mushroom.getState(), 1.0F);
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPushMatrix();
|
||||
((ModelQuadruped)this.mooshroomRenderer.getMainModel()).head.postRender(0.0625F);
|
||||
GL11.glScalef(1.0F, -1.0F, 1.0F);
|
||||
GL11.glTranslatef(0.0F, 0.7F, -0.2F);
|
||||
GL11.glRotatef(12.0F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glTranslatef(-0.5F, -0.5F, 0.5F);
|
||||
blockrendererdispatcher.renderBlockBrightness(Blocks.red_mushroom.getState(), 1.0F);
|
||||
GL11.glPopMatrix();
|
||||
GlState.cullFace(GL11.GL_BACK);
|
||||
GlState.disableCull();
|
||||
}
|
||||
}
|
||||
|
||||
public boolean shouldCombineTextures()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -8,7 +8,7 @@ import common.util.ExtMath;
|
|||
|
||||
public class LayerPowerRods implements LayerRenderer<EntityNPC>
|
||||
{
|
||||
private static final String ROD_TEXTURE = "textures/entity/power_rod.png";
|
||||
private static final String ROD_TEXTURE = "textures/npc/power_rod.png";
|
||||
|
||||
private final RenderHumanoid renderer;
|
||||
private ModelRenderer powerRod;
|
||||
|
|
|
@ -7,7 +7,7 @@ import common.entity.animal.EntityPig;
|
|||
|
||||
public class LayerSaddle implements LayerRenderer<EntityPig>
|
||||
{
|
||||
private static final String TEXTURE = "textures/entity/pig_saddle.png";
|
||||
private static final String TEXTURE = "textures/creature/pig_saddle.png";
|
||||
private final RenderPig pigRenderer;
|
||||
private final ModelPig pigModel = new ModelPig(0.5F);
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ import common.entity.animal.EntitySheep;
|
|||
|
||||
public class LayerSheepWool implements LayerRenderer<EntitySheep>
|
||||
{
|
||||
private static final String TEXTURE = "textures/entity/sheep_fur.png";
|
||||
private static final String TEXTURE = "textures/creature/sheep_fur.png";
|
||||
private final RenderSheep sheepRenderer;
|
||||
private final ModelSheep1 sheepModel = new ModelSheep1();
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ import common.entity.animal.EntityWolf;
|
|||
|
||||
public class LayerWolfCollar implements LayerRenderer<EntityWolf>
|
||||
{
|
||||
private static final String WOLF_COLLAR = "textures/entity/wolf_collar.png";
|
||||
private static final String WOLF_COLLAR = "textures/creature/wolf_collar.png";
|
||||
private final RenderWolf wolfRenderer;
|
||||
|
||||
public LayerWolfCollar(RenderWolf wolfRendererIn)
|
||||
|
|
205
client/src/main/java/client/renderer/model/ModelCat.java
Executable file
|
@ -0,0 +1,205 @@
|
|||
package client.renderer.model;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import common.entity.Entity;
|
||||
import common.entity.animal.EntityCat;
|
||||
import common.entity.types.EntityLiving;
|
||||
import common.util.ExtMath;
|
||||
|
||||
public class ModelCat extends ModelBase
|
||||
{
|
||||
ModelRenderer backLeftLeg;
|
||||
ModelRenderer backRightLeg;
|
||||
ModelRenderer frontLeftLeg;
|
||||
ModelRenderer frontRightLeg;
|
||||
ModelRenderer tail;
|
||||
ModelRenderer tail2;
|
||||
ModelRenderer head;
|
||||
ModelRenderer body;
|
||||
int field_78163_i = 1;
|
||||
|
||||
public ModelCat()
|
||||
{
|
||||
this.setTextureOffset("head.main", 0, 0);
|
||||
this.setTextureOffset("head.nose", 0, 24);
|
||||
this.setTextureOffset("head.ear1", 0, 10);
|
||||
this.setTextureOffset("head.ear2", 6, 10);
|
||||
this.head = new ModelRenderer(this, "head");
|
||||
this.head.addBox("main", -2.5F, -2.0F, -3.0F, 5, 4, 5);
|
||||
this.head.addBox("nose", -1.5F, 0.0F, -4.0F, 3, 2, 2);
|
||||
this.head.addBox("ear1", -2.0F, -3.0F, 0.0F, 1, 1, 2);
|
||||
this.head.addBox("ear2", 1.0F, -3.0F, 0.0F, 1, 1, 2);
|
||||
this.head.setRotationPoint(0.0F, 15.0F, -9.0F);
|
||||
this.body = new ModelRenderer(this, 20, 0);
|
||||
this.body.addBox(-2.0F, 3.0F, -8.0F, 4, 16, 6, 0.0F);
|
||||
this.body.setRotationPoint(0.0F, 12.0F, -10.0F);
|
||||
this.tail = new ModelRenderer(this, 0, 15);
|
||||
this.tail.addBox(-0.5F, 0.0F, 0.0F, 1, 8, 1);
|
||||
this.tail.rotateAngleX = 0.9F;
|
||||
this.tail.setRotationPoint(0.0F, 15.0F, 8.0F);
|
||||
this.tail2 = new ModelRenderer(this, 4, 15);
|
||||
this.tail2.addBox(-0.5F, 0.0F, 0.0F, 1, 8, 1);
|
||||
this.tail2.setRotationPoint(0.0F, 20.0F, 14.0F);
|
||||
this.backLeftLeg = new ModelRenderer(this, 8, 13);
|
||||
this.backLeftLeg.addBox(-1.0F, 0.0F, 1.0F, 2, 6, 2);
|
||||
this.backLeftLeg.setRotationPoint(1.1F, 18.0F, 5.0F);
|
||||
this.backRightLeg = new ModelRenderer(this, 8, 13);
|
||||
this.backRightLeg.addBox(-1.0F, 0.0F, 1.0F, 2, 6, 2);
|
||||
this.backRightLeg.setRotationPoint(-1.1F, 18.0F, 5.0F);
|
||||
this.frontLeftLeg = new ModelRenderer(this, 40, 0);
|
||||
this.frontLeftLeg.addBox(-1.0F, 0.0F, 0.0F, 2, 10, 2);
|
||||
this.frontLeftLeg.setRotationPoint(1.2F, 13.8F, -5.0F);
|
||||
this.frontRightLeg = new ModelRenderer(this, 40, 0);
|
||||
this.frontRightLeg.addBox(-1.0F, 0.0F, 0.0F, 2, 10, 2);
|
||||
this.frontRightLeg.setRotationPoint(-1.2F, 13.8F, -5.0F);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the models various rotation angles then renders the model.
|
||||
*/
|
||||
public void render(Entity entityIn, float p_78088_2_, float p_78088_3_, float p_78088_4_, float p_78088_5_, float p_78088_6_, float scale)
|
||||
{
|
||||
this.setRotationAngles(p_78088_2_, p_78088_3_, p_78088_4_, p_78088_5_, p_78088_6_, scale, entityIn);
|
||||
|
||||
if (this.isChild)
|
||||
{
|
||||
float f = 2.0F;
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(1.5F / f, 1.5F / f, 1.5F / f);
|
||||
GL11.glTranslatef(0.0F, 10.0F * scale, 4.0F * scale);
|
||||
this.head.render(scale);
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(1.0F / f, 1.0F / f, 1.0F / f);
|
||||
GL11.glTranslatef(0.0F, 24.0F * scale, 0.0F);
|
||||
this.body.render(scale);
|
||||
this.backLeftLeg.render(scale);
|
||||
this.backRightLeg.render(scale);
|
||||
this.frontLeftLeg.render(scale);
|
||||
this.frontRightLeg.render(scale);
|
||||
this.tail.render(scale);
|
||||
this.tail2.render(scale);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
else
|
||||
{
|
||||
this.head.render(scale);
|
||||
this.body.render(scale);
|
||||
this.tail.render(scale);
|
||||
this.tail2.render(scale);
|
||||
this.backLeftLeg.render(scale);
|
||||
this.backRightLeg.render(scale);
|
||||
this.frontLeftLeg.render(scale);
|
||||
this.frontRightLeg.render(scale);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the model's various rotation angles. For bipeds, par1 and par2 are used for animating the movement of arms
|
||||
* and legs, where par1 represents the time(so that arms and legs swing back and forth) and par2 represents how
|
||||
* "far" arms and legs can swing at most.
|
||||
*/
|
||||
public void setRotationAngles(float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor, Entity entityIn)
|
||||
{
|
||||
this.head.rotateAngleX = headPitch / (180F / (float)Math.PI);
|
||||
this.head.rotateAngleY = netHeadYaw / (180F / (float)Math.PI);
|
||||
|
||||
if (this.field_78163_i != 3)
|
||||
{
|
||||
this.body.rotateAngleX = ((float)Math.PI / 2F);
|
||||
|
||||
if (this.field_78163_i == 2)
|
||||
{
|
||||
this.backLeftLeg.rotateAngleX = ExtMath.cos(limbSwing * 0.6662F) * 1.0F * limbSwingAmount;
|
||||
this.backRightLeg.rotateAngleX = ExtMath.cos(limbSwing * 0.6662F + 0.3F) * 1.0F * limbSwingAmount;
|
||||
this.frontLeftLeg.rotateAngleX = ExtMath.cos(limbSwing * 0.6662F + (float)Math.PI + 0.3F) * 1.0F * limbSwingAmount;
|
||||
this.frontRightLeg.rotateAngleX = ExtMath.cos(limbSwing * 0.6662F + (float)Math.PI) * 1.0F * limbSwingAmount;
|
||||
this.tail2.rotateAngleX = 1.7278761F + ((float)Math.PI / 10F) * ExtMath.cos(limbSwing) * limbSwingAmount;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.backLeftLeg.rotateAngleX = ExtMath.cos(limbSwing * 0.6662F) * 1.0F * limbSwingAmount;
|
||||
this.backRightLeg.rotateAngleX = ExtMath.cos(limbSwing * 0.6662F + (float)Math.PI) * 1.0F * limbSwingAmount;
|
||||
this.frontLeftLeg.rotateAngleX = ExtMath.cos(limbSwing * 0.6662F + (float)Math.PI) * 1.0F * limbSwingAmount;
|
||||
this.frontRightLeg.rotateAngleX = ExtMath.cos(limbSwing * 0.6662F) * 1.0F * limbSwingAmount;
|
||||
|
||||
if (this.field_78163_i == 1)
|
||||
{
|
||||
this.tail2.rotateAngleX = 1.7278761F + ((float)Math.PI / 4F) * ExtMath.cos(limbSwing) * limbSwingAmount;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.tail2.rotateAngleX = 1.7278761F + 0.47123894F * ExtMath.cos(limbSwing) * limbSwingAmount;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Used for easily adding entity-dependent animations. The second and third float params here are the same second
|
||||
* and third as in the setRotationAngles method.
|
||||
*/
|
||||
public void setLivingAnimations(EntityLiving entitylivingbaseIn, float p_78086_2_, float p_78086_3_, float partialTickTime)
|
||||
{
|
||||
EntityCat cat = (EntityCat)entitylivingbaseIn;
|
||||
this.body.rotationPointY = 12.0F;
|
||||
this.body.rotationPointZ = -10.0F;
|
||||
this.head.rotationPointY = 15.0F;
|
||||
this.head.rotationPointZ = -9.0F;
|
||||
this.tail.rotationPointY = 15.0F;
|
||||
this.tail.rotationPointZ = 8.0F;
|
||||
this.tail2.rotationPointY = 20.0F;
|
||||
this.tail2.rotationPointZ = 14.0F;
|
||||
this.frontLeftLeg.rotationPointY = this.frontRightLeg.rotationPointY = 13.8F;
|
||||
this.frontLeftLeg.rotationPointZ = this.frontRightLeg.rotationPointZ = -5.0F;
|
||||
this.backLeftLeg.rotationPointY = this.backRightLeg.rotationPointY = 18.0F;
|
||||
this.backLeftLeg.rotationPointZ = this.backRightLeg.rotationPointZ = 5.0F;
|
||||
this.tail.rotateAngleX = 0.9F;
|
||||
|
||||
if (cat.isSneakingVisually())
|
||||
{
|
||||
++this.body.rotationPointY;
|
||||
this.head.rotationPointY += 2.0F;
|
||||
++this.tail.rotationPointY;
|
||||
this.tail2.rotationPointY += -4.0F;
|
||||
this.tail2.rotationPointZ += 2.0F;
|
||||
this.tail.rotateAngleX = ((float)Math.PI / 2F);
|
||||
this.tail2.rotateAngleX = ((float)Math.PI / 2F);
|
||||
this.field_78163_i = 0;
|
||||
}
|
||||
else if (cat.isSprinting())
|
||||
{
|
||||
this.tail2.rotationPointY = this.tail.rotationPointY;
|
||||
this.tail2.rotationPointZ += 2.0F;
|
||||
this.tail.rotateAngleX = ((float)Math.PI / 2F);
|
||||
this.tail2.rotateAngleX = ((float)Math.PI / 2F);
|
||||
this.field_78163_i = 2;
|
||||
}
|
||||
else if (cat.isSitting())
|
||||
{
|
||||
this.body.rotateAngleX = ((float)Math.PI / 4F);
|
||||
this.body.rotationPointY += -4.0F;
|
||||
this.body.rotationPointZ += 5.0F;
|
||||
this.head.rotationPointY += -3.3F;
|
||||
++this.head.rotationPointZ;
|
||||
this.tail.rotationPointY += 8.0F;
|
||||
this.tail.rotationPointZ += -2.0F;
|
||||
this.tail2.rotationPointY += 2.0F;
|
||||
this.tail2.rotationPointZ += -0.8F;
|
||||
this.tail.rotateAngleX = 1.7278761F;
|
||||
this.tail2.rotateAngleX = 2.670354F;
|
||||
this.frontLeftLeg.rotateAngleX = this.frontRightLeg.rotateAngleX = -0.15707964F;
|
||||
this.frontLeftLeg.rotationPointY = this.frontRightLeg.rotationPointY = 15.8F;
|
||||
this.frontLeftLeg.rotationPointZ = this.frontRightLeg.rotationPointZ = -7.0F;
|
||||
this.backLeftLeg.rotateAngleX = this.backRightLeg.rotateAngleX = -((float)Math.PI / 2F);
|
||||
this.backLeftLeg.rotationPointY = this.backRightLeg.rotationPointY = 21.0F;
|
||||
this.backLeftLeg.rotationPointZ = this.backRightLeg.rotationPointZ = 1.0F;
|
||||
this.field_78163_i = 3;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.field_78163_i = 1;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,220 +0,0 @@
|
|||
package client.renderer.model;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import common.entity.Entity;
|
||||
import common.entity.animal.EntityOcelot;
|
||||
import common.entity.types.EntityLiving;
|
||||
import common.util.ExtMath;
|
||||
|
||||
public class ModelOcelot extends ModelBase
|
||||
{
|
||||
/** The back left leg model for the Ocelot. */
|
||||
ModelRenderer ocelotBackLeftLeg;
|
||||
|
||||
/** The back right leg model for the Ocelot. */
|
||||
ModelRenderer ocelotBackRightLeg;
|
||||
|
||||
/** The front left leg model for the Ocelot. */
|
||||
ModelRenderer ocelotFrontLeftLeg;
|
||||
|
||||
/** The front right leg model for the Ocelot. */
|
||||
ModelRenderer ocelotFrontRightLeg;
|
||||
|
||||
/** The tail model for the Ocelot. */
|
||||
ModelRenderer ocelotTail;
|
||||
|
||||
/** The second part of tail model for the Ocelot. */
|
||||
ModelRenderer ocelotTail2;
|
||||
|
||||
/** The head model for the Ocelot. */
|
||||
ModelRenderer ocelotHead;
|
||||
|
||||
/** The body model for the Ocelot. */
|
||||
ModelRenderer ocelotBody;
|
||||
int field_78163_i = 1;
|
||||
|
||||
public ModelOcelot()
|
||||
{
|
||||
this.setTextureOffset("head.main", 0, 0);
|
||||
this.setTextureOffset("head.nose", 0, 24);
|
||||
this.setTextureOffset("head.ear1", 0, 10);
|
||||
this.setTextureOffset("head.ear2", 6, 10);
|
||||
this.ocelotHead = new ModelRenderer(this, "head");
|
||||
this.ocelotHead.addBox("main", -2.5F, -2.0F, -3.0F, 5, 4, 5);
|
||||
this.ocelotHead.addBox("nose", -1.5F, 0.0F, -4.0F, 3, 2, 2);
|
||||
this.ocelotHead.addBox("ear1", -2.0F, -3.0F, 0.0F, 1, 1, 2);
|
||||
this.ocelotHead.addBox("ear2", 1.0F, -3.0F, 0.0F, 1, 1, 2);
|
||||
this.ocelotHead.setRotationPoint(0.0F, 15.0F, -9.0F);
|
||||
this.ocelotBody = new ModelRenderer(this, 20, 0);
|
||||
this.ocelotBody.addBox(-2.0F, 3.0F, -8.0F, 4, 16, 6, 0.0F);
|
||||
this.ocelotBody.setRotationPoint(0.0F, 12.0F, -10.0F);
|
||||
this.ocelotTail = new ModelRenderer(this, 0, 15);
|
||||
this.ocelotTail.addBox(-0.5F, 0.0F, 0.0F, 1, 8, 1);
|
||||
this.ocelotTail.rotateAngleX = 0.9F;
|
||||
this.ocelotTail.setRotationPoint(0.0F, 15.0F, 8.0F);
|
||||
this.ocelotTail2 = new ModelRenderer(this, 4, 15);
|
||||
this.ocelotTail2.addBox(-0.5F, 0.0F, 0.0F, 1, 8, 1);
|
||||
this.ocelotTail2.setRotationPoint(0.0F, 20.0F, 14.0F);
|
||||
this.ocelotBackLeftLeg = new ModelRenderer(this, 8, 13);
|
||||
this.ocelotBackLeftLeg.addBox(-1.0F, 0.0F, 1.0F, 2, 6, 2);
|
||||
this.ocelotBackLeftLeg.setRotationPoint(1.1F, 18.0F, 5.0F);
|
||||
this.ocelotBackRightLeg = new ModelRenderer(this, 8, 13);
|
||||
this.ocelotBackRightLeg.addBox(-1.0F, 0.0F, 1.0F, 2, 6, 2);
|
||||
this.ocelotBackRightLeg.setRotationPoint(-1.1F, 18.0F, 5.0F);
|
||||
this.ocelotFrontLeftLeg = new ModelRenderer(this, 40, 0);
|
||||
this.ocelotFrontLeftLeg.addBox(-1.0F, 0.0F, 0.0F, 2, 10, 2);
|
||||
this.ocelotFrontLeftLeg.setRotationPoint(1.2F, 13.8F, -5.0F);
|
||||
this.ocelotFrontRightLeg = new ModelRenderer(this, 40, 0);
|
||||
this.ocelotFrontRightLeg.addBox(-1.0F, 0.0F, 0.0F, 2, 10, 2);
|
||||
this.ocelotFrontRightLeg.setRotationPoint(-1.2F, 13.8F, -5.0F);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the models various rotation angles then renders the model.
|
||||
*/
|
||||
public void render(Entity entityIn, float p_78088_2_, float p_78088_3_, float p_78088_4_, float p_78088_5_, float p_78088_6_, float scale)
|
||||
{
|
||||
this.setRotationAngles(p_78088_2_, p_78088_3_, p_78088_4_, p_78088_5_, p_78088_6_, scale, entityIn);
|
||||
|
||||
if (this.isChild)
|
||||
{
|
||||
float f = 2.0F;
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(1.5F / f, 1.5F / f, 1.5F / f);
|
||||
GL11.glTranslatef(0.0F, 10.0F * scale, 4.0F * scale);
|
||||
this.ocelotHead.render(scale);
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(1.0F / f, 1.0F / f, 1.0F / f);
|
||||
GL11.glTranslatef(0.0F, 24.0F * scale, 0.0F);
|
||||
this.ocelotBody.render(scale);
|
||||
this.ocelotBackLeftLeg.render(scale);
|
||||
this.ocelotBackRightLeg.render(scale);
|
||||
this.ocelotFrontLeftLeg.render(scale);
|
||||
this.ocelotFrontRightLeg.render(scale);
|
||||
this.ocelotTail.render(scale);
|
||||
this.ocelotTail2.render(scale);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
else
|
||||
{
|
||||
this.ocelotHead.render(scale);
|
||||
this.ocelotBody.render(scale);
|
||||
this.ocelotTail.render(scale);
|
||||
this.ocelotTail2.render(scale);
|
||||
this.ocelotBackLeftLeg.render(scale);
|
||||
this.ocelotBackRightLeg.render(scale);
|
||||
this.ocelotFrontLeftLeg.render(scale);
|
||||
this.ocelotFrontRightLeg.render(scale);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the model's various rotation angles. For bipeds, par1 and par2 are used for animating the movement of arms
|
||||
* and legs, where par1 represents the time(so that arms and legs swing back and forth) and par2 represents how
|
||||
* "far" arms and legs can swing at most.
|
||||
*/
|
||||
public void setRotationAngles(float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor, Entity entityIn)
|
||||
{
|
||||
this.ocelotHead.rotateAngleX = headPitch / (180F / (float)Math.PI);
|
||||
this.ocelotHead.rotateAngleY = netHeadYaw / (180F / (float)Math.PI);
|
||||
|
||||
if (this.field_78163_i != 3)
|
||||
{
|
||||
this.ocelotBody.rotateAngleX = ((float)Math.PI / 2F);
|
||||
|
||||
if (this.field_78163_i == 2)
|
||||
{
|
||||
this.ocelotBackLeftLeg.rotateAngleX = ExtMath.cos(limbSwing * 0.6662F) * 1.0F * limbSwingAmount;
|
||||
this.ocelotBackRightLeg.rotateAngleX = ExtMath.cos(limbSwing * 0.6662F + 0.3F) * 1.0F * limbSwingAmount;
|
||||
this.ocelotFrontLeftLeg.rotateAngleX = ExtMath.cos(limbSwing * 0.6662F + (float)Math.PI + 0.3F) * 1.0F * limbSwingAmount;
|
||||
this.ocelotFrontRightLeg.rotateAngleX = ExtMath.cos(limbSwing * 0.6662F + (float)Math.PI) * 1.0F * limbSwingAmount;
|
||||
this.ocelotTail2.rotateAngleX = 1.7278761F + ((float)Math.PI / 10F) * ExtMath.cos(limbSwing) * limbSwingAmount;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.ocelotBackLeftLeg.rotateAngleX = ExtMath.cos(limbSwing * 0.6662F) * 1.0F * limbSwingAmount;
|
||||
this.ocelotBackRightLeg.rotateAngleX = ExtMath.cos(limbSwing * 0.6662F + (float)Math.PI) * 1.0F * limbSwingAmount;
|
||||
this.ocelotFrontLeftLeg.rotateAngleX = ExtMath.cos(limbSwing * 0.6662F + (float)Math.PI) * 1.0F * limbSwingAmount;
|
||||
this.ocelotFrontRightLeg.rotateAngleX = ExtMath.cos(limbSwing * 0.6662F) * 1.0F * limbSwingAmount;
|
||||
|
||||
if (this.field_78163_i == 1)
|
||||
{
|
||||
this.ocelotTail2.rotateAngleX = 1.7278761F + ((float)Math.PI / 4F) * ExtMath.cos(limbSwing) * limbSwingAmount;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.ocelotTail2.rotateAngleX = 1.7278761F + 0.47123894F * ExtMath.cos(limbSwing) * limbSwingAmount;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Used for easily adding entity-dependent animations. The second and third float params here are the same second
|
||||
* and third as in the setRotationAngles method.
|
||||
*/
|
||||
public void setLivingAnimations(EntityLiving entitylivingbaseIn, float p_78086_2_, float p_78086_3_, float partialTickTime)
|
||||
{
|
||||
EntityOcelot entityocelot = (EntityOcelot)entitylivingbaseIn;
|
||||
this.ocelotBody.rotationPointY = 12.0F;
|
||||
this.ocelotBody.rotationPointZ = -10.0F;
|
||||
this.ocelotHead.rotationPointY = 15.0F;
|
||||
this.ocelotHead.rotationPointZ = -9.0F;
|
||||
this.ocelotTail.rotationPointY = 15.0F;
|
||||
this.ocelotTail.rotationPointZ = 8.0F;
|
||||
this.ocelotTail2.rotationPointY = 20.0F;
|
||||
this.ocelotTail2.rotationPointZ = 14.0F;
|
||||
this.ocelotFrontLeftLeg.rotationPointY = this.ocelotFrontRightLeg.rotationPointY = 13.8F;
|
||||
this.ocelotFrontLeftLeg.rotationPointZ = this.ocelotFrontRightLeg.rotationPointZ = -5.0F;
|
||||
this.ocelotBackLeftLeg.rotationPointY = this.ocelotBackRightLeg.rotationPointY = 18.0F;
|
||||
this.ocelotBackLeftLeg.rotationPointZ = this.ocelotBackRightLeg.rotationPointZ = 5.0F;
|
||||
this.ocelotTail.rotateAngleX = 0.9F;
|
||||
|
||||
if (entityocelot.isSneakingVisually())
|
||||
{
|
||||
++this.ocelotBody.rotationPointY;
|
||||
this.ocelotHead.rotationPointY += 2.0F;
|
||||
++this.ocelotTail.rotationPointY;
|
||||
this.ocelotTail2.rotationPointY += -4.0F;
|
||||
this.ocelotTail2.rotationPointZ += 2.0F;
|
||||
this.ocelotTail.rotateAngleX = ((float)Math.PI / 2F);
|
||||
this.ocelotTail2.rotateAngleX = ((float)Math.PI / 2F);
|
||||
this.field_78163_i = 0;
|
||||
}
|
||||
else if (entityocelot.isSprinting())
|
||||
{
|
||||
this.ocelotTail2.rotationPointY = this.ocelotTail.rotationPointY;
|
||||
this.ocelotTail2.rotationPointZ += 2.0F;
|
||||
this.ocelotTail.rotateAngleX = ((float)Math.PI / 2F);
|
||||
this.ocelotTail2.rotateAngleX = ((float)Math.PI / 2F);
|
||||
this.field_78163_i = 2;
|
||||
}
|
||||
else if (entityocelot.isSitting())
|
||||
{
|
||||
this.ocelotBody.rotateAngleX = ((float)Math.PI / 4F);
|
||||
this.ocelotBody.rotationPointY += -4.0F;
|
||||
this.ocelotBody.rotationPointZ += 5.0F;
|
||||
this.ocelotHead.rotationPointY += -3.3F;
|
||||
++this.ocelotHead.rotationPointZ;
|
||||
this.ocelotTail.rotationPointY += 8.0F;
|
||||
this.ocelotTail.rotationPointZ += -2.0F;
|
||||
this.ocelotTail2.rotationPointY += 2.0F;
|
||||
this.ocelotTail2.rotationPointZ += -0.8F;
|
||||
this.ocelotTail.rotateAngleX = 1.7278761F;
|
||||
this.ocelotTail2.rotateAngleX = 2.670354F;
|
||||
this.ocelotFrontLeftLeg.rotateAngleX = this.ocelotFrontRightLeg.rotateAngleX = -0.15707964F;
|
||||
this.ocelotFrontLeftLeg.rotationPointY = this.ocelotFrontRightLeg.rotationPointY = 15.8F;
|
||||
this.ocelotFrontLeftLeg.rotationPointZ = this.ocelotFrontRightLeg.rotationPointZ = -7.0F;
|
||||
this.ocelotBackLeftLeg.rotateAngleX = this.ocelotBackRightLeg.rotateAngleX = -((float)Math.PI / 2F);
|
||||
this.ocelotBackLeftLeg.rotationPointY = this.ocelotBackRightLeg.rotationPointY = 21.0F;
|
||||
this.ocelotBackLeftLeg.rotationPointZ = this.ocelotBackRightLeg.rotationPointZ = 1.0F;
|
||||
this.field_78163_i = 3;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.field_78163_i = 1;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,61 +0,0 @@
|
|||
package client.renderer.model;
|
||||
|
||||
import common.entity.Entity;
|
||||
|
||||
public class ModelSquid extends ModelBase
|
||||
{
|
||||
/** The squid's body */
|
||||
ModelRenderer squidBody;
|
||||
|
||||
/** The squid's tentacles */
|
||||
ModelRenderer[] squidTentacles = new ModelRenderer[8];
|
||||
|
||||
public ModelSquid()
|
||||
{
|
||||
int i = -16;
|
||||
this.squidBody = new ModelRenderer(this, 0, 0);
|
||||
this.squidBody.addBox(-6.0F, -8.0F, -6.0F, 12, 16, 12);
|
||||
this.squidBody.rotationPointY += (float)(24 + i);
|
||||
|
||||
for (int j = 0; j < this.squidTentacles.length; ++j)
|
||||
{
|
||||
this.squidTentacles[j] = new ModelRenderer(this, 48, 0);
|
||||
double d0 = (double)j * Math.PI * 2.0D / (double)this.squidTentacles.length;
|
||||
float f = (float)Math.cos(d0) * 5.0F;
|
||||
float f1 = (float)Math.sin(d0) * 5.0F;
|
||||
this.squidTentacles[j].addBox(-1.0F, 0.0F, -1.0F, 2, 18, 2);
|
||||
this.squidTentacles[j].rotationPointX = f;
|
||||
this.squidTentacles[j].rotationPointZ = f1;
|
||||
this.squidTentacles[j].rotationPointY = (float)(31 + i);
|
||||
d0 = (double)j * Math.PI * -2.0D / (double)this.squidTentacles.length + (Math.PI / 2D);
|
||||
this.squidTentacles[j].rotateAngleY = (float)d0;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the model's various rotation angles. For bipeds, par1 and par2 are used for animating the movement of arms
|
||||
* and legs, where par1 represents the time(so that arms and legs swing back and forth) and par2 represents how
|
||||
* "far" arms and legs can swing at most.
|
||||
*/
|
||||
public void setRotationAngles(float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor, Entity entityIn)
|
||||
{
|
||||
for (ModelRenderer modelrenderer : this.squidTentacles)
|
||||
{
|
||||
modelrenderer.rotateAngleX = ageInTicks;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the models various rotation angles then renders the model.
|
||||
*/
|
||||
public void render(Entity entityIn, float p_78088_2_, float p_78088_3_, float p_78088_4_, float p_78088_5_, float p_78088_6_, float scale)
|
||||
{
|
||||
this.setRotationAngles(p_78088_2_, p_78088_3_, p_78088_4_, p_78088_5_, p_78088_6_, scale, entityIn);
|
||||
this.squidBody.render(scale);
|
||||
|
||||
for (int i = 0; i < this.squidTentacles.length; ++i)
|
||||
{
|
||||
this.squidTentacles[i].render(scale);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -90,41 +90,6 @@ public abstract class EntityTexManager
|
|||
extra.discard();
|
||||
// setTexture(skin, image, entry.getValue());
|
||||
}
|
||||
for(String cape : SpeciesRegistry.CAPES) {
|
||||
String loc = EntityNPC.getCapeTexture(cape);
|
||||
BufferedImage image;
|
||||
try {
|
||||
image = TextureUtil.readImage(FileUtils.getResource(loc));
|
||||
}
|
||||
catch(IOException e) {
|
||||
if(e instanceof FileNotFoundException)
|
||||
Log.IO.warn("Textur ist nicht vorhanden: " + loc);
|
||||
else
|
||||
Log.IO.error(e, "Konnte Textur nicht laden: " + loc);
|
||||
image = new BufferedImage(64, 32, BufferedImage.TYPE_INT_ARGB);
|
||||
Graphics2D g = image.createGraphics();
|
||||
g.setColor(Color.BLACK);
|
||||
g.fillRect(0, 0, 64, 32);
|
||||
g.dispose();
|
||||
}
|
||||
loc = getCapeLocation(cape);
|
||||
DynamicTexture dyntex = (DynamicTexture)manager.getTexture(loc);
|
||||
if(dyntex == null || (dyntex.getWidth() != image.getWidth() || dyntex.getHeight() != image.getHeight())) {
|
||||
if(dyntex != null)
|
||||
manager.deleteTexture(loc);
|
||||
dyntex = new DynamicTexture(image);
|
||||
manager.loadTexture(loc, dyntex);
|
||||
}
|
||||
else {
|
||||
image.getRGB(0, 0, image.getWidth(), image.getHeight(), dyntex.getData(), 0, image.getWidth());
|
||||
}
|
||||
dyntex.updateTexture();
|
||||
// setCape(cape, image);
|
||||
}
|
||||
// for(ModelType model : ModelType.values()) {
|
||||
// if(DEF_TEXTURES.get(model) == null)
|
||||
// Log.IO.warn(altNpcLayer);
|
||||
// }
|
||||
}
|
||||
|
||||
public static String getDefault(ModelType model) {
|
||||
|
@ -141,10 +106,6 @@ public abstract class EntityTexManager
|
|||
private static String getNpcSkinLocation(String user) {
|
||||
return "npcs/" + user.toLowerCase() + "/dyn";
|
||||
}
|
||||
|
||||
private static String getCapeLocation(String name) {
|
||||
return "capes/" + name.toLowerCase() + "/dyn";
|
||||
}
|
||||
|
||||
public static LayerExtra getLayer(int id, String skin, ModelType model)
|
||||
{
|
||||
|
@ -166,14 +127,6 @@ public abstract class EntityTexManager
|
|||
return Client.CLIENT.getTextureManager().getTexture(getSkinLocation(id)) != null;
|
||||
}
|
||||
|
||||
public static String getCape(String name)
|
||||
{
|
||||
if(name == null || name.isEmpty())
|
||||
return null;
|
||||
String loc = getCapeLocation(name);
|
||||
return Client.CLIENT.getTextureManager().getTexture(loc) != null ? loc : null;
|
||||
}
|
||||
|
||||
public static void clearTextures() {
|
||||
List<Integer> list = Lists.newArrayList(USER_TEXTURES);
|
||||
for(Integer user : list) {
|
||||
|
@ -239,8 +192,4 @@ public abstract class EntityTexManager
|
|||
public static LayerExtra getLayer(EntityNPC entity) {
|
||||
return getLayer(entity.isPlayer() ? entity.getId() : -1, entity.getChar(), entity.getSpecies().renderer);
|
||||
}
|
||||
|
||||
public static String getCape(EntityNPC entity) {
|
||||
return !entity.getCape().isEmpty() ? EntityTexManager.getCape(entity.getCape()) : null;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -868,6 +868,10 @@ public class WorldClient extends AWorldClient
|
|||
return this.lastLightning;
|
||||
}
|
||||
|
||||
public Vec3 getLightColor() {
|
||||
return this.lightColor;
|
||||
}
|
||||
|
||||
public void decrLightning() {
|
||||
if(this.lastLightning > 0)
|
||||
this.lastLightning -= 1;
|
||||
|
|
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 2 KiB After Width: | Height: | Size: 2 KiB |
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 3 KiB After Width: | Height: | Size: 3 KiB |
Before Width: | Height: | Size: 455 B After Width: | Height: | Size: 455 B |
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 7.7 KiB After Width: | Height: | Size: 7.7 KiB |
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 9 KiB After Width: | Height: | Size: 9 KiB |
Before Width: | Height: | Size: 9.7 KiB After Width: | Height: | Size: 9.7 KiB |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 9.4 KiB After Width: | Height: | Size: 9.4 KiB |
Before Width: | Height: | Size: 9.1 KiB After Width: | Height: | Size: 9.1 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 5.3 KiB |
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 3.6 KiB |
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 3.9 KiB |
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 4.6 KiB |
Before Width: | Height: | Size: 9.2 KiB After Width: | Height: | Size: 9.2 KiB |
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 4.6 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 3.2 KiB |
Before Width: | Height: | Size: 342 B After Width: | Height: | Size: 342 B |
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 9.1 KiB After Width: | Height: | Size: 9.1 KiB |
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 7.9 KiB After Width: | Height: | Size: 7.9 KiB |
Before Width: | Height: | Size: 8.7 KiB After Width: | Height: | Size: 8.7 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 9.2 KiB After Width: | Height: | Size: 9.2 KiB |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 3 KiB After Width: | Height: | Size: 3 KiB |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 4.2 KiB |
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 4.2 KiB |
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 1 KiB |
Before Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 9.9 KiB |
Before Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 905 B |