diff --git a/client/src/main/java/client/Client.java b/client/src/main/java/client/Client.java index 2f4f8412..a28b6cdd 100755 --- a/client/src/main/java/client/Client.java +++ b/client/src/main/java/client/Client.java @@ -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++) { diff --git a/client/src/main/java/client/init/RenderRegistry.java b/client/src/main/java/client/init/RenderRegistry.java index a862a28c..b1c085e5 100644 --- a/client/src/main/java/client/init/RenderRegistry.java +++ b/client/src/main/java/client/init/RenderRegistry.java @@ -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); diff --git a/client/src/main/java/client/renderer/EntityRenderer.java b/client/src/main/java/client/renderer/EntityRenderer.java index 5687df91..9d7fea1c 100755 --- a/client/src/main/java/client/renderer/EntityRenderer.java +++ b/client/src/main/java/client/renderer/EntityRenderer.java @@ -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; diff --git a/client/src/main/java/client/renderer/entity/RenderArachnoid.java b/client/src/main/java/client/renderer/entity/RenderArachnoid.java index 1a356522..c34656dc 100755 --- a/client/src/main/java/client/renderer/entity/RenderArachnoid.java +++ b/client/src/main/java/client/renderer/entity/RenderArachnoid.java @@ -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; diff --git a/client/src/main/java/client/renderer/entity/RenderArrow.java b/client/src/main/java/client/renderer/entity/RenderArrow.java index 59b26ab0..9e816fc7 100755 --- a/client/src/main/java/client/renderer/entity/RenderArrow.java +++ b/client/src/main/java/client/renderer/entity/RenderArrow.java @@ -12,7 +12,7 @@ import common.util.ExtMath; public class RenderArrow extends Render { - private static final String arrowTextures = "textures/entity/arrow.png"; + private static final String arrowTextures = "textures/object/arrow.png"; public RenderArrow(RenderManager renderManagerIn) { diff --git a/client/src/main/java/client/renderer/entity/RenderBat.java b/client/src/main/java/client/renderer/entity/RenderBat.java index 0aa6c4a0..0e621efe 100755 --- a/client/src/main/java/client/renderer/entity/RenderBat.java +++ b/client/src/main/java/client/renderer/entity/RenderBat.java @@ -9,7 +9,7 @@ import common.util.ExtMath; public class RenderBat extends RenderLiving { - private static final String batTextures = "textures/entity/bat.png"; + private static final String batTextures = "textures/creature/bat.png"; public RenderBat(RenderManager renderManagerIn) { diff --git a/client/src/main/java/client/renderer/entity/RenderBoat.java b/client/src/main/java/client/renderer/entity/RenderBoat.java index a9fafcae..4bb7c7fe 100755 --- a/client/src/main/java/client/renderer/entity/RenderBoat.java +++ b/client/src/main/java/client/renderer/entity/RenderBoat.java @@ -10,7 +10,7 @@ import common.util.ExtMath; public class RenderBoat extends Render { - 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(); diff --git a/client/src/main/java/client/renderer/entity/RenderBullet.java b/client/src/main/java/client/renderer/entity/RenderBullet.java index c1433122..6fe7ad2e 100755 --- a/client/src/main/java/client/renderer/entity/RenderBullet.java +++ b/client/src/main/java/client/renderer/entity/RenderBullet.java @@ -11,7 +11,7 @@ import common.entity.projectile.EntityBullet; public class RenderBullet extends Render { - private static final String bulletTextures = "textures/entity/bullet.png"; + private static final String bulletTextures = "textures/object/bullet.png"; public RenderBullet(RenderManager renderManagerIn) { diff --git a/client/src/main/java/client/renderer/entity/RenderCat.java b/client/src/main/java/client/renderer/entity/RenderCat.java new file mode 100755 index 00000000..04a45412 --- /dev/null +++ b/client/src/main/java/client/renderer/entity/RenderCat.java @@ -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 +{ + 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); + } + } +} diff --git a/client/src/main/java/client/renderer/entity/RenderChicken.java b/client/src/main/java/client/renderer/entity/RenderChicken.java index d9f885cb..7c78c380 100755 --- a/client/src/main/java/client/renderer/entity/RenderChicken.java +++ b/client/src/main/java/client/renderer/entity/RenderChicken.java @@ -7,7 +7,7 @@ import common.util.ExtMath; public class RenderChicken extends RenderLiving { - private static final String chickenTextures = "textures/entity/chicken.png"; + private static final String chickenTextures = "textures/creature/chicken.png"; public RenderChicken(RenderManager renderManagerIn, ModelBase modelBaseIn) { diff --git a/client/src/main/java/client/renderer/entity/RenderCow.java b/client/src/main/java/client/renderer/entity/RenderCow.java index b6280ab4..c46711f0 100755 --- a/client/src/main/java/client/renderer/entity/RenderCow.java +++ b/client/src/main/java/client/renderer/entity/RenderCow.java @@ -6,7 +6,7 @@ import common.entity.animal.EntityCow; public class RenderCow extends RenderLiving { - private static final String cowTextures = "textures/entity/cow.png"; + private static final String cowTextures = "textures/creature/cow.png"; public RenderCow(RenderManager renderManagerIn, ModelBase modelBaseIn) { diff --git a/client/src/main/java/client/renderer/entity/RenderCrystal.java b/client/src/main/java/client/renderer/entity/RenderCrystal.java index d5642b17..bdaa469d 100755 --- a/client/src/main/java/client/renderer/entity/RenderCrystal.java +++ b/client/src/main/java/client/renderer/entity/RenderCrystal.java @@ -10,7 +10,7 @@ import common.util.ExtMath; public class RenderCrystal extends Render { - 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); diff --git a/client/src/main/java/client/renderer/entity/RenderDragon.java b/client/src/main/java/client/renderer/entity/RenderDragon.java index e76f6363..3198a263 100755 --- a/client/src/main/java/client/renderer/entity/RenderDragon.java +++ b/client/src/main/java/client/renderer/entity/RenderDragon.java @@ -11,7 +11,7 @@ import common.util.ExtMath; public class RenderDragon extends RenderLiving { - 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; diff --git a/client/src/main/java/client/renderer/entity/RenderFish.java b/client/src/main/java/client/renderer/entity/RenderFish.java index 8c9710d1..65d35f1c 100755 --- a/client/src/main/java/client/renderer/entity/RenderFish.java +++ b/client/src/main/java/client/renderer/entity/RenderFish.java @@ -13,7 +13,7 @@ import common.util.Vec3; public class RenderFish extends Render { - private static final String TEXTURE = "textures/entity/hook.png"; + private static final String TEXTURE = "textures/object/hook.png"; public RenderFish(RenderManager renderManagerIn) { diff --git a/client/src/main/java/client/renderer/entity/RenderFlyingBox.java b/client/src/main/java/client/renderer/entity/RenderFlyingBox.java index a8518c5c..b1ad0e8d 100755 --- a/client/src/main/java/client/renderer/entity/RenderFlyingBox.java +++ b/client/src/main/java/client/renderer/entity/RenderFlyingBox.java @@ -9,8 +9,8 @@ import common.entity.projectile.EntityBox; public class RenderFlyingBox extends Render { - 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) diff --git a/client/src/main/java/client/renderer/entity/RenderFox.java b/client/src/main/java/client/renderer/entity/RenderFox.java index d3bc73bd..cc055aee 100644 --- a/client/src/main/java/client/renderer/entity/RenderFox.java +++ b/client/src/main/java/client/renderer/entity/RenderFox.java @@ -4,7 +4,7 @@ import client.renderer.model.ModelBase; import common.entity.animal.EntityFox; public class RenderFox extends RenderLiving { - 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); diff --git a/client/src/main/java/client/renderer/entity/RenderHorse.java b/client/src/main/java/client/renderer/entity/RenderHorse.java index 36656ebc..879509aa 100755 --- a/client/src/main/java/client/renderer/entity/RenderHorse.java +++ b/client/src/main/java/client/renderer/entity/RenderHorse.java @@ -13,11 +13,9 @@ import common.entity.animal.EntityHorse; public class RenderHorse extends RenderLiving { private static final Set loaded = Sets.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 case 2: return muleTextures; - - case 3: - return zombieHorseTextures; - - case 4: - return skeletonHorseTextures; } } else diff --git a/client/src/main/java/client/renderer/entity/RenderLeashKnot.java b/client/src/main/java/client/renderer/entity/RenderLeashKnot.java index 9a03683b..722fd80e 100755 --- a/client/src/main/java/client/renderer/entity/RenderLeashKnot.java +++ b/client/src/main/java/client/renderer/entity/RenderLeashKnot.java @@ -9,7 +9,7 @@ import common.entity.item.EntityLeashKnot; public class RenderLeashKnot extends Render { - 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) diff --git a/client/src/main/java/client/renderer/entity/RenderMinecart.java b/client/src/main/java/client/renderer/entity/RenderMinecart.java index cc8b7d8a..02a765c9 100755 --- a/client/src/main/java/client/renderer/entity/RenderMinecart.java +++ b/client/src/main/java/client/renderer/entity/RenderMinecart.java @@ -14,7 +14,7 @@ import common.world.State; public class RenderMinecart extends Render { - 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(); diff --git a/client/src/main/java/client/renderer/entity/RenderMissile.java b/client/src/main/java/client/renderer/entity/RenderMissile.java index 89dfeb04..a6e60c31 100644 --- a/client/src/main/java/client/renderer/entity/RenderMissile.java +++ b/client/src/main/java/client/renderer/entity/RenderMissile.java @@ -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); diff --git a/client/src/main/java/client/renderer/entity/RenderMooshroom.java b/client/src/main/java/client/renderer/entity/RenderMooshroom.java deleted file mode 100755 index 28793f39..00000000 --- a/client/src/main/java/client/renderer/entity/RenderMooshroom.java +++ /dev/null @@ -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 -{ - 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; - } -} diff --git a/client/src/main/java/client/renderer/entity/RenderMouse.java b/client/src/main/java/client/renderer/entity/RenderMouse.java index 5c266ddb..5a04314c 100755 --- a/client/src/main/java/client/renderer/entity/RenderMouse.java +++ b/client/src/main/java/client/renderer/entity/RenderMouse.java @@ -6,7 +6,7 @@ import common.entity.animal.EntityMouse; public class RenderMouse extends RenderLiving { - private static final String mouseTextures = "textures/entity/mouse.png"; + private static final String mouseTextures = "textures/creature/mouse.png"; public RenderMouse(RenderManager renderManagerIn, ModelBase modelBaseIn) { diff --git a/client/src/main/java/client/renderer/entity/RenderOcelot.java b/client/src/main/java/client/renderer/entity/RenderOcelot.java deleted file mode 100755 index 09edb567..00000000 --- a/client/src/main/java/client/renderer/entity/RenderOcelot.java +++ /dev/null @@ -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 -{ - 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); - } - } -} diff --git a/client/src/main/java/client/renderer/entity/RenderPig.java b/client/src/main/java/client/renderer/entity/RenderPig.java index be614ee3..e36954be 100755 --- a/client/src/main/java/client/renderer/entity/RenderPig.java +++ b/client/src/main/java/client/renderer/entity/RenderPig.java @@ -7,7 +7,7 @@ import common.entity.animal.EntityPig; public class RenderPig extends RenderLiving { - private static final String pigTextures = "textures/entity/pig.png"; + private static final String pigTextures = "textures/creature/pig.png"; public RenderPig(RenderManager renderManagerIn, ModelBase modelBaseIn) { diff --git a/client/src/main/java/client/renderer/entity/RenderRabbit.java b/client/src/main/java/client/renderer/entity/RenderRabbit.java index 7527e5a7..ed680beb 100755 --- a/client/src/main/java/client/renderer/entity/RenderRabbit.java +++ b/client/src/main/java/client/renderer/entity/RenderRabbit.java @@ -7,19 +7,19 @@ import common.entity.animal.EntityRabbit; public class RenderRabbit extends RenderLiving { 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 { 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; } } diff --git a/client/src/main/java/client/renderer/entity/RenderSheep.java b/client/src/main/java/client/renderer/entity/RenderSheep.java index c9277db3..4f63cdcb 100755 --- a/client/src/main/java/client/renderer/entity/RenderSheep.java +++ b/client/src/main/java/client/renderer/entity/RenderSheep.java @@ -7,7 +7,7 @@ import common.entity.animal.EntitySheep; public class RenderSheep extends RenderLiving { - private static final String shearedSheepTextures = "textures/entity/sheep.png"; + private static final String shearedSheepTextures = "textures/creature/sheep.png"; public RenderSheep(RenderManager renderManagerIn, ModelBase modelBaseIn) { diff --git a/client/src/main/java/client/renderer/entity/RenderSlime.java b/client/src/main/java/client/renderer/entity/RenderSlime.java index e76df433..0ba57981 100755 --- a/client/src/main/java/client/renderer/entity/RenderSlime.java +++ b/client/src/main/java/client/renderer/entity/RenderSlime.java @@ -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() { diff --git a/client/src/main/java/client/renderer/entity/RenderSpaceMarine.java b/client/src/main/java/client/renderer/entity/RenderSpaceMarine.java index 864b24cb..e925ab26 100755 --- a/client/src/main/java/client/renderer/entity/RenderSpaceMarine.java +++ b/client/src/main/java/client/renderer/entity/RenderSpaceMarine.java @@ -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) { diff --git a/client/src/main/java/client/renderer/entity/RenderSquid.java b/client/src/main/java/client/renderer/entity/RenderSquid.java deleted file mode 100755 index 15f3c96a..00000000 --- a/client/src/main/java/client/renderer/entity/RenderSquid.java +++ /dev/null @@ -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 -{ - 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; - } -} diff --git a/client/src/main/java/client/renderer/entity/RenderWolf.java b/client/src/main/java/client/renderer/entity/RenderWolf.java index 3fb1bf13..996d6660 100755 --- a/client/src/main/java/client/renderer/entity/RenderWolf.java +++ b/client/src/main/java/client/renderer/entity/RenderWolf.java @@ -8,9 +8,9 @@ import common.entity.animal.EntityWolf; public class RenderWolf extends RenderLiving { - 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) { diff --git a/client/src/main/java/client/renderer/entity/RenderXp.java b/client/src/main/java/client/renderer/entity/RenderXp.java new file mode 100755 index 00000000..9159e32b --- /dev/null +++ b/client/src/main/java/client/renderer/entity/RenderXp.java @@ -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 { + 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); + } +} diff --git a/client/src/main/java/client/renderer/entity/RenderXpOrb.java b/client/src/main/java/client/renderer/entity/RenderXpOrb.java deleted file mode 100755 index 815456dd..00000000 --- a/client/src/main/java/client/renderer/entity/RenderXpOrb.java +++ /dev/null @@ -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 -{ - 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); - } -} diff --git a/client/src/main/java/client/renderer/entity/RendererLivingEntity.java b/client/src/main/java/client/renderer/entity/RendererLivingEntity.java index 949810bf..c2fe4f81 100755 --- a/client/src/main/java/client/renderer/entity/RendererLivingEntity.java +++ b/client/src/main/java/client/renderer/entity/RendererLivingEntity.java @@ -28,7 +28,7 @@ import common.util.ExtMath; public abstract class RendererLivingEntity extends Render { 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> layerRenderers = Lists.>newArrayList(); diff --git a/client/src/main/java/client/renderer/layers/LayerCape.java b/client/src/main/java/client/renderer/layers/LayerCape.java index 495e6781..9e79b88f 100755 --- a/client/src/main/java/client/renderer/layers/LayerCape.java +++ b/client/src/main/java/client/renderer/layers/LayerCape.java @@ -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 { 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()) { diff --git a/client/src/main/java/client/renderer/layers/LayerCharge.java b/client/src/main/java/client/renderer/layers/LayerCharge.java index 2bc65785..033b9368 100755 --- a/client/src/main/java/client/renderer/layers/LayerCharge.java +++ b/client/src/main/java/client/renderer/layers/LayerCharge.java @@ -10,7 +10,7 @@ import common.entity.npc.EntityNPC; public class LayerCharge implements LayerRenderer { - 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); diff --git a/client/src/main/java/client/renderer/layers/LayerEnderDragonEyes.java b/client/src/main/java/client/renderer/layers/LayerEnderDragonEyes.java index 7fb6b277..2620990e 100755 --- a/client/src/main/java/client/renderer/layers/LayerEnderDragonEyes.java +++ b/client/src/main/java/client/renderer/layers/LayerEnderDragonEyes.java @@ -10,7 +10,7 @@ import common.entity.animal.EntityDragon; public class LayerEnderDragonEyes implements LayerRenderer { - 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) diff --git a/client/src/main/java/client/renderer/layers/LayerExtra.java b/client/src/main/java/client/renderer/layers/LayerExtra.java index ebfe2bb9..40bd8dac 100755 --- a/client/src/main/java/client/renderer/layers/LayerExtra.java +++ b/client/src/main/java/client/renderer/layers/LayerExtra.java @@ -58,11 +58,10 @@ public class LayerExtra implements LayerRenderer 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 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); diff --git a/client/src/main/java/client/renderer/layers/LayerMooshroomMushroom.java b/client/src/main/java/client/renderer/layers/LayerMooshroomMushroom.java deleted file mode 100755 index 8cd71080..00000000 --- a/client/src/main/java/client/renderer/layers/LayerMooshroomMushroom.java +++ /dev/null @@ -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 -{ - 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; - } -} diff --git a/client/src/main/java/client/renderer/layers/LayerPowerRods.java b/client/src/main/java/client/renderer/layers/LayerPowerRods.java index 54b45a4b..1c800c56 100755 --- a/client/src/main/java/client/renderer/layers/LayerPowerRods.java +++ b/client/src/main/java/client/renderer/layers/LayerPowerRods.java @@ -8,7 +8,7 @@ import common.util.ExtMath; public class LayerPowerRods implements LayerRenderer { - 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; diff --git a/client/src/main/java/client/renderer/layers/LayerSaddle.java b/client/src/main/java/client/renderer/layers/LayerSaddle.java index ce30c6b3..cdd49aac 100755 --- a/client/src/main/java/client/renderer/layers/LayerSaddle.java +++ b/client/src/main/java/client/renderer/layers/LayerSaddle.java @@ -7,7 +7,7 @@ import common.entity.animal.EntityPig; public class LayerSaddle implements LayerRenderer { - 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); diff --git a/client/src/main/java/client/renderer/layers/LayerSheepWool.java b/client/src/main/java/client/renderer/layers/LayerSheepWool.java index dd1022cf..42920353 100755 --- a/client/src/main/java/client/renderer/layers/LayerSheepWool.java +++ b/client/src/main/java/client/renderer/layers/LayerSheepWool.java @@ -8,7 +8,7 @@ import common.entity.animal.EntitySheep; public class LayerSheepWool implements LayerRenderer { - 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(); diff --git a/client/src/main/java/client/renderer/layers/LayerWolfCollar.java b/client/src/main/java/client/renderer/layers/LayerWolfCollar.java index d83c826c..b346c20d 100755 --- a/client/src/main/java/client/renderer/layers/LayerWolfCollar.java +++ b/client/src/main/java/client/renderer/layers/LayerWolfCollar.java @@ -9,7 +9,7 @@ import common.entity.animal.EntityWolf; public class LayerWolfCollar implements LayerRenderer { - 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) diff --git a/client/src/main/java/client/renderer/model/ModelCat.java b/client/src/main/java/client/renderer/model/ModelCat.java new file mode 100755 index 00000000..55b5f6c1 --- /dev/null +++ b/client/src/main/java/client/renderer/model/ModelCat.java @@ -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; + } + } +} diff --git a/client/src/main/java/client/renderer/model/ModelOcelot.java b/client/src/main/java/client/renderer/model/ModelOcelot.java deleted file mode 100755 index e7765ca0..00000000 --- a/client/src/main/java/client/renderer/model/ModelOcelot.java +++ /dev/null @@ -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; - } - } -} diff --git a/client/src/main/java/client/renderer/model/ModelSquid.java b/client/src/main/java/client/renderer/model/ModelSquid.java deleted file mode 100755 index 5db6680a..00000000 --- a/client/src/main/java/client/renderer/model/ModelSquid.java +++ /dev/null @@ -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); - } - } -} diff --git a/client/src/main/java/client/renderer/texture/EntityTexManager.java b/client/src/main/java/client/renderer/texture/EntityTexManager.java index bcde521d..b567ea1a 100755 --- a/client/src/main/java/client/renderer/texture/EntityTexManager.java +++ b/client/src/main/java/client/renderer/texture/EntityTexManager.java @@ -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 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; - } } diff --git a/client/src/main/java/client/world/WorldClient.java b/client/src/main/java/client/world/WorldClient.java index 6de831c7..5ed45e98 100755 --- a/client/src/main/java/client/world/WorldClient.java +++ b/client/src/main/java/client/world/WorldClient.java @@ -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; diff --git a/client/src/main/resources/textures/entity/bat.png b/client/src/main/resources/textures/creature/bat.png similarity index 100% rename from client/src/main/resources/textures/entity/bat.png rename to client/src/main/resources/textures/creature/bat.png diff --git a/client/src/main/resources/textures/entity/cat_black.png b/client/src/main/resources/textures/creature/cat_black.png similarity index 100% rename from client/src/main/resources/textures/entity/cat_black.png rename to client/src/main/resources/textures/creature/cat_black.png diff --git a/client/src/main/resources/textures/entity/cat_red.png b/client/src/main/resources/textures/creature/cat_red.png similarity index 100% rename from client/src/main/resources/textures/entity/cat_red.png rename to client/src/main/resources/textures/creature/cat_red.png diff --git a/client/src/main/resources/textures/entity/cat_siamese.png b/client/src/main/resources/textures/creature/cat_siamese.png similarity index 100% rename from client/src/main/resources/textures/entity/cat_siamese.png rename to client/src/main/resources/textures/creature/cat_siamese.png diff --git a/client/src/main/resources/textures/entity/cat_ocelot.png b/client/src/main/resources/textures/creature/cat_wild.png similarity index 100% rename from client/src/main/resources/textures/entity/cat_ocelot.png rename to client/src/main/resources/textures/creature/cat_wild.png diff --git a/client/src/main/resources/textures/entity/chicken.png b/client/src/main/resources/textures/creature/chicken.png similarity index 100% rename from client/src/main/resources/textures/entity/chicken.png rename to client/src/main/resources/textures/creature/chicken.png diff --git a/client/src/main/resources/textures/entity/cow.png b/client/src/main/resources/textures/creature/cow.png similarity index 100% rename from client/src/main/resources/textures/entity/cow.png rename to client/src/main/resources/textures/creature/cow.png diff --git a/client/src/main/resources/textures/entity/donkey.png b/client/src/main/resources/textures/creature/donkey.png similarity index 100% rename from client/src/main/resources/textures/entity/donkey.png rename to client/src/main/resources/textures/creature/donkey.png diff --git a/client/src/main/resources/textures/entity/dragon.png b/client/src/main/resources/textures/creature/dragon.png similarity index 100% rename from client/src/main/resources/textures/entity/dragon.png rename to client/src/main/resources/textures/creature/dragon.png diff --git a/client/src/main/resources/textures/entity/dragon_eyes.png b/client/src/main/resources/textures/creature/dragon_eyes.png similarity index 100% rename from client/src/main/resources/textures/entity/dragon_eyes.png rename to client/src/main/resources/textures/creature/dragon_eyes.png diff --git a/client/src/main/resources/textures/entity/fox.png b/client/src/main/resources/textures/creature/fox.png similarity index 100% rename from client/src/main/resources/textures/entity/fox.png rename to client/src/main/resources/textures/creature/fox.png diff --git a/client/src/main/resources/textures/entity/horse_black.png b/client/src/main/resources/textures/creature/horse_black.png similarity index 100% rename from client/src/main/resources/textures/entity/horse_black.png rename to client/src/main/resources/textures/creature/horse_black.png diff --git a/client/src/main/resources/textures/entity/horse_brown.png b/client/src/main/resources/textures/creature/horse_brown.png similarity index 100% rename from client/src/main/resources/textures/entity/horse_brown.png rename to client/src/main/resources/textures/creature/horse_brown.png diff --git a/client/src/main/resources/textures/entity/horse_chestnut.png b/client/src/main/resources/textures/creature/horse_chestnut.png similarity index 100% rename from client/src/main/resources/textures/entity/horse_chestnut.png rename to client/src/main/resources/textures/creature/horse_chestnut.png diff --git a/client/src/main/resources/textures/entity/horse_creamy.png b/client/src/main/resources/textures/creature/horse_creamy.png similarity index 100% rename from client/src/main/resources/textures/entity/horse_creamy.png rename to client/src/main/resources/textures/creature/horse_creamy.png diff --git a/client/src/main/resources/textures/entity/horse_darkbrown.png b/client/src/main/resources/textures/creature/horse_darkbrown.png similarity index 100% rename from client/src/main/resources/textures/entity/horse_darkbrown.png rename to client/src/main/resources/textures/creature/horse_darkbrown.png diff --git a/client/src/main/resources/textures/entity/horse_gray.png b/client/src/main/resources/textures/creature/horse_gray.png similarity index 100% rename from client/src/main/resources/textures/entity/horse_gray.png rename to client/src/main/resources/textures/creature/horse_gray.png diff --git a/client/src/main/resources/textures/entity/horse_markings_blackdots.png b/client/src/main/resources/textures/creature/horse_markings_blackdots.png similarity index 100% rename from client/src/main/resources/textures/entity/horse_markings_blackdots.png rename to client/src/main/resources/textures/creature/horse_markings_blackdots.png diff --git a/client/src/main/resources/textures/entity/horse_markings_white.png b/client/src/main/resources/textures/creature/horse_markings_white.png similarity index 100% rename from client/src/main/resources/textures/entity/horse_markings_white.png rename to client/src/main/resources/textures/creature/horse_markings_white.png diff --git a/client/src/main/resources/textures/entity/horse_markings_whitedots.png b/client/src/main/resources/textures/creature/horse_markings_whitedots.png similarity index 100% rename from client/src/main/resources/textures/entity/horse_markings_whitedots.png rename to client/src/main/resources/textures/creature/horse_markings_whitedots.png diff --git a/client/src/main/resources/textures/entity/horse_markings_whitefield.png b/client/src/main/resources/textures/creature/horse_markings_whitefield.png similarity index 100% rename from client/src/main/resources/textures/entity/horse_markings_whitefield.png rename to client/src/main/resources/textures/creature/horse_markings_whitefield.png diff --git a/client/src/main/resources/textures/entity/horse_white.png b/client/src/main/resources/textures/creature/horse_white.png similarity index 100% rename from client/src/main/resources/textures/entity/horse_white.png rename to client/src/main/resources/textures/creature/horse_white.png diff --git a/client/src/main/resources/textures/entity/mouse.png b/client/src/main/resources/textures/creature/mouse.png similarity index 100% rename from client/src/main/resources/textures/entity/mouse.png rename to client/src/main/resources/textures/creature/mouse.png diff --git a/client/src/main/resources/textures/entity/mule.png b/client/src/main/resources/textures/creature/mule.png similarity index 100% rename from client/src/main/resources/textures/entity/mule.png rename to client/src/main/resources/textures/creature/mule.png diff --git a/client/src/main/resources/textures/entity/pig.png b/client/src/main/resources/textures/creature/pig.png similarity index 100% rename from client/src/main/resources/textures/entity/pig.png rename to client/src/main/resources/textures/creature/pig.png diff --git a/client/src/main/resources/textures/entity/pig_saddle.png b/client/src/main/resources/textures/creature/pig_saddle.png similarity index 100% rename from client/src/main/resources/textures/entity/pig_saddle.png rename to client/src/main/resources/textures/creature/pig_saddle.png diff --git a/client/src/main/resources/textures/entity/rabbit_black.png b/client/src/main/resources/textures/creature/rabbit_black.png similarity index 100% rename from client/src/main/resources/textures/entity/rabbit_black.png rename to client/src/main/resources/textures/creature/rabbit_black.png diff --git a/client/src/main/resources/textures/entity/rabbit_black_splotched.png b/client/src/main/resources/textures/creature/rabbit_black_splotched.png similarity index 100% rename from client/src/main/resources/textures/entity/rabbit_black_splotched.png rename to client/src/main/resources/textures/creature/rabbit_black_splotched.png diff --git a/client/src/main/resources/textures/entity/rabbit_brown.png b/client/src/main/resources/textures/creature/rabbit_brown.png similarity index 100% rename from client/src/main/resources/textures/entity/rabbit_brown.png rename to client/src/main/resources/textures/creature/rabbit_brown.png diff --git a/client/src/main/resources/textures/entity/rabbit_dark.png b/client/src/main/resources/textures/creature/rabbit_dark.png similarity index 100% rename from client/src/main/resources/textures/entity/rabbit_dark.png rename to client/src/main/resources/textures/creature/rabbit_dark.png diff --git a/client/src/main/resources/textures/entity/rabbit_dark_gray.png b/client/src/main/resources/textures/creature/rabbit_dark_gray.png similarity index 100% rename from client/src/main/resources/textures/entity/rabbit_dark_gray.png rename to client/src/main/resources/textures/creature/rabbit_dark_gray.png diff --git a/client/src/main/resources/textures/entity/rabbit_caerbannog.png b/client/src/main/resources/textures/creature/rabbit_evil.png similarity index 100% rename from client/src/main/resources/textures/entity/rabbit_caerbannog.png rename to client/src/main/resources/textures/creature/rabbit_evil.png diff --git a/client/src/main/resources/textures/entity/rabbit_gold.png b/client/src/main/resources/textures/creature/rabbit_gold.png similarity index 100% rename from client/src/main/resources/textures/entity/rabbit_gold.png rename to client/src/main/resources/textures/creature/rabbit_gold.png diff --git a/client/src/main/resources/textures/entity/rabbit_gray.png b/client/src/main/resources/textures/creature/rabbit_gray.png similarity index 100% rename from client/src/main/resources/textures/entity/rabbit_gray.png rename to client/src/main/resources/textures/creature/rabbit_gray.png diff --git a/client/src/main/resources/textures/entity/rabbit_toast.png b/client/src/main/resources/textures/creature/rabbit_half.png similarity index 100% rename from client/src/main/resources/textures/entity/rabbit_toast.png rename to client/src/main/resources/textures/creature/rabbit_half.png diff --git a/client/src/main/resources/textures/entity/rabbit_salt.png b/client/src/main/resources/textures/creature/rabbit_salt.png similarity index 100% rename from client/src/main/resources/textures/entity/rabbit_salt.png rename to client/src/main/resources/textures/creature/rabbit_salt.png diff --git a/client/src/main/resources/textures/entity/rabbit_white.png b/client/src/main/resources/textures/creature/rabbit_white.png similarity index 100% rename from client/src/main/resources/textures/entity/rabbit_white.png rename to client/src/main/resources/textures/creature/rabbit_white.png diff --git a/client/src/main/resources/textures/entity/rabbit_white_splotched.png b/client/src/main/resources/textures/creature/rabbit_white_splotched.png similarity index 100% rename from client/src/main/resources/textures/entity/rabbit_white_splotched.png rename to client/src/main/resources/textures/creature/rabbit_white_splotched.png diff --git a/client/src/main/resources/textures/entity/sheep.png b/client/src/main/resources/textures/creature/sheep.png similarity index 100% rename from client/src/main/resources/textures/entity/sheep.png rename to client/src/main/resources/textures/creature/sheep.png diff --git a/client/src/main/resources/textures/entity/sheep_fur.png b/client/src/main/resources/textures/creature/sheep_fur.png similarity index 100% rename from client/src/main/resources/textures/entity/sheep_fur.png rename to client/src/main/resources/textures/creature/sheep_fur.png diff --git a/client/src/main/resources/textures/entity/wolf.png b/client/src/main/resources/textures/creature/wolf.png similarity index 100% rename from client/src/main/resources/textures/entity/wolf.png rename to client/src/main/resources/textures/creature/wolf.png diff --git a/client/src/main/resources/textures/entity/wolf_angry.png b/client/src/main/resources/textures/creature/wolf_angry.png similarity index 100% rename from client/src/main/resources/textures/entity/wolf_angry.png rename to client/src/main/resources/textures/creature/wolf_angry.png diff --git a/client/src/main/resources/textures/entity/wolf_collar.png b/client/src/main/resources/textures/creature/wolf_collar.png similarity index 100% rename from client/src/main/resources/textures/entity/wolf_collar.png rename to client/src/main/resources/textures/creature/wolf_collar.png diff --git a/client/src/main/resources/textures/entity/wolf_tame.png b/client/src/main/resources/textures/creature/wolf_tame.png similarity index 100% rename from client/src/main/resources/textures/entity/wolf_tame.png rename to client/src/main/resources/textures/creature/wolf_tame.png diff --git a/client/src/main/resources/textures/entity/experience_orb.png b/client/src/main/resources/textures/entity/experience_orb.png deleted file mode 100755 index 92f9d0f0..00000000 Binary files a/client/src/main/resources/textures/entity/experience_orb.png and /dev/null differ diff --git a/client/src/main/resources/textures/entity/herobrine.png b/client/src/main/resources/textures/entity/herobrine.png deleted file mode 100755 index f2934fa3..00000000 Binary files a/client/src/main/resources/textures/entity/herobrine.png and /dev/null differ diff --git a/client/src/main/resources/textures/entity/horse_skeleton.png b/client/src/main/resources/textures/entity/horse_skeleton.png deleted file mode 100755 index 29d4ed5d..00000000 Binary files a/client/src/main/resources/textures/entity/horse_skeleton.png and /dev/null differ diff --git a/client/src/main/resources/textures/entity/horse_zombie.png b/client/src/main/resources/textures/entity/horse_zombie.png deleted file mode 100755 index 22d55faa..00000000 Binary files a/client/src/main/resources/textures/entity/horse_zombie.png and /dev/null differ diff --git a/client/src/main/resources/textures/entity/magma.png b/client/src/main/resources/textures/entity/magma.png deleted file mode 100755 index 20f0dd62..00000000 Binary files a/client/src/main/resources/textures/entity/magma.png and /dev/null differ diff --git a/client/src/main/resources/textures/entity/metalhead.png b/client/src/main/resources/textures/entity/metalhead.png deleted file mode 100755 index dd94a820..00000000 Binary files a/client/src/main/resources/textures/entity/metalhead.png and /dev/null differ diff --git a/client/src/main/resources/textures/entity/mooshroom.png b/client/src/main/resources/textures/entity/mooshroom.png deleted file mode 100755 index 3d682868..00000000 Binary files a/client/src/main/resources/textures/entity/mooshroom.png and /dev/null differ diff --git a/client/src/main/resources/textures/entity/sen.png b/client/src/main/resources/textures/entity/sen.png deleted file mode 100755 index df769e35..00000000 Binary files a/client/src/main/resources/textures/entity/sen.png and /dev/null differ diff --git a/client/src/main/resources/textures/entity/squid.png b/client/src/main/resources/textures/entity/squid.png deleted file mode 100755 index f2853887..00000000 Binary files a/client/src/main/resources/textures/entity/squid.png and /dev/null differ diff --git a/client/src/main/resources/textures/entity/unknown.png b/client/src/main/resources/textures/entity/unknown.png deleted file mode 100755 index a2b5aada..00000000 Binary files a/client/src/main/resources/textures/entity/unknown.png and /dev/null differ diff --git a/client/src/main/resources/textures/entity/alucard_1.png b/client/src/main/resources/textures/npc/alucard_1.png similarity index 100% rename from client/src/main/resources/textures/entity/alucard_1.png rename to client/src/main/resources/textures/npc/alucard_1.png diff --git a/client/src/main/resources/textures/entity/alucard_2.png b/client/src/main/resources/textures/npc/alucard_2.png similarity index 100% rename from client/src/main/resources/textures/entity/alucard_2.png rename to client/src/main/resources/textures/npc/alucard_2.png diff --git a/client/src/main/resources/textures/entity/arachnoid.png b/client/src/main/resources/textures/npc/arachnoid.png similarity index 100% rename from client/src/main/resources/textures/entity/arachnoid.png rename to client/src/main/resources/textures/npc/arachnoid.png diff --git a/client/src/main/resources/textures/entity/bloodelf.png b/client/src/main/resources/textures/npc/bloodelf.png similarity index 100% rename from client/src/main/resources/textures/entity/bloodelf.png rename to client/src/main/resources/textures/npc/bloodelf.png diff --git a/client/src/main/resources/textures/entity/cape_bloodelf.png b/client/src/main/resources/textures/npc/cape_dark.png similarity index 100% rename from client/src/main/resources/textures/entity/cape_bloodelf.png rename to client/src/main/resources/textures/npc/cape_dark.png diff --git a/client/src/main/resources/textures/entity/char.png b/client/src/main/resources/textures/npc/char.png similarity index 100% rename from client/src/main/resources/textures/entity/char.png rename to client/src/main/resources/textures/npc/char.png diff --git a/client/src/main/resources/textures/entity/charge.png b/client/src/main/resources/textures/npc/charge.png similarity index 100% rename from client/src/main/resources/textures/entity/charge.png rename to client/src/main/resources/textures/npc/charge.png diff --git a/client/src/main/resources/textures/entity/darkmage.png b/client/src/main/resources/textures/npc/darkmage.png similarity index 100% rename from client/src/main/resources/textures/entity/darkmage.png rename to client/src/main/resources/textures/npc/darkmage.png diff --git a/client/src/main/resources/textures/entity/dracula_1.png b/client/src/main/resources/textures/npc/dracula_1.png similarity index 100% rename from client/src/main/resources/textures/entity/dracula_1.png rename to client/src/main/resources/textures/npc/dracula_1.png diff --git a/client/src/main/resources/textures/entity/dracula_2.png b/client/src/main/resources/textures/npc/dracula_2.png similarity index 100% rename from client/src/main/resources/textures/entity/dracula_2.png rename to client/src/main/resources/textures/npc/dracula_2.png diff --git a/client/src/main/resources/textures/entity/dracula_3.png b/client/src/main/resources/textures/npc/dracula_3.png similarity index 100% rename from client/src/main/resources/textures/entity/dracula_3.png rename to client/src/main/resources/textures/npc/dracula_3.png diff --git a/client/src/main/resources/textures/entity/dracula_4.png b/client/src/main/resources/textures/npc/dracula_4.png similarity index 100% rename from client/src/main/resources/textures/entity/dracula_4.png rename to client/src/main/resources/textures/npc/dracula_4.png diff --git a/client/src/main/resources/textures/entity/dracula_5.png b/client/src/main/resources/textures/npc/dracula_5.png similarity index 100% rename from client/src/main/resources/textures/entity/dracula_5.png rename to client/src/main/resources/textures/npc/dracula_5.png diff --git a/client/src/main/resources/textures/entity/dracula_6.png b/client/src/main/resources/textures/npc/dracula_6.png similarity index 100% rename from client/src/main/resources/textures/entity/dracula_6.png rename to client/src/main/resources/textures/npc/dracula_6.png diff --git a/client/src/main/resources/textures/entity/dwarf.png b/client/src/main/resources/textures/npc/dwarf.png similarity index 100% rename from client/src/main/resources/textures/entity/dwarf.png rename to client/src/main/resources/textures/npc/dwarf.png diff --git a/client/src/main/resources/textures/entity/firedemon.png b/client/src/main/resources/textures/npc/firedemon.png similarity index 100% rename from client/src/main/resources/textures/entity/firedemon.png rename to client/src/main/resources/textures/npc/firedemon.png diff --git a/client/src/main/resources/textures/entity/gargoyle.png b/client/src/main/resources/textures/npc/gargoyle.png similarity index 100% rename from client/src/main/resources/textures/entity/gargoyle.png rename to client/src/main/resources/textures/npc/gargoyle.png diff --git a/client/src/main/resources/textures/entity/goblin.png b/client/src/main/resources/textures/npc/goblin.png similarity index 100% rename from client/src/main/resources/textures/entity/goblin.png rename to client/src/main/resources/textures/npc/goblin.png diff --git a/client/src/main/resources/textures/entity/hacker.png b/client/src/main/resources/textures/npc/hacker.png similarity index 100% rename from client/src/main/resources/textures/entity/hacker.png rename to client/src/main/resources/textures/npc/hacker.png diff --git a/client/src/main/resources/textures/entity/haunter.png b/client/src/main/resources/textures/npc/haunter.png similarity index 100% rename from client/src/main/resources/textures/entity/haunter.png rename to client/src/main/resources/textures/npc/haunter.png diff --git a/client/src/main/resources/textures/entity/highelf.png b/client/src/main/resources/textures/npc/highelf.png similarity index 100% rename from client/src/main/resources/textures/entity/highelf.png rename to client/src/main/resources/textures/npc/highelf.png diff --git a/client/src/main/resources/textures/entity/jiang_cheng.png b/client/src/main/resources/textures/npc/jiang_cheng.png similarity index 100% rename from client/src/main/resources/textures/entity/jiang_cheng.png rename to client/src/main/resources/textures/npc/jiang_cheng.png diff --git a/client/src/main/resources/textures/entity/knight_1.png b/client/src/main/resources/textures/npc/knight_1.png similarity index 100% rename from client/src/main/resources/textures/entity/knight_1.png rename to client/src/main/resources/textures/npc/knight_1.png diff --git a/client/src/main/resources/textures/entity/knight_2.png b/client/src/main/resources/textures/npc/knight_2.png similarity index 100% rename from client/src/main/resources/textures/entity/knight_2.png rename to client/src/main/resources/textures/npc/knight_2.png diff --git a/client/src/main/resources/textures/entity/knight_3.png b/client/src/main/resources/textures/npc/knight_3.png similarity index 100% rename from client/src/main/resources/textures/entity/knight_3.png rename to client/src/main/resources/textures/npc/knight_3.png diff --git a/client/src/main/resources/textures/entity/knight_4.png b/client/src/main/resources/textures/npc/knight_4.png similarity index 100% rename from client/src/main/resources/textures/entity/knight_4.png rename to client/src/main/resources/textures/npc/knight_4.png diff --git a/client/src/main/resources/textures/entity/knight_5.png b/client/src/main/resources/textures/npc/knight_5.png similarity index 100% rename from client/src/main/resources/textures/entity/knight_5.png rename to client/src/main/resources/textures/npc/knight_5.png diff --git a/client/src/main/resources/textures/entity/knight_6.png b/client/src/main/resources/textures/npc/knight_6.png similarity index 100% rename from client/src/main/resources/textures/entity/knight_6.png rename to client/src/main/resources/textures/npc/knight_6.png diff --git a/client/src/main/resources/textures/entity/knight_7.png b/client/src/main/resources/textures/npc/knight_7.png similarity index 100% rename from client/src/main/resources/textures/entity/knight_7.png rename to client/src/main/resources/textures/npc/knight_7.png diff --git a/client/src/main/resources/textures/entity/knight_8.png b/client/src/main/resources/textures/npc/knight_8.png similarity index 100% rename from client/src/main/resources/textures/entity/knight_8.png rename to client/src/main/resources/textures/npc/knight_8.png diff --git a/client/src/main/resources/textures/entity/lan_wangji.png b/client/src/main/resources/textures/npc/lan_wangji.png similarity index 100% rename from client/src/main/resources/textures/entity/lan_wangji.png rename to client/src/main/resources/textures/npc/lan_wangji.png diff --git a/client/src/main/resources/textures/entity/luo_binghe.png b/client/src/main/resources/textures/npc/luo_binghe.png similarity index 100% rename from client/src/main/resources/textures/entity/luo_binghe.png rename to client/src/main/resources/textures/npc/luo_binghe.png diff --git a/client/src/main/resources/textures/entity/mage_1.png b/client/src/main/resources/textures/npc/mage_1.png similarity index 100% rename from client/src/main/resources/textures/entity/mage_1.png rename to client/src/main/resources/textures/npc/mage_1.png diff --git a/client/src/main/resources/textures/entity/mage_2.png b/client/src/main/resources/textures/npc/mage_2.png similarity index 100% rename from client/src/main/resources/textures/entity/mage_2.png rename to client/src/main/resources/textures/npc/mage_2.png diff --git a/client/src/main/resources/textures/entity/mage_3.png b/client/src/main/resources/textures/npc/mage_3.png similarity index 100% rename from client/src/main/resources/textures/entity/mage_3.png rename to client/src/main/resources/textures/npc/mage_3.png diff --git a/client/src/main/resources/textures/entity/mage_4.png b/client/src/main/resources/textures/npc/mage_4.png similarity index 100% rename from client/src/main/resources/textures/entity/mage_4.png rename to client/src/main/resources/textures/npc/mage_4.png diff --git a/client/src/main/resources/textures/entity/mage_5.png b/client/src/main/resources/textures/npc/mage_5.png similarity index 100% rename from client/src/main/resources/textures/entity/mage_5.png rename to client/src/main/resources/textures/npc/mage_5.png diff --git a/client/src/main/resources/textures/entity/mage_6.png b/client/src/main/resources/textures/npc/mage_6.png similarity index 100% rename from client/src/main/resources/textures/entity/mage_6.png rename to client/src/main/resources/textures/npc/mage_6.png diff --git a/client/src/main/resources/textures/entity/marine.png b/client/src/main/resources/textures/npc/marine.png similarity index 100% rename from client/src/main/resources/textures/entity/marine.png rename to client/src/main/resources/textures/npc/marine.png diff --git a/client/src/main/resources/textures/entity/marine_black_templar.png b/client/src/main/resources/textures/npc/marine_black_templar.png similarity index 100% rename from client/src/main/resources/textures/entity/marine_black_templar.png rename to client/src/main/resources/textures/npc/marine_black_templar.png diff --git a/client/src/main/resources/textures/entity/metalhead_1.png b/client/src/main/resources/textures/npc/metalhead_1.png similarity index 100% rename from client/src/main/resources/textures/entity/metalhead_1.png rename to client/src/main/resources/textures/npc/metalhead_1.png diff --git a/client/src/main/resources/textures/entity/metalhead_10.png b/client/src/main/resources/textures/npc/metalhead_10.png similarity index 100% rename from client/src/main/resources/textures/entity/metalhead_10.png rename to client/src/main/resources/textures/npc/metalhead_10.png diff --git a/client/src/main/resources/textures/entity/metalhead_11.png b/client/src/main/resources/textures/npc/metalhead_11.png similarity index 100% rename from client/src/main/resources/textures/entity/metalhead_11.png rename to client/src/main/resources/textures/npc/metalhead_11.png diff --git a/client/src/main/resources/textures/entity/metalhead_12.png b/client/src/main/resources/textures/npc/metalhead_12.png similarity index 100% rename from client/src/main/resources/textures/entity/metalhead_12.png rename to client/src/main/resources/textures/npc/metalhead_12.png diff --git a/client/src/main/resources/textures/entity/metalhead_13.png b/client/src/main/resources/textures/npc/metalhead_13.png similarity index 100% rename from client/src/main/resources/textures/entity/metalhead_13.png rename to client/src/main/resources/textures/npc/metalhead_13.png diff --git a/client/src/main/resources/textures/entity/metalhead_14.png b/client/src/main/resources/textures/npc/metalhead_14.png similarity index 100% rename from client/src/main/resources/textures/entity/metalhead_14.png rename to client/src/main/resources/textures/npc/metalhead_14.png diff --git a/client/src/main/resources/textures/entity/metalhead_2.png b/client/src/main/resources/textures/npc/metalhead_2.png similarity index 100% rename from client/src/main/resources/textures/entity/metalhead_2.png rename to client/src/main/resources/textures/npc/metalhead_2.png diff --git a/client/src/main/resources/textures/entity/metalhead_3.png b/client/src/main/resources/textures/npc/metalhead_3.png similarity index 100% rename from client/src/main/resources/textures/entity/metalhead_3.png rename to client/src/main/resources/textures/npc/metalhead_3.png diff --git a/client/src/main/resources/textures/entity/metalhead_4.png b/client/src/main/resources/textures/npc/metalhead_4.png similarity index 100% rename from client/src/main/resources/textures/entity/metalhead_4.png rename to client/src/main/resources/textures/npc/metalhead_4.png diff --git a/client/src/main/resources/textures/entity/metalhead_5.png b/client/src/main/resources/textures/npc/metalhead_5.png similarity index 100% rename from client/src/main/resources/textures/entity/metalhead_5.png rename to client/src/main/resources/textures/npc/metalhead_5.png diff --git a/client/src/main/resources/textures/entity/metalhead_6.png b/client/src/main/resources/textures/npc/metalhead_6.png similarity index 100% rename from client/src/main/resources/textures/entity/metalhead_6.png rename to client/src/main/resources/textures/npc/metalhead_6.png diff --git a/client/src/main/resources/textures/entity/metalhead_7.png b/client/src/main/resources/textures/npc/metalhead_7.png similarity index 100% rename from client/src/main/resources/textures/entity/metalhead_7.png rename to client/src/main/resources/textures/npc/metalhead_7.png diff --git a/client/src/main/resources/textures/entity/metalhead_8.png b/client/src/main/resources/textures/npc/metalhead_8.png similarity index 100% rename from client/src/main/resources/textures/entity/metalhead_8.png rename to client/src/main/resources/textures/npc/metalhead_8.png diff --git a/client/src/main/resources/textures/entity/metalhead_9.png b/client/src/main/resources/textures/npc/metalhead_9.png similarity index 100% rename from client/src/main/resources/textures/entity/metalhead_9.png rename to client/src/main/resources/textures/npc/metalhead_9.png diff --git a/client/src/main/resources/textures/entity/orc_1.png b/client/src/main/resources/textures/npc/orc_1.png similarity index 100% rename from client/src/main/resources/textures/entity/orc_1.png rename to client/src/main/resources/textures/npc/orc_1.png diff --git a/client/src/main/resources/textures/entity/orc_10.png b/client/src/main/resources/textures/npc/orc_10.png similarity index 100% rename from client/src/main/resources/textures/entity/orc_10.png rename to client/src/main/resources/textures/npc/orc_10.png diff --git a/client/src/main/resources/textures/entity/orc_11.png b/client/src/main/resources/textures/npc/orc_11.png similarity index 100% rename from client/src/main/resources/textures/entity/orc_11.png rename to client/src/main/resources/textures/npc/orc_11.png diff --git a/client/src/main/resources/textures/entity/orc_12.png b/client/src/main/resources/textures/npc/orc_12.png similarity index 100% rename from client/src/main/resources/textures/entity/orc_12.png rename to client/src/main/resources/textures/npc/orc_12.png diff --git a/client/src/main/resources/textures/entity/orc_2.png b/client/src/main/resources/textures/npc/orc_2.png similarity index 100% rename from client/src/main/resources/textures/entity/orc_2.png rename to client/src/main/resources/textures/npc/orc_2.png diff --git a/client/src/main/resources/textures/entity/orc_3.png b/client/src/main/resources/textures/npc/orc_3.png similarity index 100% rename from client/src/main/resources/textures/entity/orc_3.png rename to client/src/main/resources/textures/npc/orc_3.png diff --git a/client/src/main/resources/textures/entity/orc_4.png b/client/src/main/resources/textures/npc/orc_4.png similarity index 100% rename from client/src/main/resources/textures/entity/orc_4.png rename to client/src/main/resources/textures/npc/orc_4.png diff --git a/client/src/main/resources/textures/entity/orc_5.png b/client/src/main/resources/textures/npc/orc_5.png similarity index 100% rename from client/src/main/resources/textures/entity/orc_5.png rename to client/src/main/resources/textures/npc/orc_5.png diff --git a/client/src/main/resources/textures/entity/orc_6.png b/client/src/main/resources/textures/npc/orc_6.png similarity index 100% rename from client/src/main/resources/textures/entity/orc_6.png rename to client/src/main/resources/textures/npc/orc_6.png diff --git a/client/src/main/resources/textures/entity/orc_7.png b/client/src/main/resources/textures/npc/orc_7.png similarity index 100% rename from client/src/main/resources/textures/entity/orc_7.png rename to client/src/main/resources/textures/npc/orc_7.png diff --git a/client/src/main/resources/textures/entity/orc_8.png b/client/src/main/resources/textures/npc/orc_8.png similarity index 100% rename from client/src/main/resources/textures/entity/orc_8.png rename to client/src/main/resources/textures/npc/orc_8.png diff --git a/client/src/main/resources/textures/entity/orc_9.png b/client/src/main/resources/textures/npc/orc_9.png similarity index 100% rename from client/src/main/resources/textures/entity/orc_9.png rename to client/src/main/resources/textures/npc/orc_9.png diff --git a/client/src/main/resources/textures/entity/peasant_1.png b/client/src/main/resources/textures/npc/peasant_1.png similarity index 100% rename from client/src/main/resources/textures/entity/peasant_1.png rename to client/src/main/resources/textures/npc/peasant_1.png diff --git a/client/src/main/resources/textures/entity/peasant_2.png b/client/src/main/resources/textures/npc/peasant_2.png similarity index 100% rename from client/src/main/resources/textures/entity/peasant_2.png rename to client/src/main/resources/textures/npc/peasant_2.png diff --git a/client/src/main/resources/textures/entity/peasant_3.png b/client/src/main/resources/textures/npc/peasant_3.png similarity index 100% rename from client/src/main/resources/textures/entity/peasant_3.png rename to client/src/main/resources/textures/npc/peasant_3.png diff --git a/client/src/main/resources/textures/entity/peasant_4.png b/client/src/main/resources/textures/npc/peasant_4.png similarity index 100% rename from client/src/main/resources/textures/entity/peasant_4.png rename to client/src/main/resources/textures/npc/peasant_4.png diff --git a/client/src/main/resources/textures/entity/peasant_5.png b/client/src/main/resources/textures/npc/peasant_5.png similarity index 100% rename from client/src/main/resources/textures/entity/peasant_5.png rename to client/src/main/resources/textures/npc/peasant_5.png diff --git a/client/src/main/resources/textures/entity/peasant_6.png b/client/src/main/resources/textures/npc/peasant_6.png similarity index 100% rename from client/src/main/resources/textures/entity/peasant_6.png rename to client/src/main/resources/textures/npc/peasant_6.png diff --git a/client/src/main/resources/textures/entity/power_rod.png b/client/src/main/resources/textures/npc/power_rod.png similarity index 100% rename from client/src/main/resources/textures/entity/power_rod.png rename to client/src/main/resources/textures/npc/power_rod.png diff --git a/client/src/main/resources/textures/entity/shen_qingqiu.png b/client/src/main/resources/textures/npc/shen_qingqiu.png similarity index 100% rename from client/src/main/resources/textures/entity/shen_qingqiu.png rename to client/src/main/resources/textures/npc/shen_qingqiu.png diff --git a/client/src/main/resources/textures/entity/skull.png b/client/src/main/resources/textures/npc/skull.png similarity index 100% rename from client/src/main/resources/textures/entity/skull.png rename to client/src/main/resources/textures/npc/skull.png diff --git a/client/src/main/resources/textures/entity/slime.png b/client/src/main/resources/textures/npc/slime.png similarity index 100% rename from client/src/main/resources/textures/entity/slime.png rename to client/src/main/resources/textures/npc/slime.png diff --git a/client/src/main/resources/textures/entity/spirit.png b/client/src/main/resources/textures/npc/spirit.png similarity index 100% rename from client/src/main/resources/textures/entity/spirit.png rename to client/src/main/resources/textures/npc/spirit.png diff --git a/client/src/main/resources/textures/entity/thranduil.png b/client/src/main/resources/textures/npc/thranduil.png similarity index 100% rename from client/src/main/resources/textures/entity/thranduil.png rename to client/src/main/resources/textures/npc/thranduil.png diff --git a/client/src/main/resources/textures/entity/tiefling.png b/client/src/main/resources/textures/npc/tiefling.png similarity index 100% rename from client/src/main/resources/textures/entity/tiefling.png rename to client/src/main/resources/textures/npc/tiefling.png diff --git a/client/src/main/resources/textures/entity/tinyarachnoid.png b/client/src/main/resources/textures/npc/tinyarachnoid.png similarity index 100% rename from client/src/main/resources/textures/entity/tinyarachnoid.png rename to client/src/main/resources/textures/npc/tinyarachnoid.png diff --git a/client/src/main/resources/textures/entity/trollface.png b/client/src/main/resources/textures/npc/trollface.png similarity index 100% rename from client/src/main/resources/textures/entity/trollface.png rename to client/src/main/resources/textures/npc/trollface.png diff --git a/client/src/main/resources/textures/entity/undead_1.png b/client/src/main/resources/textures/npc/undead_1.png similarity index 100% rename from client/src/main/resources/textures/entity/undead_1.png rename to client/src/main/resources/textures/npc/undead_1.png diff --git a/client/src/main/resources/textures/entity/undead_2.png b/client/src/main/resources/textures/npc/undead_2.png similarity index 100% rename from client/src/main/resources/textures/entity/undead_2.png rename to client/src/main/resources/textures/npc/undead_2.png diff --git a/client/src/main/resources/textures/entity/undead_3.png b/client/src/main/resources/textures/npc/undead_3.png similarity index 100% rename from client/src/main/resources/textures/entity/undead_3.png rename to client/src/main/resources/textures/npc/undead_3.png diff --git a/client/src/main/resources/textures/entity/undead_4.png b/client/src/main/resources/textures/npc/undead_4.png similarity index 100% rename from client/src/main/resources/textures/entity/undead_4.png rename to client/src/main/resources/textures/npc/undead_4.png diff --git a/client/src/main/resources/textures/entity/vampire_1.png b/client/src/main/resources/textures/npc/vampire_1.png similarity index 100% rename from client/src/main/resources/textures/entity/vampire_1.png rename to client/src/main/resources/textures/npc/vampire_1.png diff --git a/client/src/main/resources/textures/entity/vampire_2.png b/client/src/main/resources/textures/npc/vampire_2.png similarity index 100% rename from client/src/main/resources/textures/entity/vampire_2.png rename to client/src/main/resources/textures/npc/vampire_2.png diff --git a/client/src/main/resources/textures/entity/vampire_3.png b/client/src/main/resources/textures/npc/vampire_3.png similarity index 100% rename from client/src/main/resources/textures/entity/vampire_3.png rename to client/src/main/resources/textures/npc/vampire_3.png diff --git a/client/src/main/resources/textures/entity/vampire_4.png b/client/src/main/resources/textures/npc/vampire_4.png similarity index 100% rename from client/src/main/resources/textures/entity/vampire_4.png rename to client/src/main/resources/textures/npc/vampire_4.png diff --git a/client/src/main/resources/textures/entity/vampire_5.png b/client/src/main/resources/textures/npc/vampire_5.png similarity index 100% rename from client/src/main/resources/textures/entity/vampire_5.png rename to client/src/main/resources/textures/npc/vampire_5.png diff --git a/client/src/main/resources/textures/entity/vampire_6.png b/client/src/main/resources/textures/npc/vampire_6.png similarity index 100% rename from client/src/main/resources/textures/entity/vampire_6.png rename to client/src/main/resources/textures/npc/vampire_6.png diff --git a/client/src/main/resources/textures/entity/vampire_7.png b/client/src/main/resources/textures/npc/vampire_7.png similarity index 100% rename from client/src/main/resources/textures/entity/vampire_7.png rename to client/src/main/resources/textures/npc/vampire_7.png diff --git a/client/src/main/resources/textures/entity/vampire_8.png b/client/src/main/resources/textures/npc/vampire_8.png similarity index 100% rename from client/src/main/resources/textures/entity/vampire_8.png rename to client/src/main/resources/textures/npc/vampire_8.png diff --git a/client/src/main/resources/textures/entity/wei_wuxian.png b/client/src/main/resources/textures/npc/wei_wuxian.png similarity index 100% rename from client/src/main/resources/textures/entity/wei_wuxian.png rename to client/src/main/resources/textures/npc/wei_wuxian.png diff --git a/client/src/main/resources/textures/entity/woodelf.png b/client/src/main/resources/textures/npc/woodelf.png similarity index 100% rename from client/src/main/resources/textures/entity/woodelf.png rename to client/src/main/resources/textures/npc/woodelf.png diff --git a/client/src/main/resources/textures/entity/zombie_1.png b/client/src/main/resources/textures/npc/zombie_1.png similarity index 100% rename from client/src/main/resources/textures/entity/zombie_1.png rename to client/src/main/resources/textures/npc/zombie_1.png diff --git a/client/src/main/resources/textures/entity/zombie_2.png b/client/src/main/resources/textures/npc/zombie_2.png similarity index 100% rename from client/src/main/resources/textures/entity/zombie_2.png rename to client/src/main/resources/textures/npc/zombie_2.png diff --git a/client/src/main/resources/textures/entity/zombie_3.png b/client/src/main/resources/textures/npc/zombie_3.png similarity index 100% rename from client/src/main/resources/textures/entity/zombie_3.png rename to client/src/main/resources/textures/npc/zombie_3.png diff --git a/client/src/main/resources/textures/entity/zombie_4.png b/client/src/main/resources/textures/npc/zombie_4.png similarity index 100% rename from client/src/main/resources/textures/entity/zombie_4.png rename to client/src/main/resources/textures/npc/zombie_4.png diff --git a/client/src/main/resources/textures/entity/zombie_5.png b/client/src/main/resources/textures/npc/zombie_5.png similarity index 100% rename from client/src/main/resources/textures/entity/zombie_5.png rename to client/src/main/resources/textures/npc/zombie_5.png diff --git a/client/src/main/resources/textures/entity/zombie_6.png b/client/src/main/resources/textures/npc/zombie_6.png similarity index 100% rename from client/src/main/resources/textures/entity/zombie_6.png rename to client/src/main/resources/textures/npc/zombie_6.png diff --git a/client/src/main/resources/textures/entity/arrow.png b/client/src/main/resources/textures/object/arrow.png similarity index 100% rename from client/src/main/resources/textures/entity/arrow.png rename to client/src/main/resources/textures/object/arrow.png diff --git a/client/src/main/resources/textures/entity/boat.png b/client/src/main/resources/textures/object/boat.png similarity index 100% rename from client/src/main/resources/textures/entity/boat.png rename to client/src/main/resources/textures/object/boat.png diff --git a/client/src/main/resources/textures/entity/box.png b/client/src/main/resources/textures/object/box.png similarity index 100% rename from client/src/main/resources/textures/entity/box.png rename to client/src/main/resources/textures/object/box.png diff --git a/client/src/main/resources/textures/entity/box_brittle.png b/client/src/main/resources/textures/object/box_brittle.png similarity index 100% rename from client/src/main/resources/textures/entity/box_brittle.png rename to client/src/main/resources/textures/object/box_brittle.png diff --git a/client/src/main/resources/textures/entity/bullet.png b/client/src/main/resources/textures/object/bullet.png similarity index 100% rename from client/src/main/resources/textures/entity/bullet.png rename to client/src/main/resources/textures/object/bullet.png diff --git a/client/src/main/resources/textures/entity/crystal.png b/client/src/main/resources/textures/object/crystal.png similarity index 100% rename from client/src/main/resources/textures/entity/crystal.png rename to client/src/main/resources/textures/object/crystal.png diff --git a/client/src/main/resources/textures/object/experience.png b/client/src/main/resources/textures/object/experience.png new file mode 100755 index 00000000..dfd9697e Binary files /dev/null and b/client/src/main/resources/textures/object/experience.png differ diff --git a/client/src/main/resources/textures/entity/hook.png b/client/src/main/resources/textures/object/hook.png similarity index 100% rename from client/src/main/resources/textures/entity/hook.png rename to client/src/main/resources/textures/object/hook.png diff --git a/client/src/main/resources/textures/entity/lead_knot.png b/client/src/main/resources/textures/object/lead_knot.png similarity index 100% rename from client/src/main/resources/textures/entity/lead_knot.png rename to client/src/main/resources/textures/object/lead_knot.png diff --git a/client/src/main/resources/textures/entity/minecart.png b/client/src/main/resources/textures/object/minecart.png similarity index 100% rename from client/src/main/resources/textures/entity/minecart.png rename to client/src/main/resources/textures/object/minecart.png diff --git a/client/src/main/resources/textures/entity/missile.png b/client/src/main/resources/textures/object/missile.png similarity index 100% rename from client/src/main/resources/textures/entity/missile.png rename to client/src/main/resources/textures/object/missile.png diff --git a/client/src/main/resources/textures/entity/crystal_beam.png b/client/src/main/resources/textures/world/beam.png similarity index 100% rename from client/src/main/resources/textures/entity/crystal_beam.png rename to client/src/main/resources/textures/world/beam.png diff --git a/common/src/main/java/common/ai/EntityAIOcelotAttack.java b/common/src/main/java/common/ai/EntityAICatAttack.java similarity index 95% rename from common/src/main/java/common/ai/EntityAIOcelotAttack.java rename to common/src/main/java/common/ai/EntityAICatAttack.java index 87c61e82..aeeb8282 100755 --- a/common/src/main/java/common/ai/EntityAIOcelotAttack.java +++ b/common/src/main/java/common/ai/EntityAICatAttack.java @@ -3,14 +3,14 @@ package common.ai; import common.entity.types.EntityLiving; import common.world.World; -public class EntityAIOcelotAttack extends EntityAIBase +public class EntityAICatAttack extends EntityAIBase { World theWorld; EntityLiving theEntity; EntityLiving theVictim; int attackCountdown; - public EntityAIOcelotAttack(EntityLiving theEntityIn) + public EntityAICatAttack(EntityLiving theEntityIn) { this.theEntity = theEntityIn; this.theWorld = theEntityIn.worldObj; diff --git a/common/src/main/java/common/ai/EntityAIOcelotSit.java b/common/src/main/java/common/ai/EntityAICatSit.java similarity index 76% rename from common/src/main/java/common/ai/EntityAIOcelotSit.java rename to common/src/main/java/common/ai/EntityAICatSit.java index 407c6fd1..a39ef9df 100755 --- a/common/src/main/java/common/ai/EntityAIOcelotSit.java +++ b/common/src/main/java/common/ai/EntityAICatSit.java @@ -2,7 +2,7 @@ package common.ai; import common.block.Block; import common.block.artificial.BlockBed; -import common.entity.animal.EntityOcelot; +import common.entity.animal.EntityCat; import common.init.Blocks; import common.tileentity.TileEntity; import common.tileentity.TileEntityChest; @@ -10,14 +10,14 @@ import common.util.BlockPos; import common.world.State; import common.world.World; -public class EntityAIOcelotSit extends EntityAIMoveToBlock +public class EntityAICatSit extends EntityAIMoveToBlock { - private final EntityOcelot ocelot; + private final EntityCat cat; - public EntityAIOcelotSit(EntityOcelot ocelotIn, double p_i45315_2_) + public EntityAICatSit(EntityCat cat, double p_i45315_2_) { - super(ocelotIn, p_i45315_2_, 8); - this.ocelot = ocelotIn; + super(cat, p_i45315_2_, 8); + this.cat = cat; } /** @@ -25,7 +25,7 @@ public class EntityAIOcelotSit extends EntityAIMoveToBlock */ public boolean shouldExecute() { - return this.ocelot.isTamed() && !this.ocelot.isSitting() && super.shouldExecute(); + return this.cat.isTamed() && !this.cat.isSitting() && super.shouldExecute(); } /** @@ -42,7 +42,7 @@ public class EntityAIOcelotSit extends EntityAIMoveToBlock public void startExecuting() { super.startExecuting(); - this.ocelot.getAISit().setSitting(false); + this.cat.getAISit().setSitting(false); } /** @@ -51,7 +51,7 @@ public class EntityAIOcelotSit extends EntityAIMoveToBlock public void resetTask() { super.resetTask(); - this.ocelot.setSitting(false); + this.cat.setSitting(false); } /** @@ -60,15 +60,15 @@ public class EntityAIOcelotSit extends EntityAIMoveToBlock public void updateTask() { super.updateTask(); - this.ocelot.getAISit().setSitting(false); + this.cat.getAISit().setSitting(false); if (!this.getIsAboveDestination()) { - this.ocelot.setSitting(false); + this.cat.setSitting(false); } - else if (!this.ocelot.isSitting()) + else if (!this.cat.isSitting()) { - this.ocelot.setSitting(true); + this.cat.setSitting(true); } } diff --git a/common/src/main/java/common/ai/EntityAISwimNavigate.java b/common/src/main/java/common/ai/EntityAISwimNavigate.java new file mode 100644 index 00000000..2fa34da4 --- /dev/null +++ b/common/src/main/java/common/ai/EntityAISwimNavigate.java @@ -0,0 +1,26 @@ +package common.ai; + +import common.entity.npc.EntityNPC; +import common.pathfinding.PathNavigateGround; + +public class EntityAISwimNavigate extends EntityAIBase +{ + private EntityNPC theEntity; + + public EntityAISwimNavigate(EntityNPC entitylivingIn) + { + this.theEntity = entitylivingIn; + this.setMutexBits(4); + ((PathNavigateGround)entitylivingIn.getNavigator()).setCanSwim(true); + } + + public boolean shouldExecute() + { + return (this.theEntity.isInLiquid() || this.theEntity.isInMolten()) && !this.theEntity.getNavigator().noPath() && !this.theEntity.getMoveHelper().isUpdating() && this.theEntity.posY < this.theEntity.getMoveHelper().getY() - 1.15; + } + + public void updateTask() + { + this.theEntity.getJumpHelper().setJumping(); + } +} diff --git a/common/src/main/java/common/block/tech/BlockChest.java b/common/src/main/java/common/block/tech/BlockChest.java index b159f3ab..3b9dd583 100755 --- a/common/src/main/java/common/block/tech/BlockChest.java +++ b/common/src/main/java/common/block/tech/BlockChest.java @@ -6,7 +6,7 @@ import common.block.Rotatable; import common.block.Material; import common.color.TextColor; import common.entity.Entity; -import common.entity.animal.EntityOcelot; +import common.entity.animal.EntityCat; import common.entity.npc.EntityNPC; import common.entity.types.EntityLiving; import common.init.Items; @@ -571,7 +571,7 @@ public class BlockChest extends BlockContainer implements Rotatable private boolean isBlocked(World worldIn, BlockPos pos) { - return this.isBelowSolidBlock(worldIn, pos) || this.isOcelotSittingOnChest(worldIn, pos); + return this.isBelowSolidBlock(worldIn, pos) || this.isCatSittingOnChest(worldIn, pos); } private boolean isBelowSolidBlock(World worldIn, BlockPos pos) @@ -579,13 +579,13 @@ public class BlockChest extends BlockContainer implements Rotatable return worldIn.getState(pos.up()).getBlock().isNormalCube(); } - private boolean isOcelotSittingOnChest(World worldIn, BlockPos pos) + private boolean isCatSittingOnChest(World worldIn, BlockPos pos) { - for (Entity entity : worldIn.getEntitiesWithinAABB(EntityOcelot.class, new BoundingBox((double)pos.getX(), (double)(pos.getY() + 1), (double)pos.getZ(), (double)(pos.getX() + 1), (double)(pos.getY() + 2), (double)(pos.getZ() + 1)))) + for (Entity entity : worldIn.getEntitiesWithinAABB(EntityCat.class, new BoundingBox((double)pos.getX(), (double)(pos.getY() + 1), (double)pos.getZ(), (double)(pos.getX() + 1), (double)(pos.getY() + 2), (double)(pos.getZ() + 1)))) { - EntityOcelot entityocelot = (EntityOcelot)entity; + EntityCat cat = (EntityCat)entity; - if (entityocelot.isSitting()) + if (cat.isSitting()) { return true; } diff --git a/common/src/main/java/common/dimension/Dimension.java b/common/src/main/java/common/dimension/Dimension.java index 66c12e43..c2617660 100755 --- a/common/src/main/java/common/dimension/Dimension.java +++ b/common/src/main/java/common/dimension/Dimension.java @@ -149,6 +149,8 @@ public abstract class Dimension extends Nameable { private int skyColor = 0x000000; private int fogColor = 0x000000; private int cloudColor = 0x000000; + private int lightColor = 0xffffffff; + private int blockColor = 0xffffffff; private float starBrightness = 0.0f; private float deepstarBrightness = 0.0f; private CloudType cloudTexture = CloudType.NORMAL; @@ -549,6 +551,16 @@ public abstract class Dimension extends Nameable { return this; } + public final Dimension setLightColor(int value) { + this.lightColor = value; + return this; + } + + public final Dimension setBlockColor(int value) { + this.blockColor = value; + return this; + } + public final Dimension setTimeQualifier(int value) { this.timeQualifier = value; @@ -698,6 +710,14 @@ public abstract class Dimension extends Nameable { return this.cloudColor; } + public final int getLightColor() { + return this.lightColor; + } + + public final int getBlockColor() { + return this.blockColor; + } + public final String getCloudTexture() { return "textures/world/" + this.cloudTexture.getTexture() + ".png"; } @@ -1005,6 +1025,8 @@ public abstract class Dimension extends Nameable { this.skyColor = tag.getInt("SkyColor"); this.fogColor = tag.getInt("FogColor"); this.cloudColor = tag.getInt("CloudColor"); + this.lightColor = tag.getInt("LightColor"); + this.blockColor = tag.getInt("BlockColor"); this.gravity = tag.getFloat("Gravity"); this.temperature = tag.getFloat("Temperature"); this.orbitOffset = tag.getFloat("OrbitOffset"); @@ -1181,6 +1203,8 @@ public abstract class Dimension extends Nameable { tag.setInt("SkyColor", this.skyColor); tag.setInt("FogColor", this.fogColor); tag.setInt("CloudColor", this.cloudColor); + tag.setInt("LightColor", this.lightColor); + tag.setInt("BlockColor", this.blockColor); tag.setFloat("Gravity", this.gravity); tag.setFloat("Temperature", this.temperature); tag.setFloat("OrbitOffset", this.orbitOffset); diff --git a/common/src/main/java/common/entity/animal/EntityOcelot.java b/common/src/main/java/common/entity/animal/EntityCat.java similarity index 90% rename from common/src/main/java/common/entity/animal/EntityOcelot.java rename to common/src/main/java/common/entity/animal/EntityCat.java index 2cffee8e..7305c7e8 100755 --- a/common/src/main/java/common/entity/animal/EntityOcelot.java +++ b/common/src/main/java/common/entity/animal/EntityCat.java @@ -6,8 +6,8 @@ import common.ai.EntityAIAvoidEntity; import common.ai.EntityAIFollowOwner; import common.ai.EntityAILeapAtTarget; import common.ai.EntityAIMate; -import common.ai.EntityAIOcelotAttack; -import common.ai.EntityAIOcelotSit; +import common.ai.EntityAICatAttack; +import common.ai.EntityAICatSit; import common.ai.EntityAISwimming; import common.ai.EntityAITargetNonTamed; import common.ai.EntityAITempt; @@ -30,7 +30,7 @@ import common.tags.TagObject; import common.vars.Vars; import common.world.World; -public class EntityOcelot extends EntityTameable +public class EntityCat extends EntityTameable { private EntityAIAvoidEntity avoidEntity; @@ -40,7 +40,7 @@ public class EntityOcelot extends EntityTameable private EntityAITempt aiTempt; private boolean wasTempted; - public EntityOcelot(World worldIn) + public EntityCat(World worldIn) { super(worldIn); this.setSize(0.6F, 0.7F); @@ -49,9 +49,9 @@ public class EntityOcelot extends EntityTameable this.tasks.addTask(2, this.aiSit); this.tasks.addTask(3, this.aiTempt = new EntityAITempt(this, 0.6D, stack -> stack.getItem() instanceof ItemFishFood fish && !fish.isCooked(), true)); this.tasks.addTask(5, new EntityAIFollowOwner(this, 1.0D, 10.0F, 5.0F)); - this.tasks.addTask(6, new EntityAIOcelotSit(this, 0.8D)); + this.tasks.addTask(6, new EntityAICatSit(this, 0.8D)); this.tasks.addTask(7, new EntityAILeapAtTarget(this, 0.3F)); - this.tasks.addTask(8, new EntityAIOcelotAttack(this)); + this.tasks.addTask(8, new EntityAICatAttack(this)); this.tasks.addTask(9, new EntityAIMate(this, 0.8D)); this.tasks.addTask(10, new EntityAIWander(this, 0.8D)); this.tasks.addTask(11, new EntityAIWatchClosest(this, null, 10.0F)); @@ -248,18 +248,17 @@ public class EntityOcelot extends EntityTameable return super.interact(player); } - public EntityOcelot createChild(EntityLiving ageable) + public EntityCat createChild(EntityLiving ageable) { - EntityOcelot entityocelot = new EntityOcelot(this.worldObj); + EntityCat child = new EntityCat(this.worldObj); if (this.isTamed()) { -// entityocelot.setOwnerId(this.getOwnerId()); - entityocelot.setTamed(true); - entityocelot.setTameSkin(this.getTameSkin()); + child.setTamed(true); + child.setTameSkin(this.getTameSkin()); } - return entityocelot; + return child; } /** @@ -284,14 +283,14 @@ public class EntityOcelot extends EntityTameable // { // return false; // } - else if (!(otherAnimal instanceof EntityOcelot)) + else if (!(otherAnimal instanceof EntityCat)) { return false; } else { - EntityOcelot entityocelot = (EntityOcelot)otherAnimal; - return (entityocelot.isTamed() != this.isTamed()) ? false : this.isInLove() && entityocelot.isInLove(); + EntityCat cat = (EntityCat)otherAnimal; + return (cat.isTamed() != this.isTamed()) ? false : this.isInLove() && cat.isInLove(); } } @@ -380,10 +379,10 @@ public class EntityOcelot extends EntityTameable { for (int i = 0; i < 2; ++i) { - EntityOcelot entityocelot = new EntityOcelot(this.worldObj); - entityocelot.setLocationAndAngles(this.posX, this.posY, this.posZ, this.rotYaw, 0.0F); - entityocelot.setGrowingAge(-24000); - this.worldObj.spawnEntityInWorld(entityocelot); + EntityCat baby = new EntityCat(this.worldObj); + baby.setLocationAndAngles(this.posX, this.posY, this.posZ, this.rotYaw, 0.0F); + baby.setGrowingAge(-24000); + this.worldObj.spawnEntityInWorld(baby); } } diff --git a/common/src/main/java/common/entity/animal/EntityHorse.java b/common/src/main/java/common/entity/animal/EntityHorse.java index a56f2b62..18423932 100755 --- a/common/src/main/java/common/entity/animal/EntityHorse.java +++ b/common/src/main/java/common/entity/animal/EntityHorse.java @@ -49,9 +49,9 @@ public class EntityHorse extends EntityAnimal implements IInvBasic private static final String[] horseArmorTextures = new String[] {null, "textures/armor/horse_armor_iron.png", "textures/armor/horse_armor_gold.png", "textures/armor/horse_armor_diamond.png"}; private static final String[] HORSE_ARMOR_TEXTURES_ABBR = new String[] {"", "meo", "goo", "dio"}; private static final int[] armorValues = new int[] {0, 5, 7, 11}; - private static final String[] horseTextures = new String[] {"textures/entity/horse_white.png", "textures/entity/horse_creamy.png", "textures/entity/horse_chestnut.png", "textures/entity/horse_brown.png", "textures/entity/horse_black.png", "textures/entity/horse_gray.png", "textures/entity/horse_darkbrown.png"}; + private static final String[] horseTextures = new String[] {"textures/creature/horse_white.png", "textures/creature/horse_creamy.png", "textures/creature/horse_chestnut.png", "textures/creature/horse_brown.png", "textures/creature/horse_black.png", "textures/creature/horse_gray.png", "textures/creature/horse_darkbrown.png"}; private static final String[] HORSE_TEXTURES_ABBR = new String[] {"hwh", "hcr", "hch", "hbr", "hbl", "hgr", "hdb"}; - private static final String[] horseMarkingTextures = new String[] {null, "textures/entity/horse_markings_white.png", "textures/entity/horse_markings_whitefield.png", "textures/entity/horse_markings_whitedots.png", "textures/entity/horse_markings_blackdots.png"}; + private static final String[] horseMarkingTextures = new String[] {null, "textures/creature/horse_markings_white.png", "textures/creature/horse_markings_whitefield.png", "textures/creature/horse_markings_whitedots.png", "textures/creature/horse_markings_blackdots.png"}; private static final String[] HORSE_MARKING_TEXTURES_ABBR = new String[] {"", "wo_", "wmo", "wdo", "bdo"}; private int eatingHaystackCounter; private int openMouthCounter; @@ -116,7 +116,7 @@ public class EntityHorse extends EntityAnimal implements IInvBasic } /** - * Returns the horse type. 0 = Normal, 1 = Donkey, 2 = Mule, 3 = Undead Horse, 4 = Skeleton Horse + * Returns the horse type. 0 = Normal, 1 = Donkey, 2 = Mule */ public int getHorseType() { @@ -250,11 +250,6 @@ public class EntityHorse extends EntityAnimal implements IInvBasic this.horseJumping = jumping; } - public boolean allowLeashing() - { - return !this.isUndead() && super.allowLeashing(); - } - protected void onUpdateLeashed(float distance) { if (distance > 6.0F && this.isEatingHaystack()) @@ -570,9 +565,7 @@ public class EntityHorse extends EntityAnimal implements IInvBasic protected Item getDropItem() { - boolean flag = this.rand.chance(4); - int i = this.getHorseType(); - return i == 4 ? Items.bone : (i == 3 ? (flag ? null : Items.rotten_flesh) : Items.leather); + return Items.leather; } /** @@ -805,10 +798,6 @@ public class EntityHorse extends EntityAnimal implements IInvBasic { return super.interact(player); } - else if (!this.isTame() && this.isUndead()) - { - return false; - } else if (this.isTame() && this.isAdultHorse() && player.isSneaking()) { this.openGUI(player); @@ -854,7 +843,7 @@ public class EntityHorse extends EntityAnimal implements IInvBasic } } - if (!flag && !this.isUndead()) + if (!flag) { int hp = 0; int j = 0; @@ -1027,20 +1016,11 @@ public class EntityHorse extends EntityAnimal implements IInvBasic } /** - * Used to know if the horse can be leashed, if he can mate, or if we can interact with him - */ - public boolean isUndead() - { - int i = this.getHorseType(); - return i == 3 || i == 4; - } - - /** - * Return true if the horse entity is sterile (Undead || Mule) + * Return true if the horse entity is sterile (Mule) */ public boolean isSterile() { - return this.isUndead() || this.getHorseType() == 2; + return this.getHorseType() == 2; } /** @@ -1540,56 +1520,56 @@ public class EntityHorse extends EntityAnimal implements IInvBasic { EntityHorse entityhorse = (EntityHorse)ageable; EntityHorse entityhorse1 = new EntityHorse(this.worldObj); - int i = this.getHorseType(); - int j = entityhorse.getHorseType(); - int k = 0; + int t1 = this.getHorseType(); + int t2 = entityhorse.getHorseType(); + int type = 0; - if (i == j) + if (t1 == t2) { - k = i; + type = t1; } - else if (i == 0 && j == 1 || i == 1 && j == 0) + else if (t1 == 0 && t2 == 1 || t1 == 1 && t2 == 0) { - k = 2; + type = 2; } - if (k == 0) + if (type == 0) { int i1 = this.rand.zrange(9); - int l; + int variant; if (i1 < 4) { - l = this.getHorseVariant() & 255; + variant = this.getHorseVariant() & 255; } else if (i1 < 8) { - l = entityhorse.getHorseVariant() & 255; + variant = entityhorse.getHorseVariant() & 255; } else { - l = this.rand.zrange(7); + variant = this.rand.zrange(7); } int j1 = this.rand.zrange(5); if (j1 < 2) { - l = l | this.getHorseVariant() & 65280; + variant = variant | this.getHorseVariant() & 65280; } else if (j1 < 4) { - l = l | entityhorse.getHorseVariant() & 65280; + variant = variant | entityhorse.getHorseVariant() & 65280; } else { - l = l | this.rand.zrange(5) << 8 & 65280; + variant = variant | this.rand.zrange(5) << 8 & 65280; } - entityhorse1.setHorseVariant(l); + entityhorse1.setHorseVariant(variant); } - entityhorse1.setHorseType(k); + entityhorse1.setHorseType(type); int d1 = this.getMaxHealth() + ageable.getMaxHealth() + this.getModifiedMaxHealth(); entityhorse1.setMaxHealth(d1 / 3); float d2 = this.getHorseJumpStrength() + entityhorse.getHorseJumpStrength() + this.getModifiedJumpStrength(); @@ -1602,59 +1582,51 @@ public class EntityHorse extends EntityAnimal implements IInvBasic public Object onInitialSpawn(Object livingdata) { livingdata = super.onInitialSpawn(livingdata); - int i = 0; - int j = 0; + int type = 0; + int variant = 0; if (livingdata instanceof EntityHorse.GroupData) { - i = ((EntityHorse.GroupData)livingdata).horseType; - j = ((EntityHorse.GroupData)livingdata).horseVariant & 255 | this.rand.zrange(5) << 8; + type = ((EntityHorse.GroupData)livingdata).horseType; + variant = ((EntityHorse.GroupData)livingdata).horseVariant & 255 | this.rand.zrange(5) << 8; } else { if (this.rand.chance(10)) { - i = 1; + type = 1; } else { int k = this.rand.zrange(7); int l = this.rand.zrange(5); - i = 0; - j = k | l << 8; + type = 0; + variant = k | l << 8; } - livingdata = new EntityHorse.GroupData(i, j); + livingdata = new EntityHorse.GroupData(type, variant); } - this.setHorseType(i); - this.setHorseVariant(j); + this.setHorseType(type); + this.setHorseVariant(variant); if (this.rand.chance(5)) { this.setGrowingAge(-24000); } - if (i != 4 && i != 3) - { - this.setMaxHealth(this.getModifiedMaxHealth()); + this.setMaxHealth(this.getModifiedMaxHealth()); - if (i == 0) - { - this.setSpeedBase(this.getModifiedMovementSpeed()); - } - else - { - this.setSpeedBase(0.17499999701976776f); - } + if (type == 0) + { + this.setSpeedBase(this.getModifiedMovementSpeed()); } else { - this.setMaxHealth(15); - this.setSpeedBase(0.20000000298023224f); + this.setSpeedBase(0.17499999701976776f); } - if (i != 2 && i != 1) + if (type != 2 && type != 1) { this.setHorseJumpStrength(this.getModifiedJumpStrength()); } diff --git a/common/src/main/java/common/entity/animal/EntityMooshroom.java b/common/src/main/java/common/entity/animal/EntityMooshroom.java deleted file mode 100755 index 256f5f16..00000000 --- a/common/src/main/java/common/entity/animal/EntityMooshroom.java +++ /dev/null @@ -1,90 +0,0 @@ -package common.entity.animal; - -import common.entity.item.EntityItem; -import common.entity.npc.EntityNPC; -import common.entity.types.EntityLiving; -import common.init.Blocks; -import common.init.Items; -import common.init.SoundEvent; -import common.item.ItemStack; -import common.item.tool.ItemShears; -import common.util.ParticleType; -import common.world.World; - -public class EntityMooshroom extends EntityCow -{ - public EntityMooshroom(World worldIn) - { - super(worldIn); - this.setSize(0.9F, 1.3F); - this.spawnableBlocks.clear(); - this.spawnableBlocks.add(Blocks.mycelium); - } - - /** - * Called when a player interacts with a mob. e.g. gets milk from a cow, gets into the saddle on a pig. - */ - public boolean interact(EntityNPC player) - { - ItemStack itemstack = player.inventory.getCurrentItem(); - - if (itemstack != null && itemstack.getItem() == Items.bowl && !this.isChild()) - { - if (itemstack.getSize() == 1) - { - player.inventory.setInventorySlotContents(player.inventory.currentItem, new ItemStack(Items.mushroom_stew)); - return true; - } - - if (player.inventory.addItemStackToInventory(new ItemStack(Items.mushroom_stew))) // && !player.creative) - { - player.inventory.decrStackSize(player.inventory.currentItem, 1); - return true; - } - } - - if (itemstack != null && itemstack.getItem() instanceof ItemShears && !this.isChild()) - { - this.setDead(); - this.worldObj.spawnParticle(ParticleType.EXPLOSION_LARGE, this.posX, this.posY + (double)(this.height / 2.0F), this.posZ, 100); - - if (!this.worldObj.client) - { - EntityCow entitycow = new EntityCow(this.worldObj); - entitycow.setLocationAndAngles(this.posX, this.posY, this.posZ, this.rotYaw, this.rotPitch); - entitycow.setHealth(this.getHealth()); - entitycow.yawOffset = this.yawOffset; - - if (this.hasCustomName()) - { - entitycow.setCustomNameTag(this.getCustomNameTag()); - } - - this.worldObj.spawnEntityInWorld(entitycow); - - for (int i = 0; i < 5; ++i) - { - this.worldObj.spawnEntityInWorld(new EntityItem(this.worldObj, this.posX, this.posY + (double)this.height, this.posZ, new ItemStack(Items.red_mushroom))); - } - - itemstack.damage(1, player); - this.playSound(SoundEvent.CUT, 1.0F); - } - - return true; - } - else - { - return super.interact(player); - } - } - - public EntityMooshroom createChild(EntityLiving ageable) - { - return new EntityMooshroom(this.worldObj); - } - - public int getColor() { - return 0x7c4c83; - } -} diff --git a/common/src/main/java/common/entity/animal/EntitySquid.java b/common/src/main/java/common/entity/animal/EntitySquid.java deleted file mode 100755 index c64ba376..00000000 --- a/common/src/main/java/common/entity/animal/EntitySquid.java +++ /dev/null @@ -1,292 +0,0 @@ -package common.entity.animal; - -import common.ai.EntityAIBase; -import common.entity.npc.Alignment; -import common.entity.types.EntityWaterMob; -import common.init.Items; -import common.init.SoundEvent; -import common.item.Item; -import common.item.ItemStack; -import common.util.ExtMath; -import common.world.World; - -public class EntitySquid extends EntityWaterMob -{ - public float squidPitch; - public float prevSquidPitch; - public float squidYaw; - public float prevSquidYaw; - - /** - * appears to be rotation in radians; we already have pitch & yaw, so this completes the triumvirate. - */ - public float squidRotation; - - /** previous squidRotation in radians */ - public float prevSquidRotation; - - /** angle of the tentacles in radians */ - public float tentacleAngle; - - /** the last calculated angle of the tentacles in radians */ - public float lastTentacleAngle; - private float randomMotionSpeed; - - /** change in squidRotation in radians. */ - private float rotationVelocity; - private float field_70871_bB; - private float randomMotionVecX; - private float randomMotionVecY; - private float randomMotionVecZ; - - public EntitySquid(World worldIn) - { - super(worldIn); - this.setSize(0.95F, 0.95F); - this.rand.setSeed((long)(1 + this.getId())); - this.rotationVelocity = 1.0F / (this.rand.floatv() + 1.0F) * 0.2F; - this.tasks.addTask(0, new EntitySquid.AIMoveRandom(this)); - } - - protected void applyEntityAttributes() - { - super.applyEntityAttributes(); - this.setMaxHealth(10); - } - - public float getEyeHeight() - { - return this.height * 0.5F; - } - -// /** -// * Returns the sound this mob makes while it's alive. -// */ -// protected String getLivingSound() -// { -// return null; -// } - - /** - * Returns the sound this mob makes when it is hurt. - */ - protected SoundEvent getHurtSound() - { - return null; - } - - /** - * Returns the sound this mob makes on death. - */ - protected SoundEvent getDeathSound() - { - return null; - } - - /** - * Returns the volume for the sounds this mob makes. - */ - protected float getSoundVolume() - { - return 0.4F; - } - - protected Item getDropItem() - { - return null; - } - - /** - * returns if this entity triggers Block.onEntityWalking on the blocks they walk on. used for spiders and wolves to - * prevent them from trampling crops - */ - protected boolean canTriggerWalking() - { - return false; - } - - /** - * Drop 0-2 items of this living's type - * - * @param wasRecentlyHit true if this this entity was recently hit by appropriate entity (generally only if player - * or tameable) - * @param lootingModifier level of enchanment to be applied to this drop - */ - protected void dropFewItems(boolean wasRecentlyHit, int lootingModifier) - { - int i = this.rand.roll(3 + lootingModifier); - - for (int j = 0; j < i; ++j) - { - this.entityDropItem(new ItemStack(Items.ink_sack), 0.0F); - } - } - - /** - * Checks if this entity is inside water (if inWater field is true as a result of handleWaterMovement() returning - * true) - */ - public boolean isInLiquid() - { - return this.worldObj.handleLiquidAcceleration(this.getEntityBoundingBox().expand(0.0D, -0.6000000238418579D, 0.0D), this); - } - - /** - * Called frequently so the entity can update its state every tick as required. For example, zombies and skeletons - * use this to react to sunlight and start to burn. - */ - public void onLivingUpdate() - { - super.onLivingUpdate(); - this.prevSquidPitch = this.squidPitch; - this.prevSquidYaw = this.squidYaw; - this.prevSquidRotation = this.squidRotation; - this.lastTentacleAngle = this.tentacleAngle; - this.squidRotation += this.rotationVelocity; - - if ((double)this.squidRotation > (Math.PI * 2D)) - { - if (this.worldObj.client) - { - this.squidRotation = ((float)Math.PI * 2F); - } - else - { - this.squidRotation = (float)((double)this.squidRotation - (Math.PI * 2D)); - - if (this.rand.chance(10)) - { - this.rotationVelocity = 1.0F / (this.rand.floatv() + 1.0F) * 0.2F; - } - - this.worldObj.setEntityState(this, (byte)19); - } - } - - if (this.inLiquid) - { - if (this.squidRotation < (float)Math.PI) - { - float f = this.squidRotation / (float)Math.PI; - this.tentacleAngle = ExtMath.sin(f * f * (float)Math.PI) * (float)Math.PI * 0.25F; - - if ((double)f > 0.75D) - { - this.randomMotionSpeed = 1.0F; - this.field_70871_bB = 1.0F; - } - else - { - this.field_70871_bB *= 0.8F; - } - } - else - { - this.tentacleAngle = 0.0F; - this.randomMotionSpeed *= 0.9F; - this.field_70871_bB *= 0.99F; - } - - if (!this.worldObj.client) - { - this.motionX = (double)(this.randomMotionVecX * this.randomMotionSpeed); - this.motionY = (double)(this.randomMotionVecY * this.randomMotionSpeed); - this.motionZ = (double)(this.randomMotionVecZ * this.randomMotionSpeed); - } - - float f1 = ExtMath.sqrtd(this.motionX * this.motionX + this.motionZ * this.motionZ); - this.yawOffset += (-((float)ExtMath.atan2(this.motionX, this.motionZ)) * 180.0F / (float)Math.PI - this.yawOffset) * 0.1F; - this.rotYaw = this.yawOffset; - this.squidYaw = (float)((double)this.squidYaw + Math.PI * (double)this.field_70871_bB * 1.5D); - this.squidPitch += (-((float)ExtMath.atan2((double)f1, this.motionY)) * 180.0F / (float)Math.PI - this.squidPitch) * 0.1F; - } - else - { - this.tentacleAngle = ExtMath.absf(ExtMath.sin(this.squidRotation)) * (float)Math.PI * 0.25F; - - if (!this.worldObj.client) - { - this.motionX = 0.0D; - this.motionY -= 0.08D; - this.motionY *= 0.9800000190734863D; - this.motionZ = 0.0D; - } - - this.squidPitch = (float)((double)this.squidPitch + (double)(-90.0F - this.squidPitch) * 0.02D); - } - } - - /** - * Moves the entity based on the specified heading. Args: strafe, forward - */ - public void moveEntityWithHeading(float strafe, float forward) - { - this.moveEntity(this.motionX, this.motionY, this.motionZ); - } - - public void handleStatusUpdate(byte id) - { - if (id == 19) - { - this.squidRotation = 0.0F; - } - else - { - super.handleStatusUpdate(id); - } - } - - public void setRandomMotion(float randomMotionVecXIn, float randomMotionVecYIn, float randomMotionVecZIn) - { - this.randomMotionVecX = randomMotionVecXIn; - this.randomMotionVecY = randomMotionVecYIn; - this.randomMotionVecZ = randomMotionVecZIn; - } - - public boolean hasRandomMotion() - { - return this.randomMotionVecX != 0.0F || this.randomMotionVecY != 0.0F || this.randomMotionVecZ != 0.0F; - } - - public int getColor() { - return 0x0000ff; - } - - public Alignment getAlignment() { - return Alignment.CHAOTIC_GOOD; - } - - static class AIMoveRandom extends EntityAIBase - { - private EntitySquid squid; - - public AIMoveRandom(EntitySquid p_i45859_1_) - { - this.squid = p_i45859_1_; - } - - public boolean shouldExecute() - { - return true; - } - - public void updateTask() - { -// int i = this.squid.getAge(); -// -// if (i > 100) -// { -// this.squid.func_175568_b(0.0F, 0.0F, 0.0F); -// } -// else - if (this.squid.getRNG().chance(50) || !this.squid.inLiquid || !this.squid.hasRandomMotion()) - { - float f = this.squid.getRNG().floatv() * (float)Math.PI * 2.0F; - float f1 = ExtMath.cos(f) * 0.2F; - float f2 = -0.1F + this.squid.getRNG().floatv() * 0.2F; - float f3 = ExtMath.sin(f) * 0.2F; - this.squid.setRandomMotion(f1, f2, f3); - } - } - } -} diff --git a/common/src/main/java/common/entity/npc/CharacterInfo.java b/common/src/main/java/common/entity/npc/CharacterInfo.java index 02318a6f..00e759eb 100755 --- a/common/src/main/java/common/entity/npc/CharacterInfo.java +++ b/common/src/main/java/common/entity/npc/CharacterInfo.java @@ -9,14 +9,12 @@ public class CharacterInfo extends NpcInfo { public final int color1; public final int color2; - public CharacterInfo(SpeciesInfo species, Enum type, String name, String skin, String cape, Alignment align, float height, int color1, int color2, boolean spawner) { - super(type, name, skin, cape, align, height, (ItemStack[])null); + public CharacterInfo(SpeciesInfo species, Enum type, String name, String skin, Alignment align, float height, int color1, int color2, boolean spawner) { + super(type, name, skin, align, height, (ItemStack[])null); this.spawner = spawner; this.species = species; this.color1 = color1; this.color2 = color2; SpeciesRegistry.SKINS.put(skin, species.renderer); - if(!cape.isEmpty()) - SpeciesRegistry.CAPES.add(cape); } } diff --git a/common/src/main/java/common/entity/npc/EntityBloodElf.java b/common/src/main/java/common/entity/npc/EntityBloodElf.java index 4870276f..a198077d 100755 --- a/common/src/main/java/common/entity/npc/EntityBloodElf.java +++ b/common/src/main/java/common/entity/npc/EntityBloodElf.java @@ -72,4 +72,8 @@ public class EntityBloodElf extends EntityNPC { protected ItemStack pickItem() { return new ItemStack(this.rand.chance(4) ? this.rand.pick(Items.bow, Items.stone_sword) : Items.iron_sword); } + + public String getCape() { + return "dark"; + } } diff --git a/common/src/main/java/common/entity/npc/EntityHaunter.java b/common/src/main/java/common/entity/npc/EntityHaunter.java index b41f1c51..15242769 100755 --- a/common/src/main/java/common/entity/npc/EntityHaunter.java +++ b/common/src/main/java/common/entity/npc/EntityHaunter.java @@ -21,7 +21,7 @@ public class EntityHaunter extends EntityNPC { public EntityHaunter(World worldIn) { super(worldIn); this.tasks.addTask(2, new EntityAIExplode(this)); -// this.tasks.addTask(3, new EntityAIAvoidEntity(this, EntityOcelot.class, 6.0F, 1.0D, 1.2D)); +// this.tasks.addTask(3, new EntityAIAvoidEntity(this, EntityCat.class, 6.0F, 1.0D, 1.2D)); } protected void applyEntityAttributes() diff --git a/common/src/main/java/common/entity/npc/EntityMerfolk.java b/common/src/main/java/common/entity/npc/EntityMerfolk.java new file mode 100755 index 00000000..935cde6c --- /dev/null +++ b/common/src/main/java/common/entity/npc/EntityMerfolk.java @@ -0,0 +1,34 @@ +package common.entity.npc; + +import common.rng.Random; +import common.world.World; + +public class EntityMerfolk extends EntityWaterNPC { + public EntityMerfolk(World world) { + super(world); + } + + public int getColor() { + return 0x0000ff; + } + + public float getSpeciesBaseSize() { + return 1.95f; + } + + public float getHeightDeviationMin() { + return -0.05f; + } + + public float getHeightDeviationMax() { + return 0.25f; + } + + public int getBaseHealth(Random rand) { + return rand.range(24, 32); + } + + public Alignment getNaturalAlign() { + return Alignment.CHAOTIC; + } +} diff --git a/common/src/main/java/common/entity/npc/EntityNPC.java b/common/src/main/java/common/entity/npc/EntityNPC.java index 2e39e1c4..67b2c210 100755 --- a/common/src/main/java/common/entity/npc/EntityNPC.java +++ b/common/src/main/java/common/entity/npc/EntityNPC.java @@ -15,6 +15,7 @@ import common.ai.EntityAINpcInteract; import common.ai.EntityAINpcMate; import common.ai.EntityAIOpenDoor; import common.ai.EntityAIPlay; +import common.ai.EntityAISwimNavigate; import common.ai.EntityAISwimming; import common.ai.EntityAIWander; import common.ai.EntityAIWatchClosest; @@ -126,12 +127,7 @@ public abstract class EntityNPC extends EntityLiving public static String getSkinTexture(String skin) { - return "textures/entity/" + skin + ".png"; - } - - public static String getCapeTexture(String cape) - { - return "textures/entity/cape_" + cape + ".png"; + return "textures/npc/" + skin + ".png"; } // public static String getSpeciesName(String character) { @@ -260,9 +256,12 @@ public abstract class EntityNPC extends EntityLiving this.setSize(this.getSpeciesBaseSize() * this.species.renderer.width / this.species.renderer.height, this.getSpeciesBaseSize()); // /* 0.6F, */ 1.8F); if(this.getNavigator() instanceof PathNavigateGround) { ((PathNavigateGround)this.getNavigator()).setBreakDoors(true); - ((PathNavigateGround)this.getNavigator()).setAvoidsWater(true); + ((PathNavigateGround)this.getNavigator()).setAvoidsWater(this.canSwim()); } - this.tasks.addTask(0, new EntityAISwimming(this)); + if(this.canSwim()) + this.tasks.addTask(0, new EntityAISwimming(this)); + else + this.tasks.addTask(0, new EntityAISwimNavigate(this)); // this.tasks.addTask(1, new EntityAIAttackOnCollide(this, EntityNPC.class, 0.6D, true, true)); // this.tasks.addTask(1, new EntityAIAttackOnCollide(this, EntityLivingBase.class, 0.6D, true, true)); this.tasks.addTask(1, new EntityAINpcMate(this)); @@ -463,6 +462,14 @@ public abstract class EntityNPC extends EntityLiving return 20; } + public boolean canSwim() { + return true; + } + + public float getVisionBrightness() { + return 0.1f; + } + // public void setScaleForAge() // { // } @@ -518,6 +525,10 @@ public abstract class EntityNPC extends EntityLiving public boolean hasSlimArms() { return false; } + + public String getCape() { + return null; + } public boolean isCharged() { @@ -784,16 +795,6 @@ public abstract class EntityNPC extends EntityLiving return this.dataWatcher.getWatchableObjectString(9); } - public void setCape(String cape) - { - this.dataWatcher.updateObject(17, cape); - } - - public String getCape() - { - return this.dataWatcher.getWatchableObjectString(17); - } - public void setNpcClass(Enum type) { this.dataWatcher.updateObject(10, (byte)(type == null ? -1 : type.ordinal())); @@ -2959,8 +2960,6 @@ public abstract class EntityNPC extends EntityLiving this.dataWatcher.addObject(13, 0); // max mana this.dataWatcher.addObject(14, 0); // mana this.dataWatcher.addObject(15, 0.7f); - - this.dataWatcher.addObject(17, ""); // TODO: remove capes } /** @@ -3317,7 +3316,6 @@ public abstract class EntityNPC extends EntityLiving } // this.setSpecies(tagCompund.getString("Species")); this.setChar(tagCompund.getString("Char")); - this.setCape(tagCompund.getString("Cape")); this.isWilling = tagCompund.getBool("Willing"); this.setMating(tagCompund.getBool("Mating")); Alignment // align; @@ -3458,7 +3456,6 @@ public abstract class EntityNPC extends EntityLiving tagCompound.setList("Equipment", nbttaglist0); // tagCompound.setString("Species", this.getSpecies()); tagCompound.setString("Char", this.getChar()); - tagCompound.setString("Cape", this.getCape()); tagCompound.setBool("Willing", this.isWilling); tagCompound.setBool("Mating", this.isMating()); tagCompound.setString("Align", this.alignment.name); @@ -4295,7 +4292,6 @@ public abstract class EntityNPC extends EntityLiving public void setStats(NpcInfo info) { this.setNpcClass(info.type == null ? this.pickRandomClass() : info.type); this.setChar(info.skin != null ? info.skin : this.pickRandomTexture()); - this.setCape(info.cape != null ? info.cape : this.pickRandomAccessory()); this.setCustomNameTag(info.name.isEmpty() ? this.pickRandomName() : info.name); this.setAlignment(info.align != null ? info.align : this.getNaturalAlign()); this.setHeight(info.height > 0.0f ? info.height : this.getBaseSize()); @@ -4333,10 +4329,6 @@ public abstract class EntityNPC extends EntityLiving return ""; } - public String pickRandomAccessory() { - return ""; - } - public Enum pickRandomClass() { return null; } diff --git a/common/src/main/java/common/entity/npc/EntityWaterNPC.java b/common/src/main/java/common/entity/npc/EntityWaterNPC.java new file mode 100755 index 00000000..89eff044 --- /dev/null +++ b/common/src/main/java/common/entity/npc/EntityWaterNPC.java @@ -0,0 +1,83 @@ +package common.entity.npc; + +import common.entity.DamageSource; +import common.tags.TagObject; +import common.vars.Vars; +import common.world.World; + +public abstract class EntityWaterNPC extends EntityNPC { + public EntityWaterNPC(World world) { + super(world); + } + + protected void entityInit() { + super.entityInit(); + this.dataWatcher.addObject(23, this.getMaxMoisture()); + } + + public int getMaxMoisture() { + return 500; + } + + public int getMoisture() { + return this.dataWatcher.getWatchableObjectInt(23); + } + + public void setMoisture(int moisture) { + this.dataWatcher.updateObject(23, moisture); + } + + public boolean canSpawnInLiquid() { + return true; + } + + public float getVisionBrightness() { + return 0.35f; + } + + public float getArmRotation() { + return 0.5f; + } + + public float getLegRotation() { + return 0.6f; + } + + public void onEntityUpdate() { + super.onEntityUpdate(); + if(!this.worldObj.client && this.isEntityAlive()) { + int moisture = this.getMoisture(); + if(!this.isInLiquid()) { + if(moisture > 0) + this.setMoisture(moisture - 1); + else if(Vars.waterMobDry && this.rand.chance(30)) + this.attackEntityFrom(DamageSource.dry, 2); + } + else if(moisture < this.getMaxMoisture()) { + this.setMoisture(moisture + 1); + } + } + } + + public boolean isPushedByWater() { + return false; + } + + public boolean canSwim() { + return false; + } + + public boolean getCanSpawnHere() { + return this.isPlayer() || this.posY < (double)this.worldObj.getSeaLevel(); + } + + public void writeEntity(TagObject tag) { + super.writeEntity(tag); + tag.setInt("Moisture", this.getMoisture()); + } + + public void readEntity(TagObject tag) { + super.readEntity(tag); + this.setMoisture(tag.getInt("Moisture")); + } +} diff --git a/common/src/main/java/common/entity/npc/NpcInfo.java b/common/src/main/java/common/entity/npc/NpcInfo.java index f0ba67c3..9db84e73 100644 --- a/common/src/main/java/common/entity/npc/NpcInfo.java +++ b/common/src/main/java/common/entity/npc/NpcInfo.java @@ -6,16 +6,14 @@ public class NpcInfo { public final Enum type; public final String name; public final String skin; - public final String cape; public final Alignment align; public final float height; public final ItemStack[] items; - public NpcInfo(Enum type, String name, String skin, String cape, Alignment align, float height, ItemStack ... items) { + public NpcInfo(Enum type, String name, String skin, Alignment align, float height, ItemStack ... items) { this.type = type; this.name = name; this.skin = skin; - this.cape = cape; this.align = align; this.height = height; this.items = items; diff --git a/common/src/main/java/common/entity/npc/SpeciesInfo.java b/common/src/main/java/common/entity/npc/SpeciesInfo.java index 1c9cbad5..9483fe71 100755 --- a/common/src/main/java/common/entity/npc/SpeciesInfo.java +++ b/common/src/main/java/common/entity/npc/SpeciesInfo.java @@ -71,7 +71,7 @@ public class SpeciesInfo { scolor2 = ((Integer)names[++z]).intValue(); } chars.add(new CharacterInfo(this, ctype, tok[0], tok.length > 1 && !tok[1].isEmpty() ? tok[1] : (tok[0].isEmpty() ? this.id : tok[0]).toLowerCase().replace(' ', '_'), - tok.length > 2 ? tok[2] : "", align, height, scolor1, scolor2, names.length > 1)); + align, height, scolor1, scolor2, names.length > 1)); } this.chars = chars.toArray(new CharacterInfo[chars.size()]); SpeciesRegistry.CLASSES.put(this.clazz, this); diff --git a/common/src/main/java/common/entity/types/EntityWaterMob.java b/common/src/main/java/common/entity/types/EntityWaterMob.java deleted file mode 100755 index ae019b09..00000000 --- a/common/src/main/java/common/entity/types/EntityWaterMob.java +++ /dev/null @@ -1,116 +0,0 @@ -package common.entity.types; - -import common.entity.DamageSource; -import common.entity.EntityType; -import common.entity.npc.EntityNPC; -import common.vars.Vars; -import common.world.World; - -public abstract class EntityWaterMob extends EntityLiving -{ - public EntityWaterMob(World worldIn) - { - super(worldIn); - } - -// public boolean canBreatheUnderwater() -// { -// return true; -// } - -// /** -// * Checks if the entity's current position is a valid location to spawn this entity. -// */ -// public boolean getCanSpawnHere() -// { -// return true; -// } - -// /** -// * Checks that the entity is not colliding with any blocks / liquids -// */ -// public boolean isNotColliding() -// { -// return this.worldObj.checkNoEntityCollision(this.getEntityBoundingBox(), this) && -// this.worldObj.getCollidingBoundingBoxes(this, this.getEntityBoundingBox()).isEmpty(); //TODO: check -// } - - public boolean canSpawnInLiquid() { - return true; - } - - /** - * Get number of ticks, at least during which the living entity will be silent. - */ - public int getTalkInterval() - { - return 120; - } - -// /** -// * Determines if an entity can be despawned, used on idle far away entities -// */ -// protected boolean canDespawn() -// { -// return true; -// } - - /** - * Get the experience points the entity currently has. - */ - protected int getExperiencePoints(EntityNPC player) - { - return this.worldObj.rand.roll(3); - } - - /** - * Gets called every tick from main Entity class - */ - public void onEntityUpdate() - { -// int i = this.getAir(); - super.onEntityUpdate(); - - if (this.isEntityAlive() && (this.worldObj.client || Vars.waterMobDry) && !this.isInLiquid() && this.rand.chance(30)) - { -// --i; -// this.setAir(i); -// -// if (this.getAir() == -20) -// { -// this.setAir(0); - this.attackEntityFrom(DamageSource.dry, 2); -// } - } -// else -// { -// this.setAir(300); -// } - } - - public boolean isPushedByWater() - { - return false; - } - - public int getTrackingRange() { - return 64; - } - - public int getUpdateFrequency() { - return 3; - } - - public boolean isSendingVeloUpdates() { - return true; - } - - public boolean getCanSpawnHere() - { - return this.posY > 45.0D && this.posY < (double)this.worldObj.getSeaLevel(); - } - - public EntityType getType() { - return EntityType.ANIMAL; - } -} diff --git a/common/src/main/java/common/init/EntityRegistry.java b/common/src/main/java/common/init/EntityRegistry.java index cdc245f4..01c01fc1 100755 --- a/common/src/main/java/common/init/EntityRegistry.java +++ b/common/src/main/java/common/init/EntityRegistry.java @@ -11,13 +11,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.item.EntityBoat; import common.entity.item.EntityChestCart; @@ -221,10 +219,8 @@ public abstract class EntityRegistry { registerEntity("Sheep", EntitySheep.class, "terra", "Schaf", 15198183, 16758197); registerEntity("Cow", EntityCow.class, "terra", "Kuh", 4470310, 10592673); registerEntity("Chicken", EntityChicken.class, "terra", "Huhn", 10592673, 16711680); - registerEntity("Squid", EntitySquid.class, "tbd", "Tintenfisch", 2243405, 7375001); registerEntity("Wolf", EntityWolf.class, "terra", "Wolf", 14144467, 13545366); - registerEntity("Mooshroom", EntityMooshroom.class, "tbd", "Pilzkuh", 10489616, 12040119); - registerEntity("Ocelot", EntityOcelot.class, "terra", "Ozelot", 15720061, 5653556); + registerEntity("Cat", EntityCat.class, "terra", "Ozelot", 15720061, 5653556); registerEntity("Horse", EntityHorse.class, "terra", "Pferd", 12623485, 15656192); registerEntity("Rabbit", EntityRabbit.class, "terra", "Kaninchen", 10051392, 7555121); registerEntity("Mouse", EntityMouse.class, "terra", "Maus", 0x606060, 0xb0b0b0); diff --git a/common/src/main/java/common/init/SpeciesRegistry.java b/common/src/main/java/common/init/SpeciesRegistry.java index 4646e5ff..68c38edd 100755 --- a/common/src/main/java/common/init/SpeciesRegistry.java +++ b/common/src/main/java/common/init/SpeciesRegistry.java @@ -2,11 +2,8 @@ package common.init; import java.util.List; import java.util.Map; -import java.util.Set; - import common.collect.Lists; import common.collect.Maps; -import common.collect.Sets; import common.entity.npc.EntityArachnoid; import common.entity.npc.EntityBloodElf; import common.entity.npc.EntityChaosMarine; @@ -21,6 +18,7 @@ import common.entity.npc.EntityGoblin; import common.entity.npc.EntityHaunter; import common.entity.npc.EntityHuman; import common.entity.npc.EntityMage; +import common.entity.npc.EntityMerfolk; import common.entity.npc.EntityMetalhead; import common.entity.npc.EntityNPC; import common.entity.npc.EntityOrc; @@ -59,7 +57,6 @@ public abstract class SpeciesRegistry { } public static final Map SKINS = Maps.newTreeMap(); - public static final Set CAPES = Sets.newTreeSet(); public static final Map, SpeciesInfo> CLASSES = Maps.newHashMap(); public static final List SPECIMEN = Lists.newArrayList(); @@ -89,7 +86,7 @@ public abstract class SpeciesRegistry { } static void register() { - registerSpecies("Cpu", EntityCpu.class, null, "Test-NSC", 0x202020, 0x8000ff, "Sen", "Troll:trollface", "Hacker", "Herobrine"); + registerSpecies("Cpu", EntityCpu.class, null, "Test-NSC", 0x202020, 0x8000ff, "Test:char", "Troll:trollface", "Hacker"); registerSpecies("Cultivator", EntityCultivator.class, "nienrath", "Kultivator", 0x000000, 0xff0000, "Wei Wuxian", 0x000000, 0xff0000, "Lan Wangji", 0xffffff, 0x80e0ff, "Jiang Cheng", 0x200000, 0xaf00ff, "Shen Qingqiu", 0xffffff, 0x80ff80, "Luo Binghe", 0x600000, 0x000000); @@ -99,7 +96,7 @@ public abstract class SpeciesRegistry { ":metalhead_11", ":metalhead_12", ":metalhead_13", ":metalhead_14"); registerSpecies("Elf", EntityElf.class, "gharoth", "Elbe", 0x054100, 0xd2d2d2, ":highelf", "Thranduil", 0x82888b, 0xeae7bd); registerSpecies("WoodElf", EntityWoodElf.class, "gharoth", "Waldelbe", 0x054100, 0x00bb00); - registerSpecies("BloodElf", EntityBloodElf.class, "kyroth", "Blutelbe", 0x054100, 0x960000, "::bloodelf"); + registerSpecies("BloodElf", EntityBloodElf.class, "kyroth", "Blutelbe", 0x054100, 0x960000); registerSpecies("Human", EntityHuman.class, EntityHuman.ClassType.class, "terra", "NSC", 0x4f7d9a, 0x034c7a, EntityHuman.ClassType.KNIGHT, ":knight_1", ":knight_2", ":knight_3", @@ -136,5 +133,6 @@ public abstract class SpeciesRegistry { registerSpecies("ChaosMarine", EntityChaosMarine.class, EntityChaosMarine.Legion.class, true, "warp", "Chaos Marine", ModelType.SPACE_MARINE, 0x000000, 0xff0000, EntityChaosMarine.Legion.MARINES); registerSpecies("Goblin", EntityGoblin.class, "luna", "Goblin", ModelType.HALFLING, 0x50af50, 0x504050); + registerSpecies("Merfolk", EntityMerfolk.class, "tbd", "Meeresbewohner", 0x3f3fff, 0x0000ff); } } diff --git a/common/src/main/java/common/init/UniverseRegistry.java b/common/src/main/java/common/init/UniverseRegistry.java index b6744d7d..36d0789b 100755 --- a/common/src/main/java/common/init/UniverseRegistry.java +++ b/common/src/main/java/common/init/UniverseRegistry.java @@ -583,7 +583,7 @@ public abstract class UniverseRegistry { .setStarColorSin(25.0f, 0.1f, 0.25f, 0xff00ff, 1, 4).setDeepStarColorSin(25.0f, 0.1f, 0.5f, 0xff00ff, 1, 4)); registerDomain("tianxin", "Tian'Xin"); - registerArea("nienrath", "Ni'enrath", new Area(0x7f00ff, 0x7f00ff, 276.15f, 1) + registerArea("nienrath", "Ni'enrath", new Area(0x7f00ff, 0x7f00ff, 276.15f, 1).setLightColor(0x7f00ff).setBlockColor(0xcf6fff) .setPerlinGen(Blocks.tian.getState(), Blocks.springwater.getState(), 63).setBiome(Biome.TIAN) .setBiomeReplacer(Blocks.tian.getState()).enableLongCaves().enableMobs().enableSnow() .addLake(Blocks.springwater.getState(), Blocks.tian.getState(), Blocks.tian.getState(), 4, 0, 255, false) diff --git a/server/src/main/java/server/biome/BiomeJungle.java b/server/src/main/java/server/biome/BiomeJungle.java index 9030120b..3b22efa3 100755 --- a/server/src/main/java/server/biome/BiomeJungle.java +++ b/server/src/main/java/server/biome/BiomeJungle.java @@ -2,7 +2,7 @@ package server.biome; import common.biome.Biome; import common.entity.animal.EntityChicken; -import common.entity.animal.EntityOcelot; +import common.entity.animal.EntityCat; import common.init.Blocks; import common.init.WoodType; import common.rng.Random; @@ -45,7 +45,7 @@ public class BiomeJungle extends GenBiome if (!edge) { - this.mobs.add(new RngSpawn(EntityOcelot.class, 2, 1, 1)); + this.mobs.add(new RngSpawn(EntityCat.class, 2, 1, 1)); } this.mobs.add(new RngSpawn(EntityChicken.class, 10, 4, 4)); diff --git a/server/src/main/java/server/biome/BiomeMushroom.java b/server/src/main/java/server/biome/BiomeMushroom.java index 1e00da7a..5e9633f3 100755 --- a/server/src/main/java/server/biome/BiomeMushroom.java +++ b/server/src/main/java/server/biome/BiomeMushroom.java @@ -1,24 +1,22 @@ package server.biome; import common.biome.Biome; -import common.entity.animal.EntityMooshroom; +import common.entity.npc.EntityDwarf; import common.init.Blocks; import common.rng.WeightedList; -public class BiomeMushroom extends GenBiome -{ - public BiomeMushroom() - { - super(Biome.MUSHROOMPLAINS); - this.treesPerChunk = -100; - this.flowersPerChunk = -100; - this.grassPerChunk = -100; - this.mushroomsPerChunk = 1; - this.bigMushroomsPerChunk = 1; - this.topBlock = Blocks.mycelium.getState(); - } - - protected void addMobs(WeightedList mobs) { - mobs.add(new RngSpawn(EntityMooshroom.class, 8, 4, 8)); - } +public class BiomeMushroom extends GenBiome { + public BiomeMushroom() { + super(Biome.MUSHROOMPLAINS); + this.treesPerChunk = -100; + this.flowersPerChunk = -100; + this.grassPerChunk = -100; + this.mushroomsPerChunk = 1; + this.bigMushroomsPerChunk = 1; + this.topBlock = Blocks.mycelium.getState(); + } + + protected void addMobs(WeightedList mobs) { + mobs.add(new RngSpawn(EntityDwarf.class, 8, 4, 8)); + } } diff --git a/server/src/main/java/server/biome/BiomeTian.java b/server/src/main/java/server/biome/BiomeTian.java index 0bd9f78e..53857f9d 100755 --- a/server/src/main/java/server/biome/BiomeTian.java +++ b/server/src/main/java/server/biome/BiomeTian.java @@ -6,6 +6,7 @@ import common.entity.animal.EntityBat; import common.entity.animal.EntityMouse; import common.entity.animal.EntityRabbit; import common.entity.npc.EntityCultivator; +import common.entity.npc.EntityMerfolk; import common.init.Blocks; import common.init.WoodType; import common.rng.Random; @@ -42,8 +43,8 @@ public class BiomeTian extends GenBiome } protected void addMobs(WeightedList mobs) { -// mobs.add(new Biome.RngSpawn(EntityHaunter.class, 50, 4, 4)); mobs.add(new RngSpawn(EntityCultivator.class, 50, 1, 1)); + mobs.add(new RngSpawn(EntityMerfolk.class, 10, 4, 4)); mobs.add(new RngSpawn(EntityRabbit.class, 10, 3, 10)); mobs.add(new RngSpawn(EntityBat.class, 10, 8, 8)); mobs.add(new RngSpawn(EntityMouse.class, 10, 8, 8)); diff --git a/server/src/main/java/server/biome/BiomeWater.java b/server/src/main/java/server/biome/BiomeWater.java index 48c853b5..007ecccb 100755 --- a/server/src/main/java/server/biome/BiomeWater.java +++ b/server/src/main/java/server/biome/BiomeWater.java @@ -1,7 +1,7 @@ package server.biome; import common.biome.Biome; -import common.entity.animal.EntitySquid; +import common.entity.npc.EntityMerfolk; import common.rng.WeightedList; public class BiomeWater extends GenBiome { @@ -11,10 +11,11 @@ public class BiomeWater extends GenBiome { super(base); this.river = river; this.disableBeach(); + if(!this.river) + this.mobs.add(new RngSpawn(EntityMerfolk.class, 10, 4, 4)); } protected void addMobs(WeightedList mobs) { - mobs.add(new RngSpawn(EntitySquid.class, 10, 4, 4)); } public Temperature getTempCategory() { diff --git a/server/src/main/java/server/biome/GenBiome.java b/server/src/main/java/server/biome/GenBiome.java index ee4b21cd..a7965dac 100755 --- a/server/src/main/java/server/biome/GenBiome.java +++ b/server/src/main/java/server/biome/GenBiome.java @@ -13,7 +13,6 @@ import common.entity.animal.EntityMouse; import common.entity.animal.EntityPig; import common.entity.animal.EntityRabbit; import common.entity.animal.EntitySheep; -import common.entity.animal.EntitySquid; import common.entity.npc.EntityArachnoid; import common.entity.npc.EntityHaunter; import common.entity.npc.EntityMage; @@ -224,7 +223,6 @@ public abstract class GenBiome implements IBiome { mobs.add(new RngSpawn(EntitySlime.class, 100, 4, 4)); // mobs.add(new Biome.RngSpawn(EntityEnder....class, 10, 1, 4)); mobs.add(new RngSpawn(EntityMage.class, 5, 1, 1)); - mobs.add(new RngSpawn(EntitySquid.class, 10, 4, 4)); mobs.add(new RngSpawn(EntityBat.class, 10, 8, 8)); mobs.add(new RngSpawn(EntityMouse.class, 10, 8, 8)); } diff --git a/server/src/main/java/server/world/Converter.java b/server/src/main/java/server/world/Converter.java index 920205fc..5eb156fb 100644 --- a/server/src/main/java/server/world/Converter.java +++ b/server/src/main/java/server/world/Converter.java @@ -98,12 +98,10 @@ import common.entity.animal.EntityBat; import common.entity.animal.EntityChicken; import common.entity.animal.EntityCow; import common.entity.animal.EntityHorse; -import common.entity.animal.EntityMooshroom; -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.item.EntityBoat; import common.entity.item.EntityMinecart; @@ -363,12 +361,10 @@ public abstract class Converter { mapEntity(EntityBat.class, "Bat", "bat"); mapEntity(EntityPig.class, "Pig", "pig"); mapEntity(EntitySheep.class, "Sheep", "sheep"); - mapEntity(EntityCow.class, "Cow", "cow"); + mapEntity(EntityCow.class, "Cow", "cow", "MushroomCow", "mooshroom"); mapEntity(EntityChicken.class, "Chicken", "chicken"); - mapEntity(EntitySquid.class, "Squid", "squid"); mapEntity(EntityWolf.class, "Wolf", "wolf"); - mapEntity(EntityMooshroom.class, "MushroomCow", "mooshroom"); - mapEntity(EntityOcelot.class, "Ozelot", "ocelot"); + mapEntity(EntityCat.class, "Ozelot", "ocelot"); mapEntity(EntityHorse.class, "EntityHorse", "horse"); mapEntity(EntityRabbit.class, "Rabbit", "rabbit"); diff --git a/server/src/main/java/server/world/Spawner.java b/server/src/main/java/server/world/Spawner.java index 06e5da65..262c65df 100755 --- a/server/src/main/java/server/world/Spawner.java +++ b/server/src/main/java/server/world/Spawner.java @@ -5,8 +5,8 @@ import java.util.Set; import common.block.Block; import common.collect.Sets; import common.entity.npc.EntityNPC; +import common.entity.npc.EntityWaterNPC; import common.entity.types.EntityLiving; -import common.entity.types.EntityWaterMob; import common.init.Blocks; import common.rng.Random; import common.rng.WeightedList; @@ -121,7 +121,7 @@ public abstract class Spawner { cmax = m + entry.min + world.rand.zrange(1 + entry.max - entry.min); } if(world.canCreatureTypeSpawnHere(entry, mpos) - && canSpawnAt(EntityWaterMob.class.isAssignableFrom(entry.type), world, mpos)) { + && canSpawnAt(EntityWaterNPC.class.isAssignableFrom(entry.type), world, mpos)) { EntityLiving entity; try { entity = entry.type.getConstructor(World.class).newInstance(world); @@ -178,7 +178,7 @@ public abstract class Spawner { boolean flag = false; for(int m = 0; !flag && m < 4; ++m) { BlockPos pos = world.getTopSolidOrLiquidBlock(new BlockPos(mx, 0, mz)); - if(canSpawnAt(EntityWaterMob.class.isAssignableFrom(entry.type), world, pos)) { + if(canSpawnAt(EntityWaterNPC.class.isAssignableFrom(entry.type), world, pos)) { EntityLiving entity; try { entity = entry.type.getConstructor(World.class).newInstance(world);