diff --git a/Minecraft.Client/CreeperModel.cpp b/Minecraft.Client/CreeperModel.cpp index 066e0b55..14c7e55f 100644 --- a/Minecraft.Client/CreeperModel.cpp +++ b/Minecraft.Client/CreeperModel.cpp @@ -6,7 +6,7 @@ // 4J - added void CreeperModel::_init(float g) { - int yo = 4; + int yo = 6; head = new ModelPart(this, 0, 0); head->addBox(-4, - 8, -4, 8, 8, 8, g); // Head diff --git a/Minecraft.Client/LivingEntityRenderer.cpp b/Minecraft.Client/LivingEntityRenderer.cpp index 9e8682c7..7f4a3258 100644 --- a/Minecraft.Client/LivingEntityRenderer.cpp +++ b/Minecraft.Client/LivingEntityRenderer.cpp @@ -491,7 +491,7 @@ void LivingEntityRenderer::renderNameTag(shared_ptr mob, const wst float s = 1 / 60.0f * size; glPushMatrix(); - glTranslatef((float) x, (float) y + 2.3f, (float) z); + glTranslatef((float) x, (float) y + mob->bbHeight + 0.5f, (float) z); glNormal3f(0, 1, 0); glRotatef(-this->entityRenderDispatcher->playerRotY, 0, 1, 0); diff --git a/Minecraft.World/AttackDamageMobEffect.cpp b/Minecraft.World/AttackDamageMobEffect.cpp index 483c9a72..00ab0f95 100644 --- a/Minecraft.World/AttackDamageMobEffect.cpp +++ b/Minecraft.World/AttackDamageMobEffect.cpp @@ -1,19 +1,19 @@ -#include "stdafx.h" - -#include "AttackDamageMobEffect.h" - -AttackDamageMobEffect::AttackDamageMobEffect(int id, bool isHarmful, eMinecraftColour color) : MobEffect(id, isHarmful, color) -{ -} - -double AttackDamageMobEffect::getAttributeModifierValue(int amplifier, AttributeModifier *original) -{ - if (id == MobEffect::weakness->id) - { - return -0.5f * (amplifier + 1); - } - else - { - return 1.3 * (amplifier + 1); - } +#include "stdafx.h" + +#include "AttackDamageMobEffect.h" + +AttackDamageMobEffect::AttackDamageMobEffect(int id, bool isHarmful, eMinecraftColour color) : MobEffect(id, isHarmful, color) +{ +} + +double AttackDamageMobEffect::getAttributeModifierValue(int amplifier, AttributeModifier *original) +{ + if (id == MobEffect::weakness->id) + { + return -0.5f * (amplifier + 1); + } + else + { + return 1.3 * (amplifier + 1); + } } \ No newline at end of file diff --git a/Minecraft.World/PistonBaseTile.cpp b/Minecraft.World/PistonBaseTile.cpp index e8cb35b1..8c002a85 100644 --- a/Minecraft.World/PistonBaseTile.cpp +++ b/Minecraft.World/PistonBaseTile.cpp @@ -218,10 +218,12 @@ bool PistonBaseTile::triggerEvent(Level *level, int x, int y, int z, int param1, if (extend && param1 == TRIGGER_CONTRACT) { level->setData(x, y, z, facing | EXTENDED_BIT, UPDATE_CLIENTS); + ignoreUpdate(false); return false; } else if (!extend && param1 == TRIGGER_EXTEND) { + ignoreUpdate(false); return false; } } @@ -247,6 +249,7 @@ bool PistonBaseTile::triggerEvent(Level *level, int x, int y, int z, int param1, } else { + ignoreUpdate(false); return false; } PIXEndNamedEvent(); @@ -340,6 +343,12 @@ bool PistonBaseTile::triggerEvent(Level *level, int x, int y, int z, int param1, ignoreUpdate(false); + level->updateNeighborsAt(x, y, z, id); + int stepX = x + Facing::STEP_X[facing]; + int stepY = y + Facing::STEP_Y[facing]; + int stepZ = z + Facing::STEP_Z[facing]; + level->updateNeighborsAt(stepX, stepY, stepZ, id); + return true; } diff --git a/Minecraft.World/StemTile.cpp b/Minecraft.World/StemTile.cpp index e8367522..32592c51 100644 --- a/Minecraft.World/StemTile.cpp +++ b/Minecraft.World/StemTile.cpp @@ -189,7 +189,10 @@ void StemTile::spawnResources(Level *level, int x, int y, int z, int data, float if (fruit == Tile::melon) seed = Item::seeds_melon; for (int i = 0; i < 3; i++) { - popResource(level, x, y, z, shared_ptr(new ItemInstance(seed))); + if (level->random->nextInt(15) <= data) + { + popResource(level, x, y, z, shared_ptr(new ItemInstance(seed))); + } } }