mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-16 10:34:40 +00:00
Remove ancient pylon model
This commit is contained in:
1 parent
4a0416a557
commit
e2c7a8ec4b
6 files changed
+13
-188
No files matched your search
@@ -1,157 +0,0 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. 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) {}
|
||||
|
||||
}
|
||||
@@ -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<TilePylon> {
|
||||
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<TilePylon> {
|
||||
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<TilePylon> {
|
||||
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<TilePylon> {
|
||||
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<TilePylon> {
|
||||
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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
File renamed without changes.
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
File renamed without changes.
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
File renamed without changes.
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
Reference in new issue
Block a user