From f78c5069daa2d2fbf6af868f1a251653f19a3615 Mon Sep 17 00:00:00 2001 From: Vasco Lavos Date: Fri, 20 Jun 2014 23:39:24 +0100 Subject: [PATCH] Added Elven Mana Spreaders. --- .../botania/client/lib/LibResources.java | 1 + .../client/render/block/RenderSpreader.java | 3 ++- .../render/tile/RenderTileSpreader.java | 3 ++- .../botania/common/block/BlockSpreader.java | 6 +++--- .../common/block/tile/mana/TileSpreader.java | 18 ++++++++++++------ .../common/crafting/ModCrafingRecipes.java | 10 ++++++++++ .../botania/common/lexicon/LexiconData.java | 4 ++++ .../vazkii/botania/common/lib/LibLexicon.java | 1 + resources/assets/botania/lang/en_US.lang | 6 ++++++ .../textures/model/spreaderDreamwood.png | Bin 0 -> 4270 bytes 10 files changed, 41 insertions(+), 11 deletions(-) create mode 100644 resources/assets/botania/textures/model/spreaderDreamwood.png diff --git a/MODSRC/vazkii/botania/client/lib/LibResources.java b/MODSRC/vazkii/botania/client/lib/LibResources.java index 6fb9f30bc..a30b9498f 100644 --- a/MODSRC/vazkii/botania/client/lib/LibResources.java +++ b/MODSRC/vazkii/botania/client/lib/LibResources.java @@ -55,6 +55,7 @@ public final class LibResources { public static final String MODEL_ALTAR = PREFIX_MODEL + "altar.png"; public static final String MODEL_SPREADER = PREFIX_MODEL + "spreader.png"; public static final String MODEL_SPREADER_REDSTONE = PREFIX_MODEL + "spreaderRedstone.png"; + public static final String MODEL_SPREADER_DREAMWOOD = PREFIX_MODEL + "spreaderDreamwood.png"; public static final String MODEL_POOL = PREFIX_MODEL + "pool.png"; public static final String MODEL_INFINITE_POOL = PREFIX_MODEL + "infinitePool.png"; public static final String MODEL_PYLON_OLD = PREFIX_MODEL + "pylonOld.png"; diff --git a/MODSRC/vazkii/botania/client/render/block/RenderSpreader.java b/MODSRC/vazkii/botania/client/render/block/RenderSpreader.java index adc6e9a11..bfde9810c 100644 --- a/MODSRC/vazkii/botania/client/render/block/RenderSpreader.java +++ b/MODSRC/vazkii/botania/client/render/block/RenderSpreader.java @@ -28,7 +28,8 @@ public class RenderSpreader implements ISimpleBlockRenderingHandler { public void renderInventoryBlock(Block block, int metadata, int modelID, RenderBlocks renderer) { GL11.glPushMatrix(); GL11.glTranslatef(-0.5F, -0.5F, -0.5F); - TileSpreader.staticRedstone = (metadata & 1) == 1; + TileSpreader.staticRedstone = metadata == 1; + TileSpreader.staticDreamwood = metadata == 2; TileSpreader spreader = new TileSpreader(); spreader.rotationX = -180F; TileEntityRendererDispatcher.instance.renderTileEntityAt(spreader, 0.0D, 0.0D, 0.0D, 0.0F); diff --git a/MODSRC/vazkii/botania/client/render/tile/RenderTileSpreader.java b/MODSRC/vazkii/botania/client/render/tile/RenderTileSpreader.java index bbeec027d..83fdc9fd7 100644 --- a/MODSRC/vazkii/botania/client/render/tile/RenderTileSpreader.java +++ b/MODSRC/vazkii/botania/client/render/tile/RenderTileSpreader.java @@ -31,6 +31,7 @@ public class RenderTileSpreader extends TileEntitySpecialRenderer { private static final ResourceLocation texture = new ResourceLocation(LibResources.MODEL_SPREADER); private static final ResourceLocation textureRs = new ResourceLocation(LibResources.MODEL_SPREADER_REDSTONE); + private static final ResourceLocation textureDw = new ResourceLocation(LibResources.MODEL_SPREADER_DREAMWOOD); private static final ModelSpreader model = new ModelSpreader(); @@ -48,7 +49,7 @@ public class RenderTileSpreader extends TileEntitySpecialRenderer { GL11.glRotatef(spreader.rotationY, 1F, 0F, 0F); GL11.glTranslatef(0F, 1F, 0F); - Minecraft.getMinecraft().renderEngine.bindTexture(spreader.isRedstone() ? textureRs : texture); + Minecraft.getMinecraft().renderEngine.bindTexture(spreader.isRedstone() ? textureRs : spreader.isDreamwood() ? textureDw : texture); GL11.glScalef(1F, -1F, -1F); model.render(); GL11.glScalef(1F, -1F, -1F); diff --git a/MODSRC/vazkii/botania/common/block/BlockSpreader.java b/MODSRC/vazkii/botania/common/block/BlockSpreader.java index 5e469a4a3..15d1a259c 100644 --- a/MODSRC/vazkii/botania/common/block/BlockSpreader.java +++ b/MODSRC/vazkii/botania/common/block/BlockSpreader.java @@ -77,7 +77,7 @@ public class BlockSpreader extends BlockModContainer implements IWandable, IWand @Override public void getSubBlocks(Item par1, CreativeTabs par2, List par3) { - for(int i = 0; i < 2; i++) + for(int i = 0; i < 3; i++) par3.add(new ItemStack(par1, 1, i)); } @@ -85,7 +85,7 @@ public class BlockSpreader extends BlockModContainer implements IWandable, IWand public void onBlockPlacedBy(World par1World, int par2, int par3, int par4, EntityLivingBase par5EntityLivingBase, ItemStack par6ItemStack) { int orientation = BlockPistonBase.determineOrientation(par1World, par2, par3, par4, par5EntityLivingBase); TileSpreader spreader = (TileSpreader) par1World.getTileEntity(par2, par3, par4); - par1World.setBlockMetadataWithNotify(par2, par3, par4, par6ItemStack.getItemDamage() & 1, 1 | 2); + par1World.setBlockMetadataWithNotify(par2, par3, par4, par6ItemStack.getItemDamage(), 1 | 2); switch(orientation) { case 0: @@ -217,7 +217,7 @@ public class BlockSpreader extends BlockModContainer implements IWandable, IWand @Override public LexiconEntry getEntry(World world, int x, int y, int z, EntityPlayer player, ItemStack lexicon) { int meta = world.getBlockMetadata(x, y, z); - return meta == 0 ? LexiconData.spreader : LexiconData.redstoneSpreader; + return meta == 0 ? LexiconData.spreader : meta == 1 ? LexiconData.redstoneSpreader : LexiconData.dreamwoodSpreader; } @Override diff --git a/MODSRC/vazkii/botania/common/block/tile/mana/TileSpreader.java b/MODSRC/vazkii/botania/common/block/tile/mana/TileSpreader.java index e39ef8bdf..a0ff57b34 100644 --- a/MODSRC/vazkii/botania/common/block/tile/mana/TileSpreader.java +++ b/MODSRC/vazkii/botania/common/block/tile/mana/TileSpreader.java @@ -68,6 +68,7 @@ public class TileSpreader extends TileSimpleInventory implements IManaCollector, private static final String TAG_FORCE_CLIENT_BINDING_Z = "forceClientBindingZ"; public static boolean staticRedstone = false; + public static boolean staticDreamwood = false; int mana; int knownMana = -1; @@ -301,7 +302,11 @@ public class TileSpreader extends TileSimpleInventory implements IManaCollector, } public boolean isRedstone() { - return worldObj == null ? staticRedstone : (getBlockMetadata() & 1) == 1; + return worldObj == null ? staticRedstone : getBlockMetadata() == 1; + } + + public boolean isDreamwood() { + return worldObj == null ? staticDreamwood : getBlockMetadata() == 2; } public void checkForReceiver() { @@ -318,11 +323,12 @@ public class TileSpreader extends TileSimpleInventory implements IManaCollector, public EntityManaBurst getBurst(boolean fake) { EntityManaBurst burst = new EntityManaBurst(this, fake); - int maxMana = 160; - int color = isRedstone() ? 0xFF2020 : 0x20FF20; - int ticksBeforeManaLoss = 60; + boolean dreamwood = isDreamwood(); + int maxMana = dreamwood ? 240 : 160; + int color = isRedstone() ? 0xFF2020 : dreamwood ? 0xFF45C4 : 0x20FF20; + int ticksBeforeManaLoss = dreamwood ? 80 : 60; float manaLossPerTick = 4F; - float motionModifier = 1F; + float motionModifier = dreamwood ? 1.25F : 1F; float gravity = 0F; BurstProperties props = new BurstProperties(maxMana, ticksBeforeManaLoss, manaLossPerTick, gravity, motionModifier, color); @@ -370,7 +376,7 @@ public class TileSpreader extends TileSimpleInventory implements IManaCollector, public void renderHUD(Minecraft mc, ScaledResolution res) { String name = StatCollector.translateToLocal(new ItemStack(ModBlocks.spreader, 1, getBlockMetadata()).getUnlocalizedName().replaceAll("tile.", "tile." + LibResources.PREFIX_MOD) + ".name"); - int color = isRedstone() ? 0x66FF0000 : 0x6600FF00; + int color = isRedstone() ? 0x66FF0000 : isDreamwood() ? 0x66FF00AE : 0x6600FF00; HUDHandler.drawSimpleManaHUD(color, knownMana, MAX_MANA, name, res); ItemStack lens = getStackInSlot(0); diff --git a/MODSRC/vazkii/botania/common/crafting/ModCrafingRecipes.java b/MODSRC/vazkii/botania/common/crafting/ModCrafingRecipes.java index 0d859ceb7..1c0834b20 100644 --- a/MODSRC/vazkii/botania/common/crafting/ModCrafingRecipes.java +++ b/MODSRC/vazkii/botania/common/crafting/ModCrafingRecipes.java @@ -147,6 +147,7 @@ public final class ModCrafingRecipes { public static IRecipe recipeSuperTravelBelt; public static IRecipe recipeRainbowRod; public static IRecipe recipeSpectralPlatform; + public static List recipesDreamwoodSpreader; public static void init() { // Lexicon Recipe @@ -846,6 +847,15 @@ public final class ModCrafingRecipes { '4', new ItemStack(ModBlocks.dreamwood, 0, 4)); recipeSpectralPlatform = BotaniaAPI.getLatestAddedRecipe(); + // Elven Mana Spreader Recipes + for(int i = 0; i < 16; i++) + addOreDictRecipe(new ItemStack(ModBlocks.spreader, 1, 2), + "WWW", "EP ", "WWW", + 'W', LibOreDict.DREAM_WOOD, + 'P', LibOreDict.MANA_PETAL[i], + 'E', LibOreDict.ELEMENTIUM); + recipesDreamwoodSpreader = BotaniaAPI.getLatestAddedRecipes(16); + // Mana and Terrasteel Block Recipes addOreDictRecipe(new ItemStack(ModBlocks.storage, 1, 0), "III", "III", "III", diff --git a/MODSRC/vazkii/botania/common/lexicon/LexiconData.java b/MODSRC/vazkii/botania/common/lexicon/LexiconData.java index e35f13708..803fd0e43 100644 --- a/MODSRC/vazkii/botania/common/lexicon/LexiconData.java +++ b/MODSRC/vazkii/botania/common/lexicon/LexiconData.java @@ -77,6 +77,7 @@ public final class LexiconData { public static LexiconEntry compositeLens; public static LexiconEntry redstoneSpreader; public static LexiconEntry manastar; + public static LexiconEntry dreamwoodSpreader; public static LexiconEntry functionalIntro; public static LexiconEntry jadedAmaranthus; @@ -265,6 +266,9 @@ public final class LexiconData { manastar = new BLexiconEntry(LibLexicon.MANA_MANASTAR, categoryMana); manastar.setLexiconPages(new PageText("0"), new PagePetalRecipe("1", ModPetalRecipes.manastarRecipe)); + dreamwoodSpreader = new ALexiconEntry(LibLexicon.MANA_DREAMWOOD_SPREADER, categoryMana); + dreamwoodSpreader.setLexiconPages(new PageText("0"), new PageCraftingRecipe("1", ModCrafingRecipes.recipesDreamwoodSpreader)); + // FUNCTIONAL FLOWERS ENTRIES functionalIntro = new BLexiconEntry(LibLexicon.FFLOWER_INTRO, categoryFunctionalFlowers); functionalIntro.setPriority().setLexiconPages(new PageText("0"), new PageText("1"), new PageText("2"), new PageText("3"), new PageCraftingRecipe("4", ModCrafingRecipes.recipeRedstoneRoot)); diff --git a/MODSRC/vazkii/botania/common/lib/LibLexicon.java b/MODSRC/vazkii/botania/common/lib/LibLexicon.java index 51c4c526e..4774a2962 100644 --- a/MODSRC/vazkii/botania/common/lib/LibLexicon.java +++ b/MODSRC/vazkii/botania/common/lib/LibLexicon.java @@ -54,6 +54,7 @@ public final class LibLexicon { public static final String MANA_COMPOSITE_LENS = "compositeLens"; public static final String MANA_REDSTONE_SPREADER = "redstoneSpreader"; public static final String MANA_MANASTAR = "manastar"; + public static final String MANA_DREAMWOOD_SPREADER = "dreamwoodSpreader"; public static final String FFLOWER_INTRO = "fIntro"; public static final String FFLOWER_JADED_AMARANTHUS = "jadedAmaranthus"; diff --git a/resources/assets/botania/lang/en_US.lang b/resources/assets/botania/lang/en_US.lang index c4c24eef4..94a6d168a 100644 --- a/resources/assets/botania/lang/en_US.lang +++ b/resources/assets/botania/lang/en_US.lang @@ -155,6 +155,7 @@ tile.botania:livingwood4.name=Pattern Framed Livingwood tile.botania:livingwood5.name=Glimmering Livingwood tile.botania:spreader0.name=Mana Spreader tile.botania:spreader1.name=Redstone Mana Spreader +tile.botania:spreader2.name=Elven Mana Spreader tile.botania:pool0.name=Mana Pool tile.botania:pool1.name=The Everlasting Guilty Pool tile.botania:runeAltar.name=Runic Altar @@ -715,6 +716,11 @@ botania.entry.manastar=Manastar botania.page.manastar0=The imprecise measurements of the &1Wand of the Forest&0 sometimes won't cut it for telling if you're turning a profit or loss in your &1Mana Pools&0.
Creating a &1Manastar&0 and placing it next to your pools will have it shine red if there's a loss or blue if there's a profit. The measurement happens every few seconds. botania.page.manastar1=&rI'm a shooting star leaping through the skies&r. +# -- ELVEN MANA SPREADER +botania.entry.dreamwoodSpreader=Elven Mana Spreader +botania.page.dreamwoodSpreader0=Simply put, &1Dreamwood&0 conducts &4Mana&0 better than &1Livingwood&0. Add in some adjustments like &1Elementium&0 or &1Mana Petals&0 and what you get is a &1Mana Spreader&0 that can conduct more &4Mana&0, faster and for more time without &4Mana loss&0.
On the negative side, it can't be turned into a &1Redstone Mana Spreader&0. +botania.page.dreamwoodSpreader1=Better spreaders, that's it + # - FUNCTIONAL FLOWERS # -- AN INTRODUCTION TO FUNCTION botania.entry.fIntro=An Introduction to Function diff --git a/resources/assets/botania/textures/model/spreaderDreamwood.png b/resources/assets/botania/textures/model/spreaderDreamwood.png new file mode 100644 index 0000000000000000000000000000000000000000..91608ba0d9d7076da645519968244004ceecb361 GIT binary patch literal 4270 zcmV;f5K-@mP)pPPiaF#P*7-ZbZ>KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-rV&neh&#Q1i z007~1e$oCcFS8neI|hJl{-P!B1ZZ9hpmq0)X0i`JwE&>$+E?>%_LC6RbVIkUx0b+_+BaR3cnT7Zv!AJxW zizFb)h!jyGOOZ85F;a?DAXP{m@;!0_IfqH8(HlgRxt7s3}k3K`kFu>>-2Q$QMFfPW!La{h336o>X zu_CMttHv6zR;&ZNiS=X8v3CR#fknUxHUxJ0uoBa_M6WNWeqIg~6QE69c9o#eyhGvpiOA@W-aonk<7r1(?fC{oI5N*U!4 zfg=2N-7=cNnjjOr{yriy6mMFgG#l znCF=fnQv8CDz++o6_Lscl}eQ+l^ZHARH>?_s@|##Rr6KLRFA1%Q+=*RRWnoLsR`7U zt5vFIcfW3@?wFpwUVxrVZ>QdQz32KIeJ}k~{cZZE^+ya? z2D1z#2HOnI7(B%_ac?{wFUQ;QQA1tBKtrWrm0_3Rgps+?Jfqb{jYbcQX~taRB;#$y zZN{S}1|}gUOHJxc?wV3fxuz+mJ4`!F$IZ;mqRrNsHJd##*D~ju=bP7?-?v~|cv>v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