fix: various fixes #6

Merged
qloak merged 5 commits from main into main 2026-07-15 19:33:41 +00:00
5 changed files with 33 additions and 21 deletions
+1 -1
View File
@@ -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
+1 -1
View File
@@ -491,7 +491,7 @@ void LivingEntityRenderer::renderNameTag(shared_ptr<LivingEntity> 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);
+18 -18
View File
@@ -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);
}
}
+9
View File
@@ -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;
}
+4 -1
View File
@@ -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<ItemInstance>(new ItemInstance(seed)));
if (level->random->nextInt(15) <= data)
{
popResource(level, x, y, z, shared_ptr<ItemInstance>(new ItemInstance(seed)));
}
}
}