From 5cb0e1ef3a540e4d5dfcefaeae4a493ef05bc694 Mon Sep 17 00:00:00 2001 From: Lizbeth Rika Date: Fri, 26 Sep 2014 22:14:14 +0100 Subject: [PATCH] Pass the brush~ --- .../core/handler/TiaraWingRenderHandler.java | 23 +++++++++---------- .../botania/client/lib/LibResources.java | 2 +- .../client/render/entity/RenderSpark.java | 2 +- .../render/tile/RenderTileAlfPortal.java | 2 +- .../render/tile/RenderTileEnchanter.java | 4 ++-- .../client/render/tile/RenderTilePool.java | 2 +- .../render/tile/RenderTileRuneAltar.java | 2 +- .../render/tile/RenderTileSpreader.java | 2 +- .../render/tile/RenderTileTinyPotato.java | 2 +- .../crafting/ModManaInfusionRecipes.java | 4 ++-- .../thaumcraft/ItemManaInkwell.java | 10 ++++---- .../botania/common/lexicon/LexiconData.java | 2 +- 12 files changed, 28 insertions(+), 29 deletions(-) diff --git a/MODSRC/vazkii/botania/client/core/handler/TiaraWingRenderHandler.java b/MODSRC/vazkii/botania/client/core/handler/TiaraWingRenderHandler.java index 1c9b1f19f..443ca77ef 100644 --- a/MODSRC/vazkii/botania/client/core/handler/TiaraWingRenderHandler.java +++ b/MODSRC/vazkii/botania/client/core/handler/TiaraWingRenderHandler.java @@ -29,12 +29,11 @@ import vazkii.botania.common.item.equipment.bauble.ItemFlightTiara; import baubles.common.container.InventoryBaubles; import baubles.common.lib.PlayerHandler; import cpw.mods.fml.common.eventhandler.SubscribeEvent; -import cpw.mods.fml.common.gameevent.TickEvent; public final class TiaraWingRenderHandler { - + private static ResourceLocation textureHalo = new ResourceLocation(LibResources.MISC_HALO); - + @SubscribeEvent public void onPlayerRender(RenderPlayerEvent.Specials.Post event) { InventoryBaubles inv = PlayerHandler.getPlayerBaubles(event.entityPlayer); @@ -139,36 +138,36 @@ public final class TiaraWingRenderHandler { GL11.glColor3f(1F, 1F, 1F); GL11.glPopMatrix(); - + // Jibril's Halo - if(meta == 1) + if(meta == 1) renderHalo(event.entityPlayer, event.partialRenderTick); } } } - + private void renderHalo(EntityPlayer player, float partialTicks) { float yaw = player.prevRotationYawHead + (player.rotationYawHead - player.prevRotationYawHead) * partialTicks; float yawOffset = player.prevRenderYawOffset + (player.renderYawOffset - player.prevRenderYawOffset) * partialTicks; float pitch = player.prevRotationPitch + (player.rotationPitch - player.prevRotationPitch) * partialTicks; - + GL11.glPushMatrix(); GL11.glRotatef(yawOffset, 0, -1, 0); GL11.glRotatef(yaw - 270, 0, 1, 0); - GL11.glRotatef(pitch, 0, 0, 1); + GL11.glRotatef(pitch, 0, 0, 1); GL11.glShadeModel(GL11.GL_SMOOTH); OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, 240, 240); GL11.glDisable(GL11.GL_LIGHTING); GL11.glColor4f(1F, 1F, 1F, 1F); - + Minecraft.getMinecraft().renderEngine.bindTexture(textureHalo); - + GL11.glTranslated(0, -player.getDefaultEyeHeight() + (player.isSneaking() ? 0.0625 : 0), 0); GL11.glRotated(30, 1, 0, -1); GL11.glTranslatef(-0.1F, -0.5F, -0.1F); GL11.glRotatef(player.ticksExisted + partialTicks, 0, 1, 0); - + Tessellator tes = Tessellator.instance; ShaderHelper.useShader(ShaderHelper.halo); tes.startDrawingQuads(); @@ -178,7 +177,7 @@ public final class TiaraWingRenderHandler { tes.addVertexWithUV(0.75, 0, -0.75, 1, 0); tes.draw(); ShaderHelper.releaseShader(); - + GL11.glEnable(GL11.GL_LIGHTING); GL11.glShadeModel(GL11.GL_FLAT); GL11.glPopMatrix(); diff --git a/MODSRC/vazkii/botania/client/lib/LibResources.java b/MODSRC/vazkii/botania/client/lib/LibResources.java index 6e1a36d0e..a0d072f8d 100644 --- a/MODSRC/vazkii/botania/client/lib/LibResources.java +++ b/MODSRC/vazkii/botania/client/lib/LibResources.java @@ -90,7 +90,7 @@ public final class LibResources { public static final String MODEL_SPAWNER_CLAW = PREFIX_MODEL + "spawnerClaw.png"; public static final String MODEL_CAPE = "/assets/botania/textures/model/cape.png"; - + public static final String MISC_PARTICLES = PREFIX_MISC + "particles.png"; public static final String MISC_WISP_LARGE = PREFIX_MISC + "wispLarge.png"; public static final String MISC_WISP_SMALL = PREFIX_MISC + "wispSmall.png"; diff --git a/MODSRC/vazkii/botania/client/render/entity/RenderSpark.java b/MODSRC/vazkii/botania/client/render/entity/RenderSpark.java index 302df3e53..cb4fabfb8 100644 --- a/MODSRC/vazkii/botania/client/render/entity/RenderSpark.java +++ b/MODSRC/vazkii/botania/client/render/entity/RenderSpark.java @@ -46,7 +46,7 @@ public class RenderSpark extends RenderEntity { time += new Random(par1Entity.getEntityId()).nextInt(); GL11.glColor4f(1F, 1F, 1F, 0.7F + 0.3F * (float) (Math.sin(time / 5.0) + 0.5) * 2); - float scale = 0.75F + 0.1F * (float) Math.sin((double) time / 10); + float scale = 0.75F + 0.1F * (float) Math.sin(time / 10); GL11.glScalef(scale, scale, scale); bindEntityTexture(par1Entity); Tessellator tessellator = Tessellator.instance; diff --git a/MODSRC/vazkii/botania/client/render/tile/RenderTileAlfPortal.java b/MODSRC/vazkii/botania/client/render/tile/RenderTileAlfPortal.java index 70ea69294..2f364e7c9 100644 --- a/MODSRC/vazkii/botania/client/render/tile/RenderTileAlfPortal.java +++ b/MODSRC/vazkii/botania/client/render/tile/RenderTileAlfPortal.java @@ -42,7 +42,7 @@ public class RenderTileAlfPortal extends TileEntitySpecialRenderer { GL11.glColor4f(1F, 1F, 1F, 1F); GL11.glDisable(GL11.GL_ALPHA_TEST); GL11.glEnable(GL11.GL_CULL_FACE); - float alpha = (float) Math.min(1F, (Math.sin((double) (ClientTickHandler.ticksInGame + f) / 8D) + 1D) / 7D + 0.6D) * (Math.min(60, portal.ticksOpen) / 60F); + float alpha = (float) Math.min(1F, (Math.sin((ClientTickHandler.ticksInGame + f) / 8D) + 1D) / 7D + 0.6D) * (Math.min(60, portal.ticksOpen) / 60F); GL11.glColor4f(1F, 1F, 1F, alpha); Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.locationBlocksTexture); diff --git a/MODSRC/vazkii/botania/client/render/tile/RenderTileEnchanter.java b/MODSRC/vazkii/botania/client/render/tile/RenderTileEnchanter.java index da35900fb..f23c2930b 100644 --- a/MODSRC/vazkii/botania/client/render/tile/RenderTileEnchanter.java +++ b/MODSRC/vazkii/botania/client/render/tile/RenderTileEnchanter.java @@ -70,7 +70,7 @@ public class RenderTileEnchanter extends TileEntitySpecialRenderer { GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); GL11.glColor4f(1F, 1F, 1F, 1F); GL11.glDisable(GL11.GL_ALPHA_TEST); - float alpha = (float) ((Math.sin((double) (ClientTickHandler.ticksInGame + f) / 8D) + 1D) / 5D + 0.4D) * alphaMod; + float alpha = (float) ((Math.sin((ClientTickHandler.ticksInGame + f) / 8D) + 1D) / 5D + 0.4D) * alphaMod; if(ShaderHelper.useShaders()) GL11.glColor4f(1F, 1F, 1F, alpha); else { @@ -78,7 +78,7 @@ public class RenderTileEnchanter extends TileEntitySpecialRenderer { int lightmapX = light % 65536; int lightmapY = light / 65536; OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, lightmapX, lightmapY); - GL11.glColor4f(0.6F + (float) ((Math.cos((double) (ClientTickHandler.ticksInGame + f) / 6D) + 1D) / 5D), 0.1F, 0.9F, alpha); + GL11.glColor4f(0.6F + (float) ((Math.cos((ClientTickHandler.ticksInGame + f) / 6D) + 1D) / 5D), 0.1F, 0.9F, alpha); } Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.locationBlocksTexture); diff --git a/MODSRC/vazkii/botania/client/render/tile/RenderTilePool.java b/MODSRC/vazkii/botania/client/render/tile/RenderTilePool.java index 24d931768..38a7ef6e0 100644 --- a/MODSRC/vazkii/botania/client/render/tile/RenderTilePool.java +++ b/MODSRC/vazkii/botania/client/render/tile/RenderTilePool.java @@ -87,7 +87,7 @@ public class RenderTilePool extends TileEntitySpecialRenderer { GL11.glEnable(GL11.GL_BLEND); GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); GL11.glDisable(GL11.GL_ALPHA_TEST); - GL11.glColor4f(1F, 1F, 1F, (float) ((Math.sin((double) (ClientTickHandler.ticksInGame + f) / 20.0) + 1) * 0.3 + 0.2)); + GL11.glColor4f(1F, 1F, 1F, (float) ((Math.sin((ClientTickHandler.ticksInGame + f) / 20.0) + 1) * 0.3 + 0.2)); GL11.glTranslatef(-0.5F, -1F - 0.43F, -0.5F); GL11.glRotatef(90F, 1F, 0F, 0F); GL11.glScalef(s, s, s); diff --git a/MODSRC/vazkii/botania/client/render/tile/RenderTileRuneAltar.java b/MODSRC/vazkii/botania/client/render/tile/RenderTileRuneAltar.java index 86e402816..3a776e7d9 100644 --- a/MODSRC/vazkii/botania/client/render/tile/RenderTileRuneAltar.java +++ b/MODSRC/vazkii/botania/client/render/tile/RenderTileRuneAltar.java @@ -60,7 +60,7 @@ public class RenderTileRuneAltar extends TileEntitySpecialRenderer { angles[i] = totalAngle += anglePer; double time = ClientTickHandler.ticksInGame + partticks; - + for(int i = 0; i < altar.getSizeInventory(); i++) { GL11.glPushMatrix(); GL11.glScalef(0.5F, 0.5F, 0.5F); diff --git a/MODSRC/vazkii/botania/client/render/tile/RenderTileSpreader.java b/MODSRC/vazkii/botania/client/render/tile/RenderTileSpreader.java index 2d789a19e..745689d87 100644 --- a/MODSRC/vazkii/botania/client/render/tile/RenderTileSpreader.java +++ b/MODSRC/vazkii/botania/client/render/tile/RenderTileSpreader.java @@ -57,7 +57,7 @@ public class RenderTileSpreader extends TileEntitySpecialRenderer { GL11.glScalef(1F, -1F, -1F); double time = ClientTickHandler.ticksInGame + f; - + if(spreader.isULTRA_SPREADER()) { Color color = Color.getHSBColor((float) ((time * 5 + new Random(spreader.xCoord ^ spreader.yCoord ^ spreader.zCoord).nextInt(10000)) % 360) / 360F, 0.4F, 0.9F); GL11.glColor3f(color.getRed() / 255F, color.getGreen() / 255F, color.getBlue() / 255F); diff --git a/MODSRC/vazkii/botania/client/render/tile/RenderTileTinyPotato.java b/MODSRC/vazkii/botania/client/render/tile/RenderTileTinyPotato.java index 779ede41a..34360422a 100644 --- a/MODSRC/vazkii/botania/client/render/tile/RenderTileTinyPotato.java +++ b/MODSRC/vazkii/botania/client/render/tile/RenderTileTinyPotato.java @@ -46,7 +46,7 @@ public class RenderTileTinyPotato extends TileEntitySpecialRenderer { float jump = potato.jumpTicks; if(jump > 0) jump += var8; - + float up = (float) -Math.abs(Math.sin(jump / 10 * Math.PI)) * 0.2F; float rot = (float) Math.sin(jump / 10 * Math.PI) * 2; diff --git a/MODSRC/vazkii/botania/common/crafting/ModManaInfusionRecipes.java b/MODSRC/vazkii/botania/common/crafting/ModManaInfusionRecipes.java index 3e7c5f25d..805574620 100644 --- a/MODSRC/vazkii/botania/common/crafting/ModManaInfusionRecipes.java +++ b/MODSRC/vazkii/botania/common/crafting/ModManaInfusionRecipes.java @@ -66,12 +66,12 @@ public final class ModManaInfusionRecipes { manaQuartzRecipe = BotaniaAPI.registerManaInfusionRecipe(new ItemStack(ModItems.quartz, 1, 1), new ItemStack(Items.quartz), 250); tinyPotatoRecipe = BotaniaAPI.registerManaInfusionRecipe(new ItemStack(ModBlocks.tinyPotato), new ItemStack(Items.potato), 1337); - + if(Botania.thaumcraftLoaded) { Item inkwell = (Item) Item.itemRegistry.getObject("Thaumcraft:ItemInkwell"); manaInkwellRecipe = BotaniaAPI.registerManaInfusionRecipe(new ItemStack(ModItems.manaInkwell), new ItemStack(inkwell), 35000); } - + BotaniaAPI.registerManaInfusionRecipe(new ItemStack(ModItems.manaBottle), new ItemStack(Items.glass_bottle), 5000); } diff --git a/MODSRC/vazkii/botania/common/item/interaction/thaumcraft/ItemManaInkwell.java b/MODSRC/vazkii/botania/common/item/interaction/thaumcraft/ItemManaInkwell.java index b75a7016f..5ddf93b18 100644 --- a/MODSRC/vazkii/botania/common/item/interaction/thaumcraft/ItemManaInkwell.java +++ b/MODSRC/vazkii/botania/common/item/interaction/thaumcraft/ItemManaInkwell.java @@ -13,7 +13,6 @@ package vazkii.botania.common.item.interaction.thaumcraft; import java.util.List; -import cpw.mods.fml.common.Optional; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; @@ -24,6 +23,7 @@ import vazkii.botania.api.mana.IManaItem; import vazkii.botania.common.core.helper.ItemNBTHelper; import vazkii.botania.common.item.ItemMod; import vazkii.botania.common.lib.LibItemNames; +import cpw.mods.fml.common.Optional; @Optional.Interface(modid = "Thaumcraft", iface = "thaumcraft.api.IScribeTools") public class ItemManaInkwell extends ItemMod implements IManaItem, IScribeTools { @@ -40,13 +40,13 @@ public class ItemManaInkwell extends ItemMod implements IManaItem, IScribeTools setMaxStackSize(1); setNoRepair(); } - + @Override public void getSubItems(Item item, CreativeTabs tab, List list) { list.add(new ItemStack(item, 1, USES)); list.add(new ItemStack(item)); } - + @Override public int getDamage(ItemStack stack) { float mana = getMana(stack); @@ -66,7 +66,7 @@ public class ItemManaInkwell extends ItemMod implements IManaItem, IScribeTools } super.setDamage(stack, damage); } - + @Override public int getDisplayDamage(ItemStack stack) { return getDamage(stack); @@ -121,5 +121,5 @@ public class ItemManaInkwell extends ItemMod implements IManaItem, IScribeTools public boolean isNoExport(ItemStack stack) { return true; } - + } diff --git a/MODSRC/vazkii/botania/common/lexicon/LexiconData.java b/MODSRC/vazkii/botania/common/lexicon/LexiconData.java index 8599dcd0f..b87b9cc10 100644 --- a/MODSRC/vazkii/botania/common/lexicon/LexiconData.java +++ b/MODSRC/vazkii/botania/common/lexicon/LexiconData.java @@ -641,7 +641,7 @@ public final class LexiconData { starfield = new ALexiconEntry(LibLexicon.MISC_STARFIELD, categoryMisc); starfield.setLexiconPages(new PageText("0"), new PageCraftingRecipe("1", ModCrafingRecipes.recipeStarfield)); - + if(Botania.thaumcraftLoaded) { tcIntegration = new BLexiconEntry(LibLexicon.MISC_TC_INTEGRATION, categoryMisc); tcIntegration.setLexiconPages(new PageText("0"), new PageText("1"), new PageCraftingRecipe("2", ModCrafingRecipes.recipeHelmetOfRevealing), new PageText("3"), new PageManaInfusionRecipe("4", ModManaInfusionRecipes.manaInkwellRecipe), new PageText("5"));