diff --git a/client/src/main/java/client/renderer/Renderer.java b/client/src/main/java/client/renderer/Renderer.java index 7c731514..436e9299 100755 --- a/client/src/main/java/client/renderer/Renderer.java +++ b/client/src/main/java/client/renderer/Renderer.java @@ -39,6 +39,7 @@ import client.renderer.tileentity.SpecialRenderer; import client.world.ChunkClient; import common.block.Block; import common.block.Material; +import common.block.artificial.BlockSlab; import common.block.liquid.BlockDynamicLiquid; import common.block.liquid.BlockLiquid; import common.block.liquid.BlockStaticLiquid; @@ -3505,6 +3506,27 @@ public class Renderer { Tessellator.draw(); } } + + private static final int getLightmapValue(IWorldAccess world, BlockPos pos) { + Block block = world.getState(pos).getBlock(); + int light = world.getCombinedLight(pos, block.getLight()); + if(light == 0 && block instanceof BlockSlab) { + pos = pos.down(); + block = world.getState(pos).getBlock(); + return world.getCombinedLight(pos, block.getLight()); + } + return light; + } + + private static final int getLightmapValueLiquid(IWorldAccess world, BlockPos pos) { + int i = world.getCombinedLight(pos, 0); + int j = world.getCombinedLight(pos.up(), 0); + int k = i & 255; + int l = j & 255; + int i1 = i >> 16 & 255; + int j1 = j >> 16 & 255; + return (k > l ? k : l) | (i1 > j1 ? i1 : j1) << 16; + } public boolean renderModel(IWorldAccess blockAccessIn, IBakedModel modelIn, State blockStateIn, BlockPos blockPosIn, RenderBuffer worldRendererIn, boolean checkSides) { @@ -3522,7 +3544,7 @@ public class Renderer { if (!checkSides || blockIn.canRender(blockAccessIn, blockpos, enumfacing)) { - int i = blockIn.getLightmapValue(blockAccessIn, blockpos); + int i = getLightmapValue(blockAccessIn, blockpos); this.renderModelStandardQuads(blockAccessIn, blockIn, blockPosIn, enumfacing, i, false, worldRendererIn, list, bitset); flag = true; } @@ -3551,7 +3573,7 @@ public class Renderer { if (ownBrightness) { this.fillQuadBounds(blockIn, bakedquad.getVertexData(), bakedquad.getFace(), (float[])null, boundsFlags); - brightnessIn = boundsFlags.get(0) ? blockIn.getLightmapValue(blockAccessIn, blockPosIn.offset(bakedquad.getFace())) : blockIn.getLightmapValue(blockAccessIn, blockPosIn); + brightnessIn = boundsFlags.get(0) ? getLightmapValue(blockAccessIn, blockPosIn.offset(bakedquad.getFace())) : getLightmapValue(blockAccessIn, blockPosIn); } worldRendererIn.addVertexData(bakedquad.getVertexData()); @@ -3713,7 +3735,7 @@ public class Renderer { f20 = textureatlassprite.getInterpolatedV((double)(8.0F + (-f22 - f21) * 16.0F)); } - int k2 = blockliquid.getLightmapValue(blockAccess, blockPosIn); + int k2 = getLightmapValueLiquid(blockAccess, blockPosIn); int l2 = k2 >> 16 & 65535; int i3 = k2 & 65535; float f24 = f4; @@ -3739,7 +3761,7 @@ public class Renderer { float f36 = atextureatlassprite[0].getMaxU(); float f37 = atextureatlassprite[0].getMinV(); float f38 = atextureatlassprite[0].getMaxV(); - int l1 = blockliquid.getLightmapValue(blockAccess, blockPosIn.down()); + int l1 = getLightmapValueLiquid(blockAccess, blockPosIn.down()); int i2 = l1 >> 16 & 65535; int j2 = l1 & 65535; worldRendererIn.pos(d0, d1, d2 + 1.0D).color(f3, f3, f3, 1.0F).tex((double)f35, (double)f38).lightmap(i2, j2).endVertex(); @@ -3829,7 +3851,7 @@ public class Renderer { float f28 = textureatlassprite1.getInterpolatedV((double)((1.0F - f39) * 16.0F * 0.5F)); float f29 = textureatlassprite1.getInterpolatedV((double)((1.0F - f40) * 16.0F * 0.5F)); float f30 = textureatlassprite1.getInterpolatedV(8.0D); - int j = blockliquid.getLightmapValue(blockAccess, blockpos); + int j = getLightmapValueLiquid(blockAccess, blockpos); int k = j >> 16 & 65535; int l = j & 65535; float f31 = i1 < 2 ? f5 : f6; diff --git a/client/src/main/java/client/renderer/entity/Render.java b/client/src/main/java/client/renderer/entity/Render.java index 652d4bbc..53f51390 100755 --- a/client/src/main/java/client/renderer/entity/Render.java +++ b/client/src/main/java/client/renderer/entity/Render.java @@ -2,6 +2,7 @@ package client.renderer.entity; import client.renderer.Frustum; import common.entity.Entity; +import common.util.BlockPos; import common.util.BoundingBox; public abstract class Render @@ -53,4 +54,9 @@ public abstract class Render { return this.manager; } + + protected static float getBrightness(Entity entity) { + BlockPos pos = new BlockPos(entity.posX, entity.posY + (double)entity.getEyeHeight(), entity.posZ); + return entity.worldObj.isBlockLoaded(pos) ? entity.worldObj.getLightBrightness(pos) : 0.0F; + } } diff --git a/client/src/main/java/client/renderer/entity/RenderBlockEntity.java b/client/src/main/java/client/renderer/entity/RenderBlockEntity.java index 796c7616..0f532a3b 100755 --- a/client/src/main/java/client/renderer/entity/RenderBlockEntity.java +++ b/client/src/main/java/client/renderer/entity/RenderBlockEntity.java @@ -43,7 +43,7 @@ public class RenderBlockEntity extends Render // float f2 = (1.0F - ((float)entity.fuse - partialTicks + 1.0F) / 100.0F) * 0.8F; this.bindEntityTexture(entity); GL11.glTranslatef(-0.5F, -0.5F, 0.5F); - Client.CLIENT.renderer.renderBlockEntity(this.state, entity.getBrightness(partialTicks)); + Client.CLIENT.renderer.renderBlockEntity(this.state, getBrightness(entity)); GL11.glTranslatef(0.0F, 0.0F, 1.0F); // if (entity.fuse / 5 % 2 == 0) diff --git a/client/src/main/java/client/renderer/entity/RenderLiving.java b/client/src/main/java/client/renderer/entity/RenderLiving.java index 6b744bcf..2982780d 100755 --- a/client/src/main/java/client/renderer/entity/RenderLiving.java +++ b/client/src/main/java/client/renderer/entity/RenderLiving.java @@ -44,7 +44,7 @@ public abstract class RenderLiving extends RendererLivin } public void setLightmap(T entity, float partial) { - int l = entity.getBrightnessForRender(partial); + int l = RenderManager.getBrightnessForRender(entity); int a = l % 65536; int b = l / 65536; GL13.glMultiTexCoord2f(GL13.GL_TEXTURE1, (float)a / 1.0F, (float)b / 1.0F); diff --git a/client/src/main/java/client/renderer/entity/RenderManager.java b/client/src/main/java/client/renderer/entity/RenderManager.java index 6b5e1073..f8d2a0c9 100755 --- a/client/src/main/java/client/renderer/entity/RenderManager.java +++ b/client/src/main/java/client/renderer/entity/RenderManager.java @@ -20,6 +20,7 @@ import common.collect.Maps; import common.entity.Entity; import common.entity.types.EntityLiving; import common.init.SpeciesRegistry.ModelType; +import common.util.BlockPos; import common.util.BoundingBox; import common.util.Vec3; import common.world.World; @@ -119,6 +120,11 @@ public class RenderManager { return render != null && render.shouldRender(entityIn, camX, camY, camZ); } + public static int getBrightnessForRender(Entity entity) { + BlockPos pos = new BlockPos(entity.posX, entity.posY + (double)entity.getEyeHeight(), entity.posZ); + return entity.worldObj.isBlockLoaded(pos) ? entity.worldObj.getCombinedLight(pos, 0) : 0; + } + public boolean renderEntity(Entity entity, float partialTicks) { if(entity.ticksExisted == 0) { entity.lastTickPosX = entity.posX; @@ -129,7 +135,7 @@ public class RenderManager { double d0 = entity.lastTickPosX + (entity.posX - entity.lastTickPosX) * (double)partialTicks; double d1 = entity.lastTickPosY + (entity.posY - entity.lastTickPosY) * (double)partialTicks; double d2 = entity.lastTickPosZ + (entity.posZ - entity.lastTickPosZ) * (double)partialTicks; - int i = entity.getBrightnessForRender(partialTicks); + int i = getBrightnessForRender(entity); if(entity.isBurning()) { i = 15728880; diff --git a/client/src/main/java/client/renderer/entity/RenderMinecart.java b/client/src/main/java/client/renderer/entity/RenderMinecart.java index 19ef3116..abeaf6e9 100755 --- a/client/src/main/java/client/renderer/entity/RenderMinecart.java +++ b/client/src/main/java/client/renderer/entity/RenderMinecart.java @@ -124,7 +124,7 @@ public class RenderMinecart extends Render protected void func_180560_a(T minecart, float partialTicks, State state) { GL11.glPushMatrix(); - Client.CLIENT.renderer.renderBlockEntity(state, minecart.getBrightness(partialTicks)); + Client.CLIENT.renderer.renderBlockEntity(state, getBrightness(minecart)); GL11.glPopMatrix(); } } diff --git a/client/src/main/java/client/renderer/entity/RenderTntPrimed.java b/client/src/main/java/client/renderer/entity/RenderTntPrimed.java index fda5091f..e53a5831 100755 --- a/client/src/main/java/client/renderer/entity/RenderTntPrimed.java +++ b/client/src/main/java/client/renderer/entity/RenderTntPrimed.java @@ -39,7 +39,7 @@ public class RenderTntPrimed extends Render this.bindEntityTexture(entity); GL11.glTranslatef(-0.5F, -0.5F, 0.5F); Block tnt = BlockRegistry.byName("tnt" + (entity.explosionSize <= 0 || entity.explosionSize >= 8 ? "" : "_" + entity.explosionSize)); - renderer.renderBlockEntity(tnt.getState(), entity.getBrightness(partialTicks)); + renderer.renderBlockEntity(tnt.getState(), getBrightness(entity)); GL11.glTranslatef(0.0F, 0.0F, 1.0F); if (entity.fuse / 5 % 2 == 0) diff --git a/client/src/main/java/client/renderer/entity/RenderWolf.java b/client/src/main/java/client/renderer/entity/RenderWolf.java index 996d6660..3b65938b 100755 --- a/client/src/main/java/client/renderer/entity/RenderWolf.java +++ b/client/src/main/java/client/renderer/entity/RenderWolf.java @@ -1,6 +1,5 @@ package client.renderer.entity; -import client.renderer.GlState; import client.renderer.layers.LayerWolfCollar; import client.renderer.model.ModelBase; import common.entity.animal.EntityWolf; @@ -26,20 +25,6 @@ public class RenderWolf extends RenderLiving return livingBase.getTailRotation(); } - /** - * Renders the desired {@code T} type Entity. - */ - public void doRender(EntityWolf entity, double x, double y, double z, float partialTicks) - { - if (entity.isWolfWet()) - { - float f = entity.getBrightness(partialTicks) * entity.getShadingWhileWet(partialTicks); - GlState.color(f, f, f, 1.0F); - } - - 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. */ diff --git a/client/src/main/java/client/renderer/entity/RenderXp.java b/client/src/main/java/client/renderer/entity/RenderXp.java index 84be78b5..25cf806f 100755 --- a/client/src/main/java/client/renderer/entity/RenderXp.java +++ b/client/src/main/java/client/renderer/entity/RenderXp.java @@ -29,7 +29,7 @@ public class RenderXp extends Render { float bx = 1.0F; float dx = 0.5F; float dy = 0.25F; - int light = entity.getBrightnessForRender(partial); + int light = RenderManager.getBrightnessForRender(entity); int block = light % 65536; int sky = light / 65536; GL13.glMultiTexCoord2f(GL13.GL_TEXTURE1, (float)block / 1.0F, (float)sky / 1.0F); diff --git a/client/src/main/java/client/renderer/model/ModelWolf.java b/client/src/main/java/client/renderer/model/ModelWolf.java index 35d8eb2b..97b05753 100755 --- a/client/src/main/java/client/renderer/model/ModelWolf.java +++ b/client/src/main/java/client/renderer/model/ModelWolf.java @@ -157,10 +157,7 @@ public class ModelWolf extends ModelBase this.wolfLeg4.rotateAngleX = ExtMath.cos(p_78086_2_ * 0.6662F) * 1.4F * p_78086_3_; } - this.wolfHeadMain.rotateAngleZ = wolf.getInterestedAngle(partialTickTime) + wolf.getShakeAngle(partialTickTime, 0.0F); - this.wolfMane.rotateAngleZ = wolf.getShakeAngle(partialTickTime, -0.08F); - this.wolfBody.rotateAngleZ = wolf.getShakeAngle(partialTickTime, -0.16F); - this.wolfTail.rotateAngleZ = wolf.getShakeAngle(partialTickTime, -0.2F); + this.wolfHeadMain.rotateAngleZ = wolf.getInterestedAngle(partialTickTime); } /** diff --git a/client/src/main/resources/sounds/wolf_shake.ogg b/client/src/main/resources/sounds/wolf_shake.ogg deleted file mode 100644 index bf01cc3e..00000000 Binary files a/client/src/main/resources/sounds/wolf_shake.ogg and /dev/null differ diff --git a/common/src/main/java/common/block/Block.java b/common/src/main/java/common/block/Block.java index 23ceee3d..ec35299f 100755 --- a/common/src/main/java/common/block/Block.java +++ b/common/src/main/java/common/block/Block.java @@ -13,7 +13,6 @@ import java.util.Set; import java.util.Map.Entry; import java.util.function.Function; -import common.block.artificial.BlockSlab; import common.block.natural.BlockSnow; import common.collect.ImmutableList; import common.collect.ImmutableMap; @@ -1057,18 +1056,6 @@ public class Block { (double)pos.getX() + this.maxX, (double)pos.getY() + this.maxY, (double)pos.getZ() + this.maxZ); } - @Clientside - public int getLightmapValue(IWorldAccess world, BlockPos pos) { - Block block = world.getState(pos).getBlock(); - int light = world.getCombinedLight(pos, block.getLight()); - if(light == 0 && block instanceof BlockSlab) { - pos = pos.down(); - block = world.getState(pos).getBlock(); - return world.getCombinedLight(pos, block.getLight()); - } - return light; - } - @Clientside public boolean hasTransparency() { return false; diff --git a/common/src/main/java/common/block/liquid/BlockLiquid.java b/common/src/main/java/common/block/liquid/BlockLiquid.java index c8713fac..74b2c62c 100755 --- a/common/src/main/java/common/block/liquid/BlockLiquid.java +++ b/common/src/main/java/common/block/liquid/BlockLiquid.java @@ -212,17 +212,6 @@ public abstract class BlockLiquid extends Block return this.flowRate >= 0 ? this.flowRate : (worldIn.isLavaFaster(pos) ? (-this.flowRate / 3) : (-this.flowRate)); } - public int getLightmapValue(IWorldAccess worldIn, BlockPos pos) - { - int i = worldIn.getCombinedLight(pos, 0); - int j = worldIn.getCombinedLight(pos.up(), 0); - int k = i & 255; - int l = j & 255; - int i1 = i >> 16 & 255; - int j1 = j >> 16 & 255; - return (k > l ? k : l) | (i1 > j1 ? i1 : j1) << 16; - } - @Clientside public boolean hasTransparency() { return !this.opaque; diff --git a/common/src/main/java/common/entity/Entity.java b/common/src/main/java/common/entity/Entity.java index 2253a473..a36cb1e0 100755 --- a/common/src/main/java/common/entity/Entity.java +++ b/common/src/main/java/common/entity/Entity.java @@ -1104,21 +1104,6 @@ public abstract class Entity } } - public int getBrightnessForRender(float partialTicks) - { - BlockPos blockpos = new BlockPos(this.posX, this.posY + (double)this.getEyeHeight(), this.posZ); - return this.worldObj.isBlockLoaded(blockpos) ? this.worldObj.getCombinedLight(blockpos, 0) : 0; - } - - /** - * Gets how bright this entity is. - */ - public float getBrightness(float partialTicks) - { - BlockPos blockpos = new BlockPos(this.posX, this.posY + (double)this.getEyeHeight(), this.posZ); - return this.worldObj.isBlockLoaded(blockpos) ? this.worldObj.getLightBrightness(blockpos) : 0.0F; - } - /** * Sets the reference to the World object. */ diff --git a/common/src/main/java/common/entity/animal/EntityMouse.java b/common/src/main/java/common/entity/animal/EntityMouse.java index 2564c4d3..6ca426d7 100755 --- a/common/src/main/java/common/entity/animal/EntityMouse.java +++ b/common/src/main/java/common/entity/animal/EntityMouse.java @@ -111,7 +111,7 @@ public class EntityMouse extends EntityAnimal { public float getBlockPathWeight(BlockPos pos) { - return 0.5F - this.worldObj.getLightBrightness(pos); + return 0.5F; } public void setCustomNameTag(String name) { diff --git a/common/src/main/java/common/entity/animal/EntityWolf.java b/common/src/main/java/common/entity/animal/EntityWolf.java index 3ab3f2b5..3d846c07 100755 --- a/common/src/main/java/common/entity/animal/EntityWolf.java +++ b/common/src/main/java/common/entity/animal/EntityWolf.java @@ -30,31 +30,15 @@ import common.item.consumable.ItemFood; import common.item.material.ItemDye; import common.pathfinding.PathNavigateGround; import common.tags.TagObject; -import common.util.Clientside; -import common.util.ExtMath; -import common.util.ParticleType; import common.util.Color; import common.vars.Vars; import common.world.World; public class EntityWolf extends EntityTameable { - /** Float used to smooth the rotation of the wolf head */ private float headRotationCourse; private float headRotationCourseOld; - /** true is the wolf is wet else false */ - private boolean isWet; - - /** True if the wolf is shaking else False */ - private boolean isShaking; - - /** - * This time increases while wolf is shaking and emitting water particles. - */ - private float timeWolfIsShaking; - private float prevTimeWolfIsShaking; - public EntityWolf(World worldIn) { super(worldIn); @@ -185,14 +169,6 @@ public class EntityWolf extends EntityTameable { super.onLivingUpdate(); - if (!this.worldObj.client && this.isWet && !this.isShaking && !this.hasPath() && this.onGround) - { - this.isShaking = true; - this.timeWolfIsShaking = 0.0F; - this.prevTimeWolfIsShaking = 0.0F; - this.worldObj.setEntityState(this, (byte)8); - } - if (!this.worldObj.client && this.getAttackTarget() == null && this.isAngry()) { this.setAngry(false); @@ -215,77 +191,6 @@ public class EntityWolf extends EntityTameable { this.headRotationCourse += (0.0F - this.headRotationCourse) * 0.4F; } - - if (this.isWet()) - { - this.isWet = true; - this.isShaking = false; - this.timeWolfIsShaking = 0.0F; - this.prevTimeWolfIsShaking = 0.0F; - } - else if ((this.isWet || this.isShaking) && this.isShaking) - { - if (this.timeWolfIsShaking == 0.0F) - { - this.playSound(SoundEvent.WOLF_SHAKE, this.getSoundVolume()); - } - - this.prevTimeWolfIsShaking = this.timeWolfIsShaking; - this.timeWolfIsShaking += 0.05F; - - if (this.prevTimeWolfIsShaking >= 2.0F) - { - this.isWet = false; - this.isShaking = false; - this.prevTimeWolfIsShaking = 0.0F; - this.timeWolfIsShaking = 0.0F; - } - - if (this.timeWolfIsShaking > 0.4F) - { - float f = (float)this.getEntityBoundingBox().minY; - int i = (int)(ExtMath.sin((this.timeWolfIsShaking - 0.4F) * (float)Math.PI) * 7.0F); - - for (int j = 0; j < i; ++j) - { - float f1 = (this.rand.floatv() * 2.0F - 1.0F) * this.width * 0.5F; - float f2 = (this.rand.floatv() * 2.0F - 1.0F) * this.width * 0.5F; - this.worldObj.clientParticle(ParticleType.SPLASH, this.posX + (double)f1, (double)(f + 0.8F), this.posZ + (double)f2); - } - } - } - } - - /** - * True if the wolf is wet - */ - public boolean isWolfWet() - { - return this.isWet; - } - - /** - * Used when calculating the amount of shading to apply while the wolf is wet. - */ - public float getShadingWhileWet(float p_70915_1_) - { - return 0.75F + (this.prevTimeWolfIsShaking + (this.timeWolfIsShaking - this.prevTimeWolfIsShaking) * p_70915_1_) / 2.0F * 0.25F; - } - - public float getShakeAngle(float p_70923_1_, float p_70923_2_) - { - float f = (this.prevTimeWolfIsShaking + (this.timeWolfIsShaking - this.prevTimeWolfIsShaking) * p_70923_1_ + p_70923_2_) / 1.8F; - - if (f < 0.0F) - { - f = 0.0F; - } - else if (f > 1.0F) - { - f = 1.0F; - } - - return ExtMath.sin(f * (float)Math.PI) * ExtMath.sin(f * (float)Math.PI * 11.0F) * 0.15F * (float)Math.PI; } public float getInterestedAngle(float p_70917_1_) @@ -430,21 +335,6 @@ public class EntityWolf extends EntityTameable return super.interact(player); } - @Clientside - public void handleStatusUpdate(byte id) - { - if (id == 8) - { - this.isShaking = true; - this.timeWolfIsShaking = 0.0F; - this.prevTimeWolfIsShaking = 0.0F; - } - else - { - super.handleStatusUpdate(id); - } - } - public float getTailRotation() { return this.isAngry() ? 1.5393804F : (this.isTamed() ? (0.55F - (20.0F - (float)this.dataWatcher.getWatchableObjectInt(18)) * 0.02F) * (float)Math.PI : ((float)Math.PI / 5F)); diff --git a/common/src/main/java/common/entity/item/EntityXp.java b/common/src/main/java/common/entity/item/EntityXp.java index 77073c2d..478f66aa 100755 --- a/common/src/main/java/common/entity/item/EntityXp.java +++ b/common/src/main/java/common/entity/item/EntityXp.java @@ -85,23 +85,6 @@ public class EntityXp extends Entity implements IObjectData return this.dataWatcher.getWatchableObjectInt(1); } - public int getBrightnessForRender(float partialTicks) - { - float f = 0.5F; - f = ExtMath.clampf(f, 0.0F, 1.0F); - int i = super.getBrightnessForRender(partialTicks); - int j = i & 255; - int k = i >> 16 & 255; - j = j + (int)(f * 15.0F * 16.0F); - - if (j > 240) - { - j = 240; - } - - return j | k << 16; - } - /** * Called to update the entity's position/logic. */ diff --git a/common/src/main/java/common/entity/npc/EntityArachnoid.java b/common/src/main/java/common/entity/npc/EntityArachnoid.java index ab075bf6..9e60df97 100755 --- a/common/src/main/java/common/entity/npc/EntityArachnoid.java +++ b/common/src/main/java/common/entity/npc/EntityArachnoid.java @@ -20,9 +20,7 @@ public class EntityArachnoid extends EntityNPC { } public boolean continueExecuting() { - float f = this.attacker.getBrightness(1.0F); - - if(f >= 0.5F && this.attacker.getRNG().chance(100)) { + if(this.attacker.getRNG().chance(100)) { this.attacker.setAttackTarget((EntityLiving)null); return false; } diff --git a/common/src/main/java/common/entity/projectile/EntityProjectile.java b/common/src/main/java/common/entity/projectile/EntityProjectile.java index a3108758..0fe8a9f5 100755 --- a/common/src/main/java/common/entity/projectile/EntityProjectile.java +++ b/common/src/main/java/common/entity/projectile/EntityProjectile.java @@ -349,19 +349,6 @@ public abstract class EntityProjectile extends Entity } // } } - - /** - * Gets how bright this entity is. - */ - public float getBrightness(float partialTicks) - { - return 1.0F; - } - - public int getBrightnessForRender(float partialTicks) - { - return 15728880; - } public int getTrackingRange() { return 64; diff --git a/common/src/main/java/common/entity/types/EntityAnimal.java b/common/src/main/java/common/entity/types/EntityAnimal.java index 3cdebd68..84aa88ce 100755 --- a/common/src/main/java/common/entity/types/EntityAnimal.java +++ b/common/src/main/java/common/entity/types/EntityAnimal.java @@ -93,7 +93,7 @@ public abstract class EntityAnimal extends EntityLiving public float getBlockPathWeight(BlockPos pos) { - return this.worldObj.getState(pos.down()).getBlock() == Blocks.grass ? 10.0F : this.worldObj.getLightBrightness(pos) - 0.5F; + return this.worldObj.getState(pos.down()).getBlock() == Blocks.grass ? 10.0F : 0.5F; } public void writeEntity(TagObject tagCompound) diff --git a/common/src/main/java/common/init/SoundEvent.java b/common/src/main/java/common/init/SoundEvent.java index b60287c6..6fcd8559 100755 --- a/common/src/main/java/common/init/SoundEvent.java +++ b/common/src/main/java/common/init/SoundEvent.java @@ -100,7 +100,6 @@ public enum SoundEvent { WOLF_GROWL("wolf_growl1", "wolf_growl2", "wolf_growl3"), WOLF_HURT("wolf_hurt1", "wolf_hurt2", "wolf_hurt3"), WOLF_PANTING("wolf_panting"), - WOLF_SHAKE("wolf_shake"), WOLF_WHINE("wolf_whine"), FOX_DEATH("fox_death"), diff --git a/common/src/main/java/common/world/IWorldAccess.java b/common/src/main/java/common/world/IWorldAccess.java index 3986e79f..77dfcb24 100755 --- a/common/src/main/java/common/world/IWorldAccess.java +++ b/common/src/main/java/common/world/IWorldAccess.java @@ -2,9 +2,11 @@ package common.world; import common.tileentity.TileEntity; import common.util.BlockPos; +import common.util.Clientside; public interface IWorldAccess extends IBlockAccess { TileEntity getTileEntity(BlockPos pos); + @Clientside int getCombinedLight(BlockPos pos, int lightValue); } diff --git a/common/src/main/java/common/world/World.java b/common/src/main/java/common/world/World.java index 2c4d68e9..c0823e2f 100755 --- a/common/src/main/java/common/world/World.java +++ b/common/src/main/java/common/world/World.java @@ -32,6 +32,7 @@ import common.tileentity.TileEntity; import common.util.BlockPos; import common.util.BoundingBox; import common.util.ChunkPos; +import common.util.Clientside; import common.util.ExtMath; import common.util.Facing; import common.util.HitPosition; @@ -405,6 +406,7 @@ public abstract class World implements IWorldAccess { } } + @Clientside public int getCombinedLight(BlockPos pos, int lightValue) { int i = this.getLightFromNeighborsFor(LightType.SKY, pos); int j = this.getLightFromNeighborsFor(LightType.BLOCK, pos);