diff --git a/Minecraft.Client/Common/res/TitleUpdate/res/terrain.png b/Minecraft.Client/Common/res/TitleUpdate/res/terrain.png index d68859ef..95154908 100644 Binary files a/Minecraft.Client/Common/res/TitleUpdate/res/terrain.png and b/Minecraft.Client/Common/res/TitleUpdate/res/terrain.png differ diff --git a/Minecraft.Client/ItemFrameRenderer.cpp b/Minecraft.Client/ItemFrameRenderer.cpp index 55354aac..4a0886e5 100644 --- a/Minecraft.Client/ItemFrameRenderer.cpp +++ b/Minecraft.Client/ItemFrameRenderer.cpp @@ -61,6 +61,9 @@ void ItemFrameRenderer::drawFrame(shared_ptr itemFrame) Tile *wood = Tile::wood; float depth = 1.0f / 16.0f; float width = 12.0f / 16.0f; + if (itemFrame->getItem() && itemFrame->getItem()->getItem() == Item::map) { + width = 1.0f; + } float widthHalf = width / 2.0f; // Back @@ -142,15 +145,15 @@ void ItemFrameRenderer::drawItem(shared_ptr entity) glRotatef(180, 0, 1, 0); glRotatef(180, 0, 0, 1); - glScalef(1.0f / 256.0f, 1.0f / 256.0f, 1.0f / 256.0f); - glTranslatef(-65, -107, -3); + glScalef(1.0f / 128.0f, 1.0f / 128.0f, 1.0f / 128.0f); + glTranslatef(-64.0f, -87.0f, -3.0f); glNormal3f(0, 0, -1); t->begin(); int vo = 7; - t->vertexUV(0 - vo, 128 + vo, 0, 0, 1); - t->vertexUV(128 + vo, 128 + vo, 0, 1, 1); - t->vertexUV(128 + vo, 0 - vo, 0, 1, 0); - t->vertexUV(0 - vo, 0 - vo, 0, 0, 0); + t->vertexUV(0.0f, 128.0f, 0.0f, 0.0f, 1.0f); + t->vertexUV(128.0f, 128.0f, 0.0f, 1.0f, 1.0f); + t->vertexUV(128.0f, 0.0f, 0.0f, 1.0f, 0.0f); + t->vertexUV(0.0f, 0.0f, 0.0f, 0.0f, 0.0f); t->end(); shared_ptr data = Item::map->getSavedData(itemEntity->getItem(), entity->level); diff --git a/Minecraft.Client/LivingEntityRenderer.cpp b/Minecraft.Client/LivingEntityRenderer.cpp index 5309e664..046b9b60 100644 --- a/Minecraft.Client/LivingEntityRenderer.cpp +++ b/Minecraft.Client/LivingEntityRenderer.cpp @@ -357,7 +357,7 @@ void LivingEntityRenderer::renderArrows(shared_ptr mob, float a) int LivingEntityRenderer::prepareArmorOverlay(shared_ptr mob, int layer, float a) { - return prepareArmor(mob, layer, a); + return -1; } int LivingEntityRenderer::prepareArmor(shared_ptr mob, int layer, float a) diff --git a/Minecraft.Client/MobRenderer.cpp b/Minecraft.Client/MobRenderer.cpp index 53998070..a578708a 100644 --- a/Minecraft.Client/MobRenderer.cpp +++ b/Minecraft.Client/MobRenderer.cpp @@ -33,7 +33,7 @@ void MobRenderer::render(shared_ptr _mob, double x, double y, double z, bool MobRenderer::shouldShowName(shared_ptr mob) { - return LivingEntityRenderer::shouldShowName(mob) && (mob->shouldShowName() || dynamic_pointer_cast(mob)->hasCustomName() && mob == entityRenderDispatcher->crosshairPickMob); + return LivingEntityRenderer::shouldShowName(mob) && (mob->shouldShowName() || dynamic_pointer_cast(mob)->hasCustomName()); } void MobRenderer::renderLeash(shared_ptr entity, double x, double y, double z, float rot, float a) diff --git a/Minecraft.Client/SheepFurModel.cpp b/Minecraft.Client/SheepFurModel.cpp index 4af11ab1..7f5408a4 100644 --- a/Minecraft.Client/SheepFurModel.cpp +++ b/Minecraft.Client/SheepFurModel.cpp @@ -51,19 +51,6 @@ void SheepFurModel::prepareMobModel(shared_ptr mob, float time, fl headXRot = sheep->getHeadEatAngleScale(a); wstring name = mob->getAName(); - if (name == L"jeb_") - { - int i1 = 25; - int i = mob->tickCount / 25; - int j = Sheep::COLOR_LENGTH; - int k = i % j; - int l = (i + 1) % j; - float f = ((float)(mob->tickCount % 25) + time) / 25.0F; - const float* afloat1 = Sheep::COLOR[k]; - const float* afloat2 = Sheep::COLOR[l]; - - RenderManager.StateSetColour(afloat1[0] * (1.0F - f) + afloat2[0] * f, afloat1[1] * (1.0F - f) + afloat2[1] * f, afloat1[2] * (1.0F - f) + afloat2[2] * f, 1.0f); - } } void SheepFurModel::setupAnim(float time, float r, float bob, float yRot, float xRot, float scale, shared_ptr entity, unsigned int uiBitmaskOverrideAnim) diff --git a/Minecraft.Client/SheepRenderer.cpp b/Minecraft.Client/SheepRenderer.cpp index 43450578..3e581841 100644 --- a/Minecraft.Client/SheepRenderer.cpp +++ b/Minecraft.Client/SheepRenderer.cpp @@ -27,25 +27,30 @@ int SheepRenderer::prepareArmor(shared_ptr _sheep, int layer, floa { // easter egg... int colorDuration = 25; - int value = (sheep->tickCount / colorDuration) + sheep->entityId; + int value = (sheep->tickCount / colorDuration); int c1 = value % Sheep::COLOR_LENGTH; int c2 = (value + 1) % Sheep::COLOR_LENGTH; float subStep = ((sheep->tickCount % colorDuration) + a) / static_cast(colorDuration); - glColor3f(Sheep::COLOR[c1][0] * (1.0f - subStep) + Sheep::COLOR[c2][0] * subStep, Sheep::COLOR[c1][1] * (1.0f - subStep) + Sheep::COLOR[c2][1] * subStep, Sheep::COLOR[c1][2] - * (1.0f - subStep) + Sheep::COLOR[c2][2] * subStep); + float r = Sheep::COLOR[c1][0] * (1.0f - subStep) + Sheep::COLOR[c2][0] * subStep; + float g = Sheep::COLOR[c1][1] * (1.0f - subStep) + Sheep::COLOR[c2][1] * subStep; + float b = Sheep::COLOR[c1][2] * (1.0f - subStep) + Sheep::COLOR[c2][2] * subStep; + + float brightness = SharedConstants::TEXTURE_LIGHTING ? 1.0f : sheep->getBrightness(a); + glColor3f(r * brightness, g * brightness, b * brightness); } else { int color = sheep->getColor(); - glColor3f(Sheep::COLOR[color][0], Sheep::COLOR[color][1], Sheep::COLOR[color][2]); + + float r = Sheep::COLOR[color][0]; + float g = Sheep::COLOR[color][1]; + float b = Sheep::COLOR[color][2]; + + float brightness = SharedConstants::TEXTURE_LIGHTING ? 1.0f : sheep->getBrightness(a); + glColor3f(r * brightness, g * brightness, b * brightness); } - - // 4J - change brought forward from 1.8.2 - float brightness = SharedConstants::TEXTURE_LIGHTING ? 1.0f : sheep->getBrightness(a); - int color = sheep->getColor(); - glColor3f(brightness * Sheep::COLOR[color][0], brightness * Sheep::COLOR[color][1], brightness * Sheep::COLOR[color][2]); return 1; } return -1; diff --git a/Minecraft.World/Item.cpp b/Minecraft.World/Item.cpp index 49ff63d8..e40f12d4 100644 --- a/Minecraft.World/Item.cpp +++ b/Minecraft.World/Item.cpp @@ -479,7 +479,7 @@ void Item::staticCtor() Item::potatoBaked = (new FoodItem(137, 6, FoodConstants::FOOD_SATURATION_NORMAL, false)) ->setIconName(L"potatoBaked")->setDescriptionId(IDS_ITEM_POTATO_BAKED)->setUseDescriptionId(IDS_DESC_POTATO_BAKED); Item::potatoPoisonous = (new FoodItem(138, 2, FoodConstants::FOOD_SATURATION_LOW, false)) ->setEatEffect(MobEffect::poison->id, 5, 0, .6f)->setIconName(L"potatoPoisonous")->setDescriptionId(IDS_ITEM_POTATO_POISONOUS)->setUseDescriptionId(IDS_DESC_POTATO_POISONOUS); - Item::emptyMap = static_cast((new EmptyMapItem(139))->setIconName(L"map_empty")->setDescriptionId(IDS_ITEM_MAP_EMPTY)->setUseDescriptionId(IDS_DESC_MAP_EMPTY)); + Item::emptyMap = (EmptyMapItem*)(new EmptyMapItem(139))->setIconName(L"map_empty")->setBaseItemTypeAndMaterial(eBaseItemType_pockettool, eMaterial_map)->setDescriptionId(IDS_ITEM_MAP_EMPTY)->setUseDescriptionId(IDS_DESC_MAP_EMPTY); Item::carrotGolden = (new FoodItem(140, 6, FoodConstants::FOOD_SATURATION_SUPERNATURAL, false)) ->setBaseItemTypeAndMaterial(eBaseItemType_giltFruit, eMaterial_carrot)->setIconName(L"carrotGolden")->setPotionBrewingFormula(PotionBrewing::MOD_GOLDENCARROT)->setDescriptionId(IDS_ITEM_CARROT_GOLDEN)->setUseDescriptionId(IDS_DESC_CARROT_GOLDEN);