From e2c7a8ec4b70bbf72037fdeba3224ef89431b112 Mon Sep 17 00:00:00 2001 From: Vincent Lee Date: Tue, 15 Aug 2017 20:32:09 -0500 Subject: [PATCH] Remove ancient pylon model --- .../botania/client/model/ModelPylonOld.java | 157 ------------------ .../client/render/tile/RenderTilePylon.java | 40 ++--- .../common/core/handler/ConfigHandler.java | 4 - .../textures/model/{ => unused}/pylonold.png | Bin .../textures/model/{ => unused}/pylonold1.png | Bin .../textures/model/{ => unused}/pylonold2.png | Bin 6 files changed, 13 insertions(+), 188 deletions(-) delete mode 100644 src/main/java/vazkii/botania/client/model/ModelPylonOld.java rename src/main/resources/assets/botania/textures/model/{ => unused}/pylonold.png (100%) rename src/main/resources/assets/botania/textures/model/{ => unused}/pylonold1.png (100%) rename src/main/resources/assets/botania/textures/model/{ => unused}/pylonold2.png (100%) diff --git a/src/main/java/vazkii/botania/client/model/ModelPylonOld.java b/src/main/java/vazkii/botania/client/model/ModelPylonOld.java deleted file mode 100644 index 697342ba2..000000000 --- a/src/main/java/vazkii/botania/client/model/ModelPylonOld.java +++ /dev/null @@ -1,157 +0,0 @@ -/** - * This class was created by . It's distributed as - * part of the Botania Mod. Get the Source Code in github: - * https://github.com/Vazkii/Botania - * - * Botania is Open Source and distributed under the - * Botania License: http://botaniamod.net/license.php - * - * File Created @ [Feb 18, 2014, 10:05:39 PM (GMT)] - */ -package vazkii.botania.client.model; - -import net.minecraft.client.model.ModelBase; -import net.minecraft.client.model.ModelRenderer; -import vazkii.botania.api.state.enums.PylonVariant; - -public class ModelPylonOld extends ModelBase implements IPylonModel { - - final ModelRenderer crystal1; - final ModelRenderer crystal2; - final ModelRenderer crystal3; - final ModelRenderer crystal4; - final ModelRenderer crystal5; - final ModelRenderer crystal6; - final ModelRenderer crystal7; - final ModelRenderer crystal8; - final ModelRenderer outside1; - final ModelRenderer outside2; - final ModelRenderer outside3; - final ModelRenderer outside4; - final ModelRenderer outside5; - final ModelRenderer outside6; - final ModelRenderer outside7; - final ModelRenderer outside8; - - public ModelPylonOld() { - textureWidth = 64; - textureHeight = 32; - - crystal1 = new ModelRenderer(this, 0, 0); - crystal1.addBox(-1.5F, -7F, -1F, 3, 7, 2); - crystal1.setRotationPoint(0F, 23F, 0F); - crystal1.setTextureSize(256, 128); - setRotation(crystal1, 0.1396263F, -0.418879F, 0F); - crystal2 = new ModelRenderer(this, 0, 0); - crystal2.addBox(-1.5F, -7F, -1F, 3, 7, 2); - crystal2.setRotationPoint(0F, 23F, 0F); - crystal2.setTextureSize(256, 128); - setRotation(crystal2, -0.1396263F, 0.418879F, 0F); - crystal3 = new ModelRenderer(this, 0, 0); - crystal3.addBox(-1.5F, -7F, -1F, 3, 7, 2); - crystal3.setRotationPoint(0F, 23F, 0F); - crystal3.setTextureSize(256, 128); - setRotation(crystal3, 0.1396263F, 0.418879F, 0F); - crystal4 = new ModelRenderer(this, 0, 0); - crystal4.addBox(-1.5F, -7F, -1F, 3, 7, 2); - crystal4.setRotationPoint(0F, 23F, 0F); - crystal4.setTextureSize(256, 128); - setRotation(crystal4, -0.1396263F, -0.418879F, 0F); - crystal5 = new ModelRenderer(this, 0, 0); - crystal5.addBox(-1.5F, 0F, -1F, 3, 7, 2); - crystal5.setRotationPoint(0F, 10F, 0F); - crystal5.setTextureSize(256, 128); - setRotation(crystal5, 0.1396263F, 0.418879F, 0F); - crystal6 = new ModelRenderer(this, 0, 0); - crystal6.addBox(-1.5F, 0F, -1F, 3, 7, 2); - crystal6.setRotationPoint(0F, 10F, 0F); - crystal6.setTextureSize(256, 128); - setRotation(crystal6, 0.1396263F, -0.418879F, 0F); - crystal7 = new ModelRenderer(this, 0, 0); - crystal7.addBox(-1.5F, 0F, -1F, 3, 7, 2); - crystal7.setRotationPoint(0F, 10F, 0F); - crystal7.setTextureSize(256, 128); - setRotation(crystal7, -0.1396263F, -0.418879F, 0F); - crystal8 = new ModelRenderer(this, 0, 0); - crystal8.addBox(-1.5F, 0F, -1F, 3, 7, 2); - crystal8.setRotationPoint(0F, 10F, 0F); - crystal8.setTextureSize(256, 128); - setRotation(crystal8, -0.1396263F, 0.418879F, 0F); - outside1 = new ModelRenderer(this, 17, 0); - outside1.addBox(0F, -4F, -1.5F, 1, 8, 3); - outside1.setRotationPoint(4F, 18F, 0F); - outside1.setTextureSize(256, 128); - setRotation(outside1, 0F, 0F, 0.1396263F); - outside2 = new ModelRenderer(this, 17, 0); - outside2.addBox(-1F, -4F, -1.5F, 1, 8, 3); - outside2.setRotationPoint(-4F, 18F, 0F); - outside2.setTextureSize(256, 128); - setRotation(outside2, 0F, 0F, -0.1396263F); - outside3 = new ModelRenderer(this, 26, 0); - outside3.addBox(-1.5F, -3F, -1F, 3, 6, 1); - outside3.setRotationPoint(0F, 18F, -4F); - outside3.setTextureSize(256, 128); - setRotation(outside3, 0.0698132F, 0F, 0F); - outside4 = new ModelRenderer(this, 26, 0); - outside4.addBox(-1.5F, -3F, 0F, 3, 6, 1); - outside4.setRotationPoint(0F, 18F, 4F); - outside4.setTextureSize(256, 128); - setRotation(outside4, -0.0698132F, 0F, 0F); - outside5 = new ModelRenderer(this, 27, 0); - outside5.addBox(0F, 0F, -4F, 1, 2, 8); - outside5.setRotationPoint(3F, 18F, 0F); - outside5.setTextureSize(256, 128); - setRotation(outside5, 0F, 0F, 0F); - outside6 = new ModelRenderer(this, 27, 0); - outside6.addBox(-1F, -1F, -4F, 1, 2, 8); - outside6.setRotationPoint(-3F, 19F, 0F); - outside6.setTextureSize(256, 128); - setRotation(outside6, 0F, 0F, 0F); - outside7 = new ModelRenderer(this, 17, 12); - outside7.addBox(-3F, -1F, 0F, 6, 2, 1); - outside7.setRotationPoint(0F, 19F, 3F); - outside7.setTextureSize(256, 128); - setRotation(outside7, 0F, 0F, 0F); - outside8 = new ModelRenderer(this, 17, 12); - outside8.addBox(-3F, -1F, -1F, 6, 2, 1); - outside8.setRotationPoint(0F, 19F, -3F); - outside8.setTextureSize(256, 128); - setRotation(outside8, 0F, 0F, 0F); - } - - @Override - public void renderCrystal(PylonVariant variant) { - float f = 1F / 16F; - crystal1.render(f); - crystal2.render(f); - crystal3.render(f); - crystal4.render(f); - crystal5.render(f); - crystal6.render(f); - crystal7.render(f); - crystal8.render(f); - } - - @Override - public void renderRing(PylonVariant variant) { - float f = 1F / 16F; - outside1.render(f); - outside2.render(f); - outside3.render(f); - outside4.render(f); - outside5.render(f); - outside6.render(f); - outside7.render(f); - outside8.render(f); - } - - private void setRotation(ModelRenderer model, float x, float y, float z) { - model.rotateAngleX = x; - model.rotateAngleY = y; - model.rotateAngleZ = z; - } - - @Override - public void renderGems(PylonVariant variant) {} - -} \ No newline at end of file diff --git a/src/main/java/vazkii/botania/client/render/tile/RenderTilePylon.java b/src/main/java/vazkii/botania/client/render/tile/RenderTilePylon.java index d733b40c1..41f7b8478 100644 --- a/src/main/java/vazkii/botania/client/render/tile/RenderTilePylon.java +++ b/src/main/java/vazkii/botania/client/render/tile/RenderTilePylon.java @@ -25,10 +25,8 @@ import vazkii.botania.client.core.helper.ShaderHelper; import vazkii.botania.client.lib.LibResources; import vazkii.botania.client.model.IPylonModel; import vazkii.botania.client.model.ModelPylon; -import vazkii.botania.client.model.ModelPylonOld; import vazkii.botania.common.block.ModBlocks; import vazkii.botania.common.block.tile.TilePylon; -import vazkii.botania.common.core.handler.ConfigHandler; import javax.annotation.Nonnull; import java.util.Random; @@ -39,10 +37,11 @@ public class RenderTilePylon extends TileEntitySpecialRenderer { private static final ResourceLocation textureGreenOld = new ResourceLocation(LibResources.MODEL_PYLON_GREEN_OLD); private static final ResourceLocation texturePinkOld = new ResourceLocation(LibResources.MODEL_PYLON_PINK_OLD); - IPylonModel model; public static boolean green = false; public static boolean pink = false; + private IPylonModel model; + @Override public void render(@Nonnull TilePylon pylon, double d0, double d1, double d2, float pticks, int digProgress, float unused) { if(!pylon.getWorld().isBlockLoaded(pylon.getPos(), false) @@ -50,7 +49,7 @@ public class RenderTilePylon extends TileEntitySpecialRenderer { return; if(model == null) - model = ConfigHandler.oldPylonModel ? new ModelPylonOld() : new ModelPylon(); + model = new ModelPylon(); GlStateManager.pushMatrix(); GlStateManager.enableRescaleNormal(); @@ -65,31 +64,22 @@ public class RenderTilePylon extends TileEntitySpecialRenderer { pink = variant == PylonVariant.GAIA; } - if(ConfigHandler.oldPylonModel) - Minecraft.getMinecraft().renderEngine.bindTexture(pink ? texturePinkOld : green ? textureGreenOld : textureOld); - else Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE); + Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE); double worldTime = pylon.getWorld() == null ? 0 : (double) (ClientTickHandler.ticksInGame + pticks); if(pylon != null) worldTime += new Random(pylon.getPos().hashCode()).nextInt(360); - if(ConfigHandler.oldPylonModel) { - GlStateManager.translate(d0 + 0.5, d1 + 2.2, d2 + 0.5); - GlStateManager.scale(1F, -1.5F, -1F); - } else { - GlStateManager.translate(d0 + 0.2 + (green ? -0.1 : 0), d1 + 0.05, d2 + 0.8 + (green ? 0.1 : 0)); - float scale = green ? 0.8F : 0.6F; - GlStateManager.scale(scale, 0.6F, scale); - } + GlStateManager.translate(d0 + 0.2 + (green ? -0.1 : 0), d1 + 0.05, d2 + 0.8 + (green ? 0.1 : 0)); + float scale = green ? 0.8F : 0.6F; + GlStateManager.scale(scale, 0.6F, scale); if(!green) { GlStateManager.pushMatrix(); - if(!ConfigHandler.oldPylonModel) - GlStateManager.translate(0.5F, 0F, -0.5F); + GlStateManager.translate(0.5F, 0F, -0.5F); GlStateManager.rotate((float) worldTime * 1.5F, 0F, 1F, 0F); - if(!ConfigHandler.oldPylonModel) - GlStateManager.translate(-0.5F, 0F, 0.5F); + GlStateManager.translate(-0.5F, 0F, 0.5F); model.renderRing(variant); GlStateManager.translate(0D, Math.sin(worldTime / 20D) / 20 - 0.025, 0D); @@ -100,12 +90,10 @@ public class RenderTilePylon extends TileEntitySpecialRenderer { GlStateManager.pushMatrix(); GlStateManager.translate(0D, Math.sin(worldTime / 20D) / 17.5, 0D); - if(!ConfigHandler.oldPylonModel) - GlStateManager.translate(0.5F, 0F, -0.5F); + GlStateManager.translate(0.5F, 0F, -0.5F); GlStateManager.rotate((float) -worldTime, 0F, 1F, 0F); - if(!ConfigHandler.oldPylonModel) - GlStateManager.translate(-0.5F, 0F, 0.5F); + GlStateManager.translate(-0.5F, 0F, 0.5F); GlStateManager.disableCull(); @@ -117,15 +105,13 @@ public class RenderTilePylon extends TileEntitySpecialRenderer { int lightmapX = light % 65536; int lightmapY = light / 65536; OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, lightmapX, lightmapY); - float alpha = (float) ((Math.sin(worldTime / 20D) / 2D + 0.5) / (ConfigHandler.oldPylonModel ? 1D : 2D)); + float alpha = (float) ((Math.sin(worldTime / 20D) / 2D + 0.5) / 2D); GlStateManager.color(1F, 1F, 1F, a * (alpha + 0.183F)); } GlStateManager.disableAlpha(); GlStateManager.scale(1.1F, 1.1F, 1.1F); - if(!ConfigHandler.oldPylonModel) - GlStateManager.translate(-0.05F, -0.1F, 0.05F); - else GlStateManager.translate(0F, -0.09F, 0F); + GlStateManager.translate(-0.05F, -0.1F, 0.05F); ShaderHelper.useShader(ShaderHelper.pylonGlow); model.renderCrystal(variant); diff --git a/src/main/java/vazkii/botania/common/core/handler/ConfigHandler.java b/src/main/java/vazkii/botania/common/core/handler/ConfigHandler.java index 272d8179c..729a8de45 100644 --- a/src/main/java/vazkii/botania/common/core/handler/ConfigHandler.java +++ b/src/main/java/vazkii/botania/common/core/handler/ConfigHandler.java @@ -45,7 +45,6 @@ public final class ConfigHandler { public static boolean staticWandBeam = false; public static boolean boundBlockWireframe = true; public static boolean lexicon3dModel = true; - public static boolean oldPylonModel = false; public static double flowerParticleFrequency = 0.75F; public static boolean blockBreakParticles = true; public static boolean blockBreakParticlesTool = true; @@ -130,9 +129,6 @@ public final class ConfigHandler { desc = "Set this to false to disable the animated 3D render for the Lexica Botania."; lexicon3dModel = loadPropBool("lexicon.render.3D", desc, lexicon3dModel); - desc = "Set this to true to use the old (non-.obj, pre beta18) pylon model"; - oldPylonModel = loadPropBool("pylonModel.old", desc, oldPylonModel); - desc = "The frequency in which particles spawn from normal (worldgen) mystical flowers"; flowerParticleFrequency = loadPropDouble("flowerParticles.frequency", desc, flowerParticleFrequency); diff --git a/src/main/resources/assets/botania/textures/model/pylonold.png b/src/main/resources/assets/botania/textures/model/unused/pylonold.png similarity index 100% rename from src/main/resources/assets/botania/textures/model/pylonold.png rename to src/main/resources/assets/botania/textures/model/unused/pylonold.png diff --git a/src/main/resources/assets/botania/textures/model/pylonold1.png b/src/main/resources/assets/botania/textures/model/unused/pylonold1.png similarity index 100% rename from src/main/resources/assets/botania/textures/model/pylonold1.png rename to src/main/resources/assets/botania/textures/model/unused/pylonold1.png diff --git a/src/main/resources/assets/botania/textures/model/pylonold2.png b/src/main/resources/assets/botania/textures/model/unused/pylonold2.png similarity index 100% rename from src/main/resources/assets/botania/textures/model/pylonold2.png rename to src/main/resources/assets/botania/textures/model/unused/pylonold2.png