From 04514282c08ebefdb3e68a46db34092f72be2316 Mon Sep 17 00:00:00 2001 From: miozune Date: Wed, 17 May 2023 00:01:01 +0900 Subject: Remove a lot of unused classes (#629) --- .../gtPlusPlus/core/client/model/ModelEggBox.java | 68 --------------- .../core/client/model/tabula/ModelTabulaBase.java | 36 -------- .../core/client/renderer/RenderPotionthrow.java | 98 ---------------------- .../client/renderer/tabula/RenderTabulaBase.java | 50 ----------- 4 files changed, 252 deletions(-) delete mode 100644 src/main/java/gtPlusPlus/core/client/model/ModelEggBox.java delete mode 100644 src/main/java/gtPlusPlus/core/client/model/tabula/ModelTabulaBase.java delete mode 100644 src/main/java/gtPlusPlus/core/client/renderer/RenderPotionthrow.java delete mode 100644 src/main/java/gtPlusPlus/core/client/renderer/tabula/RenderTabulaBase.java (limited to 'src/main/java/gtPlusPlus/core/client') diff --git a/src/main/java/gtPlusPlus/core/client/model/ModelEggBox.java b/src/main/java/gtPlusPlus/core/client/model/ModelEggBox.java deleted file mode 100644 index 49a0878678..0000000000 --- a/src/main/java/gtPlusPlus/core/client/model/ModelEggBox.java +++ /dev/null @@ -1,68 +0,0 @@ -package gtPlusPlus.core.client.model; - -import net.minecraft.client.model.ModelRenderer; -import net.minecraft.entity.Entity; - -import gtPlusPlus.api.objects.data.AutoMap; -import gtPlusPlus.api.objects.data.Pair; -import gtPlusPlus.core.client.model.tabula.ModelTabulaBase; -import gtPlusPlus.core.client.renderer.tabula.RenderTabulaBase; -import gtPlusPlus.core.tileentities.general.TileEntityEggBox; - -/** - * ModelEggBox - Alkalus Created using Tabula 4.1.1 - */ -public class ModelEggBox extends ModelTabulaBase { - - private final AutoMap> mParts = new AutoMap>(); - - private static RenderTabulaBase mRendererInstance; - - public ModelRenderer bottom; - // EggBox_full.png - - public ModelEggBox() { - super(64, 64); - this.textureWidth = 64; - this.textureHeight = 64; - - this.bottom = new ModelRenderer(this, 0, 19); - this.bottom.setRotationPoint(1.0F, 6.0F, 1.0F); - this.bottom.addBox(0.0F, 0.0F, 0.0F, 14, 10, 14, 0.0F); - mParts.add(new Pair(bottom, 0f)); - } - - @Override - public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { - // Logger.INFO("Rendering EggBox"); - this.bottom.render(f5); - } - - /** - * This is a helper function from Tabula to set the rotation of model parts - */ - @Override - public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z) { - modelRenderer.rotateAngleX = x; - modelRenderer.rotateAngleY = y; - modelRenderer.rotateAngleZ = z; - } - - @Override - protected AutoMap> getModelParts() { - AutoMap> aParts = new AutoMap>(); - aParts.add(new Pair(bottom, 0.0625F)); - return aParts; - // return mParts; - } - - public static RenderTabulaBase getRenderer() { - if (mRendererInstance == null) { - mRendererInstance = new RenderTabulaBase( - new ModelEggBox(), - "textures/blocks/TileEntities/EggBox_full.png", - TileEntityEggBox.class); - } - return mRendererInstance; - } -} diff --git a/src/main/java/gtPlusPlus/core/client/model/tabula/ModelTabulaBase.java b/src/main/java/gtPlusPlus/core/client/model/tabula/ModelTabulaBase.java deleted file mode 100644 index 3c13c83391..0000000000 --- a/src/main/java/gtPlusPlus/core/client/model/tabula/ModelTabulaBase.java +++ /dev/null @@ -1,36 +0,0 @@ -package gtPlusPlus.core.client.model.tabula; - -import net.minecraft.client.model.ModelBase; -import net.minecraft.client.model.ModelRenderer; - -import gtPlusPlus.api.objects.data.AutoMap; -import gtPlusPlus.api.objects.data.Pair; - -/** - * ModelEggBox - Alkalus Created using Tabula 4.1.1 - */ -public abstract class ModelTabulaBase extends ModelBase { - - public ModelTabulaBase(int aTexWidth, int aTexHeight) { - this.textureWidth = aTexWidth; - this.textureHeight = aTexHeight; - } - - protected abstract AutoMap> getModelParts(); - - public void renderAll() { - for (Pair part : getModelParts()) { - // Logger.INFO("Rendering EggBox"); - part.getKey().render(part.getValue()); - } - } - - /** - * This is a helper function from Tabula to set the rotation of model parts - */ - public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z) { - modelRenderer.rotateAngleX = x; - modelRenderer.rotateAngleY = y; - modelRenderer.rotateAngleZ = z; - } -} diff --git a/src/main/java/gtPlusPlus/core/client/renderer/RenderPotionthrow.java b/src/main/java/gtPlusPlus/core/client/renderer/RenderPotionthrow.java deleted file mode 100644 index 0f962df641..0000000000 --- a/src/main/java/gtPlusPlus/core/client/renderer/RenderPotionthrow.java +++ /dev/null @@ -1,98 +0,0 @@ -package gtPlusPlus.core.client.renderer; - -import net.minecraft.client.renderer.Tessellator; -import net.minecraft.client.renderer.entity.Render; -import net.minecraft.client.renderer.texture.TextureMap; -import net.minecraft.entity.Entity; -import net.minecraft.entity.projectile.EntityPotion; -import net.minecraft.item.Item; -import net.minecraft.item.ItemPotion; -import net.minecraft.potion.PotionHelper; -import net.minecraft.util.IIcon; -import net.minecraft.util.ResourceLocation; - -import org.lwjgl.opengl.GL11; -import org.lwjgl.opengl.GL12; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -@SideOnly(Side.CLIENT) -public class RenderPotionthrow extends Render { - - private Item mRenderItem; - private int mDamage; - - public RenderPotionthrow(Item p_i1259_1_, int p_i1259_2_) { - this.mRenderItem = p_i1259_1_; - this.mDamage = p_i1259_2_; - } - - public RenderPotionthrow(Item p_i1260_1_) { - this(p_i1260_1_, 0); - } - - /** - * Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then - * handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic - * (Render> 16 & 255) / 255.0F; - float f3 = (i >> 8 & 255) / 255.0F; - float f4 = (i & 255) / 255.0F; - GL11.glColor3f(f2, f3, f4); - GL11.glPushMatrix(); - this.func_77026_a(tessellator, ItemPotion.func_94589_d("overlay")); - GL11.glPopMatrix(); - GL11.glColor3f(1.0F, 1.0F, 1.0F); - } - - this.func_77026_a(tessellator, iicon); - GL11.glDisable(GL12.GL_RESCALE_NORMAL); - GL11.glPopMatrix(); - } - } - - /** - * Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture. - */ - @Override - protected ResourceLocation getEntityTexture(Entity p_110775_1_) { - return TextureMap.locationItemsTexture; - } - - private void func_77026_a(Tessellator p_77026_1_, IIcon p_77026_2_) { - float f = p_77026_2_.getMinU(); - float f1 = p_77026_2_.getMaxU(); - float f2 = p_77026_2_.getMinV(); - float f3 = p_77026_2_.getMaxV(); - float f4 = 1.0F; - float f5 = 0.5F; - float f6 = 0.25F; - GL11.glRotatef(180.0F - this.renderManager.playerViewY, 0.0F, 1.0F, 0.0F); - GL11.glRotatef(-this.renderManager.playerViewX, 1.0F, 0.0F, 0.0F); - p_77026_1_.startDrawingQuads(); - p_77026_1_.setNormal(0.0F, 1.0F, 0.0F); - p_77026_1_.addVertexWithUV(0.0F - f5, 0.0F - f6, 0.0D, f, f3); - p_77026_1_.addVertexWithUV(f4 - f5, 0.0F - f6, 0.0D, f1, f3); - p_77026_1_.addVertexWithUV(f4 - f5, f4 - f6, 0.0D, f1, f2); - p_77026_1_.addVertexWithUV(0.0F - f5, f4 - f6, 0.0D, f, f2); - p_77026_1_.draw(); - } -} diff --git a/src/main/java/gtPlusPlus/core/client/renderer/tabula/RenderTabulaBase.java b/src/main/java/gtPlusPlus/core/client/renderer/tabula/RenderTabulaBase.java deleted file mode 100644 index ed3808e815..0000000000 --- a/src/main/java/gtPlusPlus/core/client/renderer/tabula/RenderTabulaBase.java +++ /dev/null @@ -1,50 +0,0 @@ -package gtPlusPlus.core.client.renderer.tabula; - -import static gregtech.api.enums.Mods.GTPlusPlus; - -import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ResourceLocation; - -import cpw.mods.fml.client.registry.RenderingRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gtPlusPlus.core.client.model.tabula.ModelTabulaBase; - -@SideOnly(Side.CLIENT) -public class RenderTabulaBase extends TileEntitySpecialRenderer { - - private final ModelTabulaBase mModel; - private final ResourceLocation mTexture; - private final Class mTileClass; - - public final int mRenderID; - public final RenderTabulaBase mInstance; - - public RenderTabulaBase(ModelTabulaBase aModel, String aTexturePath, Class aTileClass) { - mModel = aModel; - mTexture = new ResourceLocation(GTPlusPlus.ID, aTexturePath); - mTileClass = aTileClass; - this.mRenderID = RenderingRegistry.getNextAvailableRenderId(); - mInstance = this; - } - - public void renderTileEntityAt(Object aTile, double p_147500_2_, double p_147500_4_, double p_147500_6_, - float p_147500_8_) { - if (mTileClass.isInstance(aTile)) { - // Logger.INFO("Rendering EggBox"); - this.bindTexture(mTexture); - mModel.renderAll(); - } - } - - @Override - public void renderTileEntityAt(TileEntity aTile, double p_147500_2_, double p_147500_4_, double p_147500_6_, - float p_147500_8_) { - if (mTileClass != null && aTile != null) { - if (mTileClass.isInstance(aTile)) { - this.renderTileEntityAt((Object) aTile, p_147500_2_, p_147500_4_, p_147500_6_, p_147500_8_); - } - } - } -} -- cgit