mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-17 19:05:16 +00:00
Fixed the Thorn Chakram not rendering. Removed some TODOs.
This commit is contained in:
1 parent
a87912c727
commit
f6653b40be
3 files changed
+14
-56
No files matched your search
@@ -60,12 +60,7 @@ public final class ContributorFancinessHandler implements LayerRenderer<EntityPl
|
||||
GlStateManager.rotate(yaw - 270, 0, 1, 0);
|
||||
GlStateManager.rotate(pitch, 0, 0, 1);
|
||||
|
||||
if(name.equals("Vazkii") || name.equals("_phi")) {
|
||||
// TODO: change this to something cooler sometime
|
||||
// if(phi)
|
||||
// renderPhiFlower(player);
|
||||
// else renderTwintails(player, partialTicks);
|
||||
} else if(name.equals("haighyorkie"))
|
||||
if(name.equals("haighyorkie"))
|
||||
renderGoldfish(player);
|
||||
|
||||
firstStart();
|
||||
|
||||
@@ -564,7 +564,6 @@ public class GuiLexicon extends GuiScreen {
|
||||
|
||||
public static void startTutorial() {
|
||||
tutorial.clear();
|
||||
// TODO verify tutorial after changes
|
||||
|
||||
tutorial.add(LexiconData.lexicon);
|
||||
tutorial.add(LexiconData.flowers);
|
||||
|
||||
@@ -10,69 +10,33 @@
|
||||
*/
|
||||
package vazkii.botania.client.render.entity;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.entity.Render;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
import net.minecraft.client.renderer.entity.RenderSnowball;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.client.renderer.texture.TextureMap;
|
||||
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import vazkii.botania.common.entity.EntityThornChakram;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import vazkii.botania.common.item.ModItems;
|
||||
|
||||
// Basically a bit of an extension of RenderSnowball
|
||||
public class RenderThornChakram extends Render<EntityThornChakram> {
|
||||
public class RenderThornChakram extends RenderSnowball<EntityThornChakram> {
|
||||
|
||||
public RenderThornChakram(RenderManager renderManager) {
|
||||
super(renderManager);
|
||||
super(renderManager, ModItems.thornChakram, Minecraft.getMinecraft().getRenderItem());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void doRender(@Nonnull EntityThornChakram c, double x, double y, double z, float entityYaw, float partialTicks) {
|
||||
boolean fire = c.isFire();
|
||||
TextureAtlasSprite iicon = null;//ModItems.thornChakram.getIconFromDamage(fire ? 1 : 0); TODO does this work?
|
||||
|
||||
if(iicon != null) {
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.translate((float)x, (float)y, (float)z);
|
||||
GlStateManager.enableRescaleNormal();
|
||||
GlStateManager.scale(0.5F, 0.5F, 0.5F);
|
||||
bindEntityTexture(c);
|
||||
Tessellator tessellator = Tessellator.getInstance();
|
||||
|
||||
func_77026_a(tessellator, iicon, fire ? 240 : -1);
|
||||
GlStateManager.disableRescaleNormal();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
public ItemStack getStackToRender(EntityThornChakram entityIn) {
|
||||
return new ItemStack(ModItems.thornChakram, 1, entityIn.isFire() ? 1 : 0);
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
protected ResourceLocation getEntityTexture(@Nonnull EntityThornChakram p_110775_1_) {
|
||||
return TextureMap.LOCATION_BLOCKS_TEXTURE;
|
||||
}
|
||||
|
||||
private void func_77026_a(Tessellator p_77026_1_, TextureAtlasSprite p_77026_2_, int light) {
|
||||
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;
|
||||
GlStateManager.rotate(180.0F - renderManager.playerViewY, 0.0F, 1.0F, 0.0F);
|
||||
GlStateManager.rotate(-renderManager.playerViewX, 1.0F, 0.0F, 0.0F);
|
||||
p_77026_1_.getBuffer().begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION_TEX_NORMAL);
|
||||
if(light != -1)
|
||||
//p_77026_1_.getBuffer().setBrightness(light);
|
||||
p_77026_1_.getBuffer().pos(0.0F - f5, 0.0F - f6, 0.0D).tex(f, f3).normal(0.0F, 1.0F, 0.0F).endVertex();
|
||||
p_77026_1_.getBuffer().pos(f4 - f5, 0.0F - f6, 0.0D).tex(f1, f3).normal(0.0F, 1.0F, 0.0F).endVertex();
|
||||
p_77026_1_.getBuffer().pos(f4 - f5, f4 - f6, 0.0D).tex(f1, f2).normal(0.0F, 1.0F, 0.0F).endVertex();
|
||||
p_77026_1_.getBuffer().pos(0.0F - f5, f4 - f6, 0.0D).tex(f, f2).normal(0.0F, 1.0F, 0.0F).endVertex();
|
||||
p_77026_1_.draw();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user