aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/common/render/GT_CapeRenderer.java
diff options
context:
space:
mode:
authorNotAPenguin <michiel.vandeginste@gmail.com>2024-09-02 23:17:17 +0200
committerGitHub <noreply@github.com>2024-09-02 23:17:17 +0200
commit1b820de08a05070909a267e17f033fcf58ac8710 (patch)
tree02831a025986a06b20f87e5bcc69d1e0c639a342 /src/main/java/gregtech/common/render/GT_CapeRenderer.java
parentafd3fd92b6a6ab9ab0d0dc3214e6bc8ff7a86c9b (diff)
downloadGT5-Unofficial-1b820de08a05070909a267e17f033fcf58ac8710.tar.gz
GT5-Unofficial-1b820de08a05070909a267e17f033fcf58ac8710.tar.bz2
GT5-Unofficial-1b820de08a05070909a267e17f033fcf58ac8710.zip
The Great Renaming (#3014)
* move kekztech to a single root dir * move detrav to a single root dir * move gtnh-lanthanides to a single root dir * move tectech and delete some gross reflection in gt++ * remove more reflection inside gt5u * delete more reflection in gt++ * fix imports * move bartworks and bwcrossmod * fix proxies * move galactigreg and ggfab * move gtneioreplugin * try to fix gt++ bee loader * apply the rename rules to BW * apply rename rules to bwcrossmod * apply rename rules to detrav scanner mod * apply rename rules to galacticgreg * apply rename rules to ggfab * apply rename rules to goodgenerator * apply rename rules to gtnh-lanthanides * apply rename rules to gt++ * apply rename rules to kekztech * apply rename rules to kubatech * apply rename rules to tectech * apply rename rules to gt apply the rename rules to gt * fix tt import * fix mui hopefully * fix coremod except intergalactic * rename assline recipe class * fix a class name i stumbled on * rename StructureUtility to GTStructureUtility to prevent conflict with structurelib * temporary rename of GTTooltipDataCache to old name * fix gt client/server proxy names
Diffstat (limited to 'src/main/java/gregtech/common/render/GT_CapeRenderer.java')
-rw-r--r--src/main/java/gregtech/common/render/GT_CapeRenderer.java148
1 files changed, 0 insertions, 148 deletions
diff --git a/src/main/java/gregtech/common/render/GT_CapeRenderer.java b/src/main/java/gregtech/common/render/GT_CapeRenderer.java
deleted file mode 100644
index ec9ef2880c..0000000000
--- a/src/main/java/gregtech/common/render/GT_CapeRenderer.java
+++ /dev/null
@@ -1,148 +0,0 @@
-package gregtech.common.render;
-
-import java.util.Collection;
-
-import net.minecraft.client.entity.AbstractClientPlayer;
-import net.minecraft.client.model.ModelBiped;
-import net.minecraft.client.renderer.entity.RenderManager;
-import net.minecraft.client.renderer.entity.RenderPlayer;
-import net.minecraft.potion.Potion;
-import net.minecraft.util.MathHelper;
-import net.minecraft.util.ResourceLocation;
-import net.minecraftforge.client.event.RenderPlayerEvent;
-
-import org.lwjgl.opengl.GL11;
-
-import gregtech.api.enums.GT_Values;
-import gregtech.api.util.GT_Log;
-import gregtech.api.util.GT_Utility;
-
-public class GT_CapeRenderer extends RenderPlayer {
-
- private final ResourceLocation[] mCapes = { new ResourceLocation("gregtech:textures/BrainTechCape.png"),
- new ResourceLocation("gregtech:textures/GregTechCape.png"),
- new ResourceLocation("gregtech:textures/MrBrainCape.png"),
- new ResourceLocation("gregtech:textures/GregoriusCape.png"),
- new ResourceLocation("gregtech:textures/DonorCape.png"), new ResourceLocation("gregtech:textures/DevCape.png"),
- new ResourceLocation("gregtech:textures/Steam.png"), new ResourceLocation("gregtech:textures/Titanium.png"),
- new ResourceLocation("gregtech:textures/Neutronium.png"),
- new ResourceLocation("gregtech:textures/Stargate.png") };
- private final Collection<String> mCapeList;
-
- public GT_CapeRenderer(Collection<String> aCapeList) {
- this.mCapeList = aCapeList;
- setRenderManager(RenderManager.instance);
- }
-
- public void receiveRenderSpecialsEvent(RenderPlayerEvent.Specials.Pre aEvent) {
- AbstractClientPlayer aPlayer = (AbstractClientPlayer) aEvent.entityPlayer;
- if (GT_Utility.getFullInvisibility(aPlayer)) {
- aEvent.setCanceled(true);
- return;
- }
- float aPartialTicks = aEvent.partialRenderTick;
- if (aPlayer.isInvisible()) {
- return;
- }
- if (GT_Utility.getPotion(aPlayer, Potion.invisibility.id)) {
- return;
- }
- try {
- ResourceLocation tResource = aPlayer.getLocationCape();
- if (aPlayer.getDisplayName()
- .equalsIgnoreCase("Friedi4321")) {
- tResource = this.mCapes[0];
- }
- if (this.mCapeList.contains(
- aPlayer.getDisplayName()
- .toLowerCase())) {
- tResource = this.mCapes[1];
- }
- if (aPlayer.getDisplayName()
- .equalsIgnoreCase("Mr_Brain")) {
- tResource = this.mCapes[2];
- }
- if (aPlayer.getDisplayName()
- .equalsIgnoreCase("GregoriusT")) {
- tResource = this.mCapes[3];
- }
- if (this.mCapeList.contains(
- aPlayer.getDisplayName()
- .toLowerCase() + ":capedonor")) {
- tResource = this.mCapes[4];
- }
- if (this.mCapeList.contains(
- aPlayer.getDisplayName()
- .toLowerCase() + ":capedev")) {
- tResource = this.mCapes[5];
- }
- if (this.mCapeList.contains(
- aPlayer.getDisplayName()
- .toLowerCase() + ":cape_steam")) {
- tResource = this.mCapes[6];
- }
- if (this.mCapeList.contains(
- aPlayer.getDisplayName()
- .toLowerCase() + ":cape_titanium")) {
- tResource = this.mCapes[7];
- }
- if (this.mCapeList.contains(
- aPlayer.getDisplayName()
- .toLowerCase() + ":cape_neutronium")) {
- tResource = this.mCapes[8];
- }
- if (this.mCapeList.contains(
- aPlayer.getDisplayName()
- .toLowerCase() + ":cape_stargate")) {
- tResource = this.mCapes[9];
- }
-
- if ((tResource != null) && (!aPlayer.getHideCape())) {
- bindTexture(tResource);
- GL11.glPushMatrix();
- GL11.glTranslatef(0.0F, 0.0F, 0.125F);
- double d0 = aPlayer.field_71091_bM + (aPlayer.field_71094_bP - aPlayer.field_71091_bM) * aPartialTicks
- - (aPlayer.prevPosX + (aPlayer.posX - aPlayer.prevPosX) * aPartialTicks);
- double d1 = aPlayer.field_71096_bN + (aPlayer.field_71095_bQ - aPlayer.field_71096_bN) * aPartialTicks
- - (aPlayer.prevPosY + (aPlayer.posY - aPlayer.prevPosY) * aPartialTicks);
- double d2 = aPlayer.field_71097_bO + (aPlayer.field_71085_bR - aPlayer.field_71097_bO) * aPartialTicks
- - (aPlayer.prevPosZ + (aPlayer.posZ - aPlayer.prevPosZ) * aPartialTicks);
- float f6 = aPlayer.prevRenderYawOffset
- + (aPlayer.renderYawOffset - aPlayer.prevRenderYawOffset) * aPartialTicks;
- double d3 = MathHelper.sin(f6 * (float) Math.PI / 180.0F);
- double d4 = -MathHelper.cos(f6 * (float) Math.PI / 180.0F);
- float f7 = (float) d1 * 10.0F;
- float f8 = (float) (d0 * d3 + d2 * d4) * 100.0F;
- float f9 = (float) (d0 * d4 - d2 * d3) * 100.0F;
- if (f7 < -6.0F) {
- f7 = -6.0F;
- }
- if (f7 > 32.0F) {
- f7 = 32.0F;
- }
- if (f8 < 0.0F) {
- f8 = 0.0F;
- }
- float f10 = aPlayer.prevCameraYaw + (aPlayer.cameraYaw - aPlayer.prevCameraYaw) * aPartialTicks;
- f7 += MathHelper.sin(
- (aPlayer.prevDistanceWalkedModified
- + (aPlayer.distanceWalkedModified - aPlayer.prevDistanceWalkedModified) * aPartialTicks) * 6.0F)
- * 32.0F
- * f10;
- if (aPlayer.isSneaking()) {
- f7 += 25.0F;
- }
- GL11.glRotatef(6.0F + f8 / 2.0F + f7, 1.0F, 0.0F, 0.0F);
- GL11.glRotatef(f9 / 2.0F, 0.0F, 0.0F, 1.0F);
- GL11.glRotatef(-f9 / 2.0F, 0.0F, 1.0F, 0.0F);
- GL11.glRotatef(180.0F, 0.0F, 1.0F, 0.0F);
- ((ModelBiped) this.mainModel).renderCloak(0.0625F);
- GL11.glPopMatrix();
- }
- } catch (Throwable e) {
- if (GT_Values.D1) {
- e.printStackTrace(GT_Log.err);
- }
- }
- }
-}