Archived
Compile-error fixes (deobfuscated func_/field_ references -> real SlashBlade API method names): - ItemSlashBlade / EntityDrive / MotionVector / StunTracker / Refine / Trail / Combo - DataWatcher parameters: ItemSlashBlade.stack -> SlashBlade.getSpecialAttackFromState, etc. - Replaced call sites pointed at SlashBlade stub with real SlashBlade mc1.7.10-r87 API Dependencies updated: - SlashBlade 1.0.0-stub -> mods.flammpfeil.slashblade:SlashBlade:mc1.7.10-r87 (real, MavenLocal) - botania-stub -> com.github.GTNewHorizons:Botania:1.13.16-GTNH:dev (real, JitPack/GTNH Maven) compileJava + publishToMavenLocal both green. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> @
74 lines
3.5 KiB
Java
74 lines
3.5 KiB
Java
/*
|
|
* Decompiled with CFR 0.152.
|
|
*
|
|
* Could not load the following classes:
|
|
* cpw.mods.fml.relauncher.Side
|
|
* cpw.mods.fml.relauncher.SideOnly
|
|
* net.minecraft.client.renderer.Tessellator
|
|
* net.minecraft.client.renderer.entity.Render
|
|
* net.minecraft.entity.Entity
|
|
* net.minecraft.util.ResourceLocation
|
|
* org.lwjgl.opengl.GL11
|
|
*/
|
|
package com.tanzanite.SA.render;
|
|
|
|
import com.tanzanite.SA.entities.EntityDriveAlt;
|
|
import cpw.mods.fml.relauncher.Side;
|
|
import cpw.mods.fml.relauncher.SideOnly;
|
|
import net.minecraft.client.renderer.Tessellator;
|
|
import net.minecraft.client.renderer.entity.Render;
|
|
import net.minecraft.entity.Entity;
|
|
import net.minecraft.util.ResourceLocation;
|
|
import org.lwjgl.opengl.GL11;
|
|
|
|
@SideOnly(value=Side.CLIENT)
|
|
public class RenderDriveAlt
|
|
extends Render {
|
|
private static double[][] dVec = new double[][]{{0.0, 1.0, -0.5}, {0.0, 0.75, 0.0}, {0.1, 0.6, -0.15}, {0.0, 0.5, -0.25}, {-0.1, 0.6, -0.15}, {0.0, 0.0, 0.25}, {0.25, 0.0, 0.0}, {0.0, 0.0, -0.25}, {-0.25, 0.0, 0.0}, {0.0, -0.75, 0.0}, {0.1, -0.6, -0.15}, {0.0, -0.5, -0.25}, {-0.1, -0.6, -0.15}, {0.0, -1.0, -0.5}};
|
|
private static int[][] nVecPos = new int[][]{{0, 1, 2, 3}, {0, 3, 4, 1}, {1, 5, 6, 2}, {3, 2, 6, 7}, {3, 7, 8, 4}, {1, 4, 8, 5}, {6, 5, 9, 10}, {6, 10, 11, 7}, {8, 7, 11, 12}, {8, 12, 9, 5}, {10, 9, 13, 11}, {12, 11, 13, 9}};
|
|
|
|
public void doRender(Entity entity, double d0, double d1, double d2, float f, float f1) {
|
|
if (entity instanceof EntityDriveAlt) {
|
|
this.dodriveRender((EntityDriveAlt)entity, d0, d1, d2, f, f1);
|
|
}
|
|
}
|
|
|
|
protected ResourceLocation getEntityTexture(Entity var1) {
|
|
return null;
|
|
}
|
|
|
|
private void dodriveRender(EntityDriveAlt entity, double dX, double dY, double dZ, float f, float f1) {
|
|
Tessellator tessellator = Tessellator.instance;
|
|
GL11.glIsEnabled((int)3553);
|
|
GL11.glIsEnabled((int)2896);
|
|
GL11.glEnable((int)3042);
|
|
GL11.glBlendFunc((int)770, (int)1);
|
|
GL11.glPushMatrix();
|
|
GL11.glTranslatef((float)((float)dX), (float)((float)dY), (float)((float)dZ));
|
|
GL11.glRotatef((float)entity.rotationYaw, (float)0.0f, (float)1.0f, (float)0.0f);
|
|
GL11.glRotatef((float)(-entity.rotationPitch), (float)1.0f, (float)0.0f, (float)0.0f);
|
|
GL11.glRotatef((float)entity.getRoll(), (float)0.0f, (float)0.0f, (float)1.0f);
|
|
float c = entity.getc();
|
|
float k = entity.getk();
|
|
float g = entity.getg();
|
|
GL11.glScalef((float)k, (float)c, (float)g);
|
|
float lifetime = entity.getLifeTime();
|
|
float ticks = entity.ticksExisted;
|
|
tessellator.startDrawingQuads();
|
|
tessellator.setColorRGBA_I(entity.getColor(), (int)(255.0f * (float)Math.pow((lifetime - Math.min(lifetime, ticks)) / lifetime, 2.0)));
|
|
double dScale = 1.0;
|
|
for (int idx = 0; idx < nVecPos.length; ++idx) {
|
|
tessellator.addVertex(dVec[nVecPos[idx][0]][0] * dScale, dVec[nVecPos[idx][0]][1] * dScale, dVec[nVecPos[idx][0]][2] * dScale);
|
|
tessellator.addVertex(dVec[nVecPos[idx][1]][0] * dScale, dVec[nVecPos[idx][1]][1] * dScale, dVec[nVecPos[idx][1]][2] * dScale);
|
|
tessellator.addVertex(dVec[nVecPos[idx][2]][0] * dScale, dVec[nVecPos[idx][2]][1] * dScale, dVec[nVecPos[idx][2]][2] * dScale);
|
|
tessellator.addVertex(dVec[nVecPos[idx][3]][0] * dScale, dVec[nVecPos[idx][3]][1] * dScale, dVec[nVecPos[idx][3]][2] * dScale);
|
|
}
|
|
tessellator.draw();
|
|
GL11.glPopMatrix();
|
|
GL11.glIsEnabled((int)3042);
|
|
GL11.glEnable((int)2896);
|
|
GL11.glEnable((int)3553);
|
|
}
|
|
}
|
|
|