From b3feddfef372618c8a9d7a0abcaf18cfad866c18 Mon Sep 17 00:00:00 2001 From: daoge <3523206925@qq.com> Date: Tue, 3 Mar 2026 03:04:10 +0800 Subject: feat: TU19 (Dec 2014) Features & Content (#155) * try to resolve merge conflict * feat: TU19 (Dec 2014) Features & Content (#32) * December 2014 files * Working release build * Fix compilation issues * Add sound to Windows64Media * Add DLC content and force Tutorial DLC * Revert "Add DLC content and force Tutorial DLC" This reverts commit 97a43994725008e35fceb984d5549df9c8cea470. * Disable broken light packing * Disable breakpoint during DLC texture map load Allows DLC loading but the DLC textures are still broken * Fix post build not working * ... * fix vs2022 build * fix cmake build --------- Co-authored-by: Loki --- Minecraft.Client/FishingHookRenderer.cpp | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) (limited to 'Minecraft.Client/FishingHookRenderer.cpp') diff --git a/Minecraft.Client/FishingHookRenderer.cpp b/Minecraft.Client/FishingHookRenderer.cpp index 0408e96e..9d60a9ac 100644 --- a/Minecraft.Client/FishingHookRenderer.cpp +++ b/Minecraft.Client/FishingHookRenderer.cpp @@ -8,6 +8,8 @@ #include "..\Minecraft.World\Mth.h" #include "MultiPlayerLocalPlayer.h" +ResourceLocation FishingHookRenderer::PARTICLE_LOCATION = ResourceLocation(TN_PARTICLES); + void FishingHookRenderer::render(shared_ptr _hook, double x, double y, double z, float rot, float a) { // 4J - dynamic cast required because we aren't using templates/generics in our version @@ -20,13 +22,13 @@ void FishingHookRenderer::render(shared_ptr _hook, double x, double y, d glScalef(1 / 2.0f, 1 / 2.0f, 1 / 2.0f); int xi = 1; int yi = 2; - bindTexture(TN_PARTICLES); // 4J was L"/particles.png" + bindTexture(hook); // 4J was L"/particles.png" Tesselator *t = Tesselator::getInstance(); - float u0 = ((xi) * 8 + 0) / 128.0f; - float u1 = ((xi) * 8 + 8) / 128.0f; - float v0 = ((yi) * 8 + 0) / 128.0f; - float v1 = ((yi) * 8 + 8) / 128.0f; + float u0 = (xi * 8 + 0) / 128.0f; + float u1 = (xi * 8 + 8) / 128.0f; + float v0 = (yi * 8 + 0) / 128.0f; + float v1 = (yi * 8 + 8) / 128.0f; float r = 1.0f; @@ -50,7 +52,7 @@ void FishingHookRenderer::render(shared_ptr _hook, double x, double y, d if (hook->owner != NULL) { float swing = hook->owner->getAttackAnim(a); - float swing2 = (float) Mth::sin((sqrt(swing)) * PI); + float swing2 = (float) Mth::sin(sqrt(swing) * PI); Vec3 *vv = Vec3::newTemp(-0.5, 0.03, 0.8); @@ -62,7 +64,7 @@ void FishingHookRenderer::render(shared_ptr _hook, double x, double y, d double xp = hook->owner->xo + (hook->owner->x - hook->owner->xo) * a + vv->x; double yp = hook->owner->yo + (hook->owner->y - hook->owner->yo) * a + vv->y; double zp = hook->owner->zo + (hook->owner->z - hook->owner->zo) * a + vv->z; - double yOffset = hook->owner != dynamic_pointer_cast(Minecraft::GetInstance()->player) ? hook->owner->getHeadHeight() : 0; + double yOffset = hook->owner == dynamic_pointer_cast(Minecraft::GetInstance()->player) ? 0 : hook->owner->getHeadHeight(); // 4J-PB - changing this to be per player //if (this->entityRenderDispatcher->options->thirdPersonView) @@ -99,3 +101,8 @@ void FishingHookRenderer::render(shared_ptr _hook, double x, double y, d glEnable(GL_TEXTURE_2D); } } + +ResourceLocation *FishingHookRenderer::getTextureLocation(shared_ptr mob) +{ + return &PARTICLE_LOCATION; +} -- cgit v1.2.3