From 57ac50a364f85b8fc60d7fe7c647d926cce96c4d Mon Sep 17 00:00:00 2001 From: Vasco Lavos Date: Fri, 4 Dec 2015 23:56:56 +0000 Subject: [PATCH] Added the Fabulous Mana Pool. Yes that is its name. --- .../client/render/tile/RenderTilePool.java | 22 +++++++++++++++---- .../botania/common/block/mana/BlockPool.java | 5 +++-- .../common/crafting/ModCraftingRecipes.java | 7 ++++++ .../botania/common/lexicon/LexiconData.java | 2 +- .../resources/assets/botania/lang/en_US.lang | 2 ++ 5 files changed, 31 insertions(+), 7 deletions(-) diff --git a/src/main/java/vazkii/botania/client/render/tile/RenderTilePool.java b/src/main/java/vazkii/botania/client/render/tile/RenderTilePool.java index 5aca76994..3813b0db3 100644 --- a/src/main/java/vazkii/botania/client/render/tile/RenderTilePool.java +++ b/src/main/java/vazkii/botania/client/render/tile/RenderTilePool.java @@ -10,6 +10,9 @@ */ package vazkii.botania.client.render.tile; +import java.awt.Color; +import java.util.Random; + import net.minecraft.block.Block; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.Tessellator; @@ -59,14 +62,25 @@ public class RenderTilePool extends TileEntitySpecialRenderer { GL11.glTranslated(d0, d1, d2); boolean inf = tileentity.getWorldObj() == null ? forceMeta == 1 : tileentity.getBlockMetadata() == 1; boolean dil = tileentity.getWorldObj() == null ? forceMeta == 2 : tileentity.getBlockMetadata() == 2; - + boolean fab = tileentity.getWorldObj() == null ? forceMeta == 3 : tileentity.getBlockMetadata() == 3; + Minecraft.getMinecraft().renderEngine.bindTexture(inf ? textureInf : dil ? textureDil : texture); GL11.glTranslatef(0.5F, 1.5F, 0.5F); GL11.glScalef(1F, -1F, -1F); - int color = pool.color; - float[] acolor = EntitySheep.fleeceColorTable[color]; - GL11.glColor4f(acolor[0], acolor[1], acolor[2], a); + if(fab) { + float time = ClientTickHandler.ticksInGame + ClientTickHandler.partialTicks; + if(tileentity != null) + time += new Random(tileentity.xCoord ^ tileentity.yCoord ^ tileentity.zCoord).nextInt(100000); + + Color color = Color.getHSBColor(time * 0.005F, 0.6F, 1F); + GL11.glColor4ub((byte) color.getRed(), (byte) color.getGreen(), (byte) color.getBlue(), (byte) 255); + } else { + int color = pool.color; + float[] acolor = EntitySheep.fleeceColorTable[color]; + GL11.glColor4f(acolor[0], acolor[1], acolor[2], a); + } + model.render(); GL11.glColor4f(1F, 1F, 1F, a); GL11.glScalef(1F, -1F, -1F); diff --git a/src/main/java/vazkii/botania/common/block/mana/BlockPool.java b/src/main/java/vazkii/botania/common/block/mana/BlockPool.java index 41224dc46..8442d6dfa 100644 --- a/src/main/java/vazkii/botania/common/block/mana/BlockPool.java +++ b/src/main/java/vazkii/botania/common/block/mana/BlockPool.java @@ -106,8 +106,9 @@ public class BlockPool extends BlockModContainer implements IWandHUD, IWandable, @Override public void getSubBlocks(Item par1, CreativeTabs par2, List par3) { - par3.add(new ItemStack(par1, 1, 2)); par3.add(new ItemStack(par1, 1, 0)); + par3.add(new ItemStack(par1, 1, 2)); + par3.add(new ItemStack(par1, 1, 3)); par3.add(new ItemStack(par1, 1, 1)); } @@ -194,7 +195,7 @@ public class BlockPool extends BlockModContainer implements IWandHUD, IWandable, @Override public LexiconEntry getEntry(World world, int x, int y, int z, EntityPlayer player, ItemStack lexicon) { - return LexiconData.pool; + return world.getBlockMetadata(x, y, z) == 3 ? LexiconData.rainbowRod : LexiconData.pool; } @Override diff --git a/src/main/java/vazkii/botania/common/crafting/ModCraftingRecipes.java b/src/main/java/vazkii/botania/common/crafting/ModCraftingRecipes.java index d4e0ed2a5..ce37ff6b9 100644 --- a/src/main/java/vazkii/botania/common/crafting/ModCraftingRecipes.java +++ b/src/main/java/vazkii/botania/common/crafting/ModCraftingRecipes.java @@ -53,6 +53,7 @@ public final class ModCraftingRecipes { public static List recipesManaLens; public static IRecipe recipePool; public static IRecipe recipePoolDiluted; + public static IRecipe recipePoolFabulous; public static List recipesRuneAltar; public static IRecipe recipeLensVelocity; public static IRecipe recipeLensPotency; @@ -401,6 +402,12 @@ public final class ModCraftingRecipes { 'R', new ItemStack(ModFluffBlocks.livingrockSlab)); recipePoolDiluted = BotaniaAPI.getLatestAddedRecipe(); + // Fabulous Mana Pool Recipe + addOreDictRecipe(new ItemStack(ModBlocks.pool, 1, 3), + "R R", "RRR", + 'R', new ItemStack(ModBlocks.shimmerrock)); + recipePoolFabulous = BotaniaAPI.getLatestAddedRecipe(); + // Runic Altar Recipe addOreDictRecipe(new ItemStack(ModBlocks.runeAltar), "SSS", "SPS", diff --git a/src/main/java/vazkii/botania/common/lexicon/LexiconData.java b/src/main/java/vazkii/botania/common/lexicon/LexiconData.java index 1134a6934..3309a66e9 100644 --- a/src/main/java/vazkii/botania/common/lexicon/LexiconData.java +++ b/src/main/java/vazkii/botania/common/lexicon/LexiconData.java @@ -715,7 +715,7 @@ public final class LexiconData { openBucket.setLexiconPages(new PageText("0"), new PageCraftingRecipe("1", ModCraftingRecipes.recipeOpenBucket)); rainbowRod = new ALexiconEntry(LibLexicon.TOOL_RAINBOW_ROD, categoryTools); - rainbowRod.setLexiconPages(new PageText("0"), new PageText("1"), new PageText("6"), new PageCraftingRecipe("2", ModCraftingRecipes.recipeRainbowRod), new PageCraftingRecipe("3", ModCraftingRecipes.recipeBifrost), new PageCraftingRecipe("4", ModCraftingRecipes.recipeShimmerrock), new PageCraftingRecipe("5", ModCraftingRecipes.recipeShimmerwoodPlanks)); + rainbowRod.setLexiconPages(new PageText("0"), new PageText("1"), new PageText("6"), new PageCraftingRecipe("2", ModCraftingRecipes.recipeRainbowRod), new PageCraftingRecipe("3", ModCraftingRecipes.recipeBifrost), new PageCraftingRecipe("4", ModCraftingRecipes.recipeShimmerrock), new PageCraftingRecipe("5", ModCraftingRecipes.recipeShimmerwoodPlanks), new PageCraftingRecipe("7", ModCraftingRecipes.recipePoolFabulous)); tornadoRod = new BLexiconEntry(LibLexicon.TOOL_TORNADO_ROD, categoryTools); tornadoRod.setLexiconPages(new PageText("0"), new PageText("2"), new PageCraftingRecipe("1", ModCraftingRecipes.recipeTornadoRod)); diff --git a/src/main/resources/assets/botania/lang/en_US.lang b/src/main/resources/assets/botania/lang/en_US.lang index b521fdf0f..784138acb 100644 --- a/src/main/resources/assets/botania/lang/en_US.lang +++ b/src/main/resources/assets/botania/lang/en_US.lang @@ -633,6 +633,7 @@ tile.botania:spreader3.name=Gaia Mana Spreader tile.botania:pool0.name=Mana Pool tile.botania:pool1.name=The Everlasting Guilty Pool tile.botania:pool2.name=Diluted Mana Pool +tile.botania:pool3.name=Fabulous Mana Pool tile.botania:runeAltar.name=Runic Altar tile.botania:unstableBlock0.name=White Unstable Cube tile.botania:unstableBlock1.name=Orange Unstable Cube @@ -2955,6 +2956,7 @@ botania.page.rainbowRod2=Going my way!! Cut open a path and go! botania.page.rainbowRod3=&1Bifrost Blocks&0 for decoration botania.page.rainbowRod4=Rainbow &1Shimmerrock&0 botania.page.rainbowRod5=Rainbow &1Shimmerwood Planks&0 +botania.page.rainbowRod7=&1Fabulous Mana Pool&0! Stores as much as a normal one # -- ROD OF THE SKIES botania.entry.tornadoRod=Rod of the Skies