diff --git a/src/main/java/vazkii/botania/client/core/proxy/ClientProxy.java b/src/main/java/vazkii/botania/client/core/proxy/ClientProxy.java index d962032d7..87fedccbd 100644 --- a/src/main/java/vazkii/botania/client/core/proxy/ClientProxy.java +++ b/src/main/java/vazkii/botania/client/core/proxy/ClientProxy.java @@ -55,6 +55,7 @@ import vazkii.botania.client.render.block.RenderBrewery; import vazkii.botania.client.render.block.RenderCorporeaIndex; import vazkii.botania.client.render.block.RenderFloatingFlower; import vazkii.botania.client.render.block.RenderPool; +import vazkii.botania.client.render.block.RenderPump; import vazkii.botania.client.render.block.RenderPylon; import vazkii.botania.client.render.block.RenderSpawnerClaw; import vazkii.botania.client.render.block.RenderSpecialFlower; @@ -78,6 +79,7 @@ import vazkii.botania.client.render.tile.RenderTileEnchanter; import vazkii.botania.client.render.tile.RenderTileFloatingFlower; import vazkii.botania.client.render.tile.RenderTilePool; import vazkii.botania.client.render.tile.RenderTilePrism; +import vazkii.botania.client.render.tile.RenderTilePump; import vazkii.botania.client.render.tile.RenderTilePylon; import vazkii.botania.client.render.tile.RenderTileRedString; import vazkii.botania.client.render.tile.RenderTileRuneAltar; @@ -103,6 +105,7 @@ import vazkii.botania.common.block.tile.TileTinyPotato; import vazkii.botania.common.block.tile.corporea.TileCorporeaIndex; import vazkii.botania.common.block.tile.mana.TilePool; import vazkii.botania.common.block.tile.mana.TilePrism; +import vazkii.botania.common.block.tile.mana.TilePump; import vazkii.botania.common.block.tile.mana.TileSpreader; import vazkii.botania.common.block.tile.string.TileRedString; import vazkii.botania.common.core.handler.ConfigHandler; @@ -168,6 +171,7 @@ public class ClientProxy extends CommonProxy { LibRenderIDs.idSpawnerClaw = RenderingRegistry.getNextAvailableRenderId(); LibRenderIDs.idBrewery = RenderingRegistry.getNextAvailableRenderId(); LibRenderIDs.idCorporeaIndex = RenderingRegistry.getNextAvailableRenderId(); + LibRenderIDs.idPump = RenderingRegistry.getNextAvailableRenderId(); RenderingRegistry.registerBlockHandler(new RenderAltar()); RenderingRegistry.registerBlockHandler(new RenderSpecialFlower(LibRenderIDs.idSpecialFlower)); @@ -179,6 +183,7 @@ public class ClientProxy extends CommonProxy { RenderingRegistry.registerBlockHandler(new RenderSpawnerClaw()); RenderingRegistry.registerBlockHandler(new RenderBrewery()); RenderingRegistry.registerBlockHandler(new RenderCorporeaIndex()); + RenderingRegistry.registerBlockHandler(new RenderPump()); RenderTransparentItem renderTransparentItem = new RenderTransparentItem(); RenderFloatingFlowerItem renderFloatingFlower = new RenderFloatingFlowerItem(); @@ -212,6 +217,7 @@ public class ClientProxy extends CommonProxy { ClientRegistry.bindTileEntitySpecialRenderer(TileRedString.class, new RenderTileRedString()); ClientRegistry.bindTileEntitySpecialRenderer(TilePrism.class, new RenderTilePrism()); ClientRegistry.bindTileEntitySpecialRenderer(TileCorporeaIndex.class, new RenderTileCorporeaIndex()); + ClientRegistry.bindTileEntitySpecialRenderer(TilePump.class, new RenderTilePump()); ClientRegistry.bindTileEntitySpecialRenderer(TileEntitySkull.class, new RenderTileSkullOverride()); diff --git a/src/main/java/vazkii/botania/client/lib/LibRenderIDs.java b/src/main/java/vazkii/botania/client/lib/LibRenderIDs.java index 6e6dc0034..f648d5b2e 100644 --- a/src/main/java/vazkii/botania/client/lib/LibRenderIDs.java +++ b/src/main/java/vazkii/botania/client/lib/LibRenderIDs.java @@ -22,5 +22,6 @@ public final class LibRenderIDs { public static int idSpawnerClaw = -1; public static int idBrewery = -1; public static int idCorporeaIndex = -1; + public static int idPump = -1; } diff --git a/src/main/java/vazkii/botania/client/lib/LibResources.java b/src/main/java/vazkii/botania/client/lib/LibResources.java index 0cacb6bec..6ab09828a 100644 --- a/src/main/java/vazkii/botania/client/lib/LibResources.java +++ b/src/main/java/vazkii/botania/client/lib/LibResources.java @@ -103,7 +103,8 @@ public final class LibResources { public static final String MODEL_UNHOLY_CLOAK = PREFIX_MODEL + "unholyCloak.png"; public static final String MODEL_CORPOREA_INDEX = PREFIX_MODEL + "corporeaIndex.png"; public static final String MODEL_INVISIBLE_ARMOR = PREFIX_MODEL + "invisibleArmor.png"; - + public static final String MODEL_PUMP = PREFIX_MODEL + "pump.png"; + public static final String MODEL_CAPE = "/assets/botania/textures/model/cape.png"; public static final String MISC_PARTICLES = PREFIX_MISC + "particles.png"; diff --git a/src/main/java/vazkii/botania/client/model/ModelPump.java b/src/main/java/vazkii/botania/client/model/ModelPump.java new file mode 100644 index 000000000..3f741e5e1 --- /dev/null +++ b/src/main/java/vazkii/botania/client/model/ModelPump.java @@ -0,0 +1,71 @@ +/** + * This class was created by . It's distributed as + * part of the Botania Mod. Get the Source Code in github: + * https://github.com/Vazkii/Botania + * + * Botania is Open Source and distributed under the + * Botania License: http://botaniamod.net/license.php + * + * File Created @ [? (GMT)] + */ +package vazkii.botania.client.model; + +import java.util.ArrayList; + +import net.minecraft.client.model.ModelBase; +import net.minecraft.client.model.ModelRenderer; + +public class ModelPump extends ModelBase{ + + private ArrayList parts = new ArrayList(); + + private ArrayList innerRing = new ArrayList(); + private ArrayList outerRing = new ArrayList(); + + public ModelPump() { + textureWidth = 64; + textureHeight = 32; + + ModelRenderer main = new ModelRenderer(this, 0, 0); + main.addBox(-2.0F, -2.0F, -7.0F, 4, 4, 14); + main.setRotationPoint(0.0F, 4.0F, 0.0F); + + for(float r = 0; r <= Math.PI * 2; r += Math.PI) { + ModelRenderer side = new ModelRenderer(this, 22, 0); + + side.addBox(-4.0F, -4.0F, 7.0F, 8, 8, 1); + side.setRotationPoint(0.0F, 0.0F, 0.0F); + side.rotateAngleY = r; + main.addChild(side); + } + + for(float r = 0; r <= Math.PI * 2; r += Math.PI / 2) { + ModelRenderer innerPlate = new ModelRenderer(this, 0, 18); + ModelRenderer outerPlate = new ModelRenderer(this, 22, 18); + + innerPlate.addBox(-3.0F, -3.0F, -7.0F, 5, 1, 6); + innerPlate.setRotationPoint(0.0F, 4.0F, 0.0F); + innerPlate.rotateAngleZ = r; + innerRing.add(innerPlate); + parts.add(innerPlate); + + + outerPlate.addBox(-4.0F, -4.0F, 3.0F, 7, 1, 4); + outerPlate.setRotationPoint(0.0F, 4.0F, 0.0F); + outerPlate.rotateAngleZ = r; + outerRing.add(outerPlate); + parts.add(outerPlate); + } + + parts.add(main); + + } + + public void render(float ringPos) { + for(ModelRenderer iRing : innerRing) + iRing.rotationPointZ = ringPos; + + for(ModelRenderer part : parts) + part.render(1F / 16F); + } +} \ No newline at end of file diff --git a/src/main/java/vazkii/botania/client/render/block/RenderPump.java b/src/main/java/vazkii/botania/client/render/block/RenderPump.java new file mode 100644 index 000000000..cbf99719f --- /dev/null +++ b/src/main/java/vazkii/botania/client/render/block/RenderPump.java @@ -0,0 +1,49 @@ +/** + * This class was created by . It's distributed as + * part of the Botania Mod. Get the Source Code in github: + * https://github.com/Vazkii/Botania + * + * Botania is Open Source and distributed under the + * Botania License: http://botaniamod.net/license.php + * + * File Created @ [Mar 18, 2015, 4:42:08 PM (GMT)] + */ +package vazkii.botania.client.render.block; + +import net.minecraft.block.Block; +import net.minecraft.client.renderer.RenderBlocks; +import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher; +import net.minecraft.world.IBlockAccess; + +import org.lwjgl.opengl.GL11; + +import vazkii.botania.client.lib.LibRenderIDs; +import vazkii.botania.common.block.tile.mana.TilePump; +import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler; + +public class RenderPump implements ISimpleBlockRenderingHandler { + + @Override + public void renderInventoryBlock(Block block, int metadata, int modelId, RenderBlocks renderer) { + GL11.glPushMatrix(); + GL11.glTranslatef(-0.5F, -0.25F, -0.5F); + TileEntityRendererDispatcher.instance.renderTileEntityAt(new TilePump(), 0.0D, 0.0D, 0.0D, 0.0F); + GL11.glPopMatrix(); + } + + @Override + public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer) { + return false; + } + + @Override + public boolean shouldRender3DInInventory(int modelId) { + return true; + } + + @Override + public int getRenderId() { + return LibRenderIDs.idPump; + } + +} diff --git a/src/main/java/vazkii/botania/client/render/tile/RenderTilePump.java b/src/main/java/vazkii/botania/client/render/tile/RenderTilePump.java new file mode 100644 index 000000000..5270dd152 --- /dev/null +++ b/src/main/java/vazkii/botania/client/render/tile/RenderTilePump.java @@ -0,0 +1,56 @@ +/** + * This class was created by . It's distributed as + * part of the Botania Mod. Get the Source Code in github: + * https://github.com/Vazkii/Botania + * + * Botania is Open Source and distributed under the + * Botania License: http://botaniamod.net/license.php + * + * File Created @ [Mar 18, 2015, 3:15:38 PM (GMT)] + */ +package vazkii.botania.client.render.tile; + +import net.minecraft.client.Minecraft; +import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.ResourceLocation; + +import org.lwjgl.opengl.GL11; +import org.lwjgl.opengl.GL12; + +import vazkii.botania.client.lib.LibResources; +import vazkii.botania.client.model.ModelPump; +import vazkii.botania.common.block.tile.mana.TilePump; + +public class RenderTilePump extends TileEntitySpecialRenderer { + + private static final float[] ROTATIONS = new float[] { + 180F, 0F, 90F, 270F + }; + + private static final ResourceLocation texture = new ResourceLocation(LibResources.MODEL_PUMP); + private static final ModelPump model = new ModelPump(); + + @Override + public void renderTileEntityAt(TileEntity tileentity, double d0, double d1, double d2, float f) { + TilePump pump = (TilePump) tileentity; + + GL11.glPushMatrix(); + GL11.glEnable(GL12.GL_RESCALE_NORMAL); + GL11.glColor4f(1F, 1F, 1F, 1F); + GL11.glTranslated(d0, d1, d2); + + Minecraft.getMinecraft().renderEngine.bindTexture(texture); + int meta = pump.getWorldObj() != null ? pump.getBlockMetadata() : 0; + + GL11.glTranslatef(0.5F, 0.5F, 0.5F); + GL11.glScalef(1F, -1F, -1F); + GL11.glRotatef(ROTATIONS[Math.max(Math.min(ROTATIONS.length, meta - 2), 0)], 0F, 1F, 0F); + model.render(Math.max(0F, Math.min(8F, pump.innerRingPos + pump.moving * f))); + GL11.glColor3f(1F, 1F, 1F); + GL11.glScalef(1F, -1F, -1F); + GL11.glEnable(GL12.GL_RESCALE_NORMAL); + GL11.glPopMatrix(); + } + +} diff --git a/src/main/java/vazkii/botania/common/block/ModBlocks.java b/src/main/java/vazkii/botania/common/block/ModBlocks.java index 92c55afe7..bb95bd702 100644 --- a/src/main/java/vazkii/botania/common/block/ModBlocks.java +++ b/src/main/java/vazkii/botania/common/block/ModBlocks.java @@ -130,6 +130,7 @@ import vazkii.botania.common.block.tile.mana.TileManaDetector; import vazkii.botania.common.block.tile.mana.TileManaVoid; import vazkii.botania.common.block.tile.mana.TilePool; import vazkii.botania.common.block.tile.mana.TilePrism; +import vazkii.botania.common.block.tile.mana.TilePump; import vazkii.botania.common.block.tile.mana.TileRFGenerator; import vazkii.botania.common.block.tile.mana.TileSpreader; import vazkii.botania.common.block.tile.mana.TileTurntable; @@ -340,6 +341,7 @@ public final class ModBlocks { registerTile(TilePrism.class, LibBlockNames.PRISM); registerTile(TileCorporeaIndex.class, LibBlockNames.CORPOREA_INDEX); registerTile(TileCorporeaFunnel.class, LibBlockNames.CORPOREA_FUNNEL); + registerTile(TilePump.class, LibBlockNames.PUMP); BotaniaAPI.registerSubTile(LibBlockNames.SUBTILE_PUREDAISY, SubTilePureDaisy.class); BotaniaAPI.registerSubTile(LibBlockNames.SUBTILE_MANASTAR, SubTileManastar.class); diff --git a/src/main/java/vazkii/botania/common/block/mana/BlockPump.java b/src/main/java/vazkii/botania/common/block/mana/BlockPump.java index 209a14ba5..98a7ca357 100644 --- a/src/main/java/vazkii/botania/common/block/mana/BlockPump.java +++ b/src/main/java/vazkii/botania/common/block/mana/BlockPump.java @@ -10,55 +10,95 @@ */ package vazkii.botania.common.block.mana; -import net.minecraft.block.BlockPistonBase; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; import net.minecraft.util.IIcon; +import net.minecraft.util.MathHelper; +import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; -import vazkii.botania.client.core.helper.IconHelper; -import vazkii.botania.common.block.BlockMod; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.common.util.RotationHelper; +import vazkii.botania.api.lexicon.ILexiconable; +import vazkii.botania.api.lexicon.LexiconEntry; +import vazkii.botania.client.lib.LibRenderIDs; +import vazkii.botania.common.block.BlockModContainer; import vazkii.botania.common.block.ModBlocks; +import vazkii.botania.common.block.tile.mana.TilePump; +import vazkii.botania.common.lexicon.LexiconData; import vazkii.botania.common.lib.LibBlockNames; -public class BlockPump extends BlockMod { +public class BlockPump extends BlockModContainer implements ILexiconable { - private static final int[][] ICON_ORIENTATIONS = { - { 4, 3, 1, 2 }, - { 3, 4, 2, 1 }, - { 2, 1, 4, 3 }, - { 1, 2, 3, 4 } - }; + private static final int[] META_ROTATIONS = new int[] { 2, 5, 3, 4 }; - IIcon[] icons = new IIcon[5]; - public BlockPump() { super(Material.rock); setHardness(2.0F); setResistance(10.0F); setStepSound(soundTypeStone); setBlockName(LibBlockNames.PUMP); + setBlockBounds(true); } @Override - public void onBlockPlacedBy(World par1World, int par2, int par3, int par4, EntityLivingBase par5EntityLivingBase, ItemStack par6ItemStack) { - int orientation = Math.max(2, BlockPistonBase.determineOrientation(par1World, par2, par3, par4, par5EntityLivingBase)); - par1World.setBlockMetadataWithNotify(par2, par3, par4, orientation, 1 | 2); + public void onBlockPlacedBy(World p_149689_1_, int p_149689_2_, int p_149689_3_, int p_149689_4_, EntityLivingBase p_149689_5_, ItemStack p_149689_6_) { + int l = MathHelper.floor_double((double)(p_149689_5_.rotationYaw * 4.0F / 360.0F) + 0.5D) & 3; + p_149689_1_.setBlockMetadataWithNotify(p_149689_2_, p_149689_3_, p_149689_4_, META_ROTATIONS[l], 2); } + @Override + public void setBlockBoundsBasedOnState(IBlockAccess w, int x, int y, int z) { + setBlockBounds(w.getBlockMetadata(x, y, z) < 4); + } + + public void setBlockBounds(boolean horiz) { + if(horiz) + setBlockBounds(0.25F, 0F, 0F, 0.75F, 0.5F, 1F); + else setBlockBounds(0F, 0F, 0.25F, 1F, 0.5F, 0.75F); + } + + @Override + public boolean rotateBlock(World worldObj, int x, int y, int z, ForgeDirection axis) { + return RotationHelper.rotateVanillaBlock(Blocks.furnace, worldObj, x, y, z, axis); + } + @Override public void registerBlockIcons(IIconRegister par1IconRegister) { - for(int i = 0; i < icons.length; i++) - icons[i] = IconHelper.forBlock(par1IconRegister, this, i); + // NO-OP } @Override public IIcon getIcon(int par1, int par2) { - return par1 < 2 ? icons[0] : icons[ICON_ORIENTATIONS[Math.max(0, par2 - 2)][par1 - 2]]; + return ModBlocks.livingrock.getIcon(0, 0); } - public int getOrientation(World w, int x, int y, int z) { - return w.getBlockMetadata(x, y, z); + @Override + public int getRenderType() { + return LibRenderIDs.idPump; + } + + @Override + public boolean isOpaqueCube() { + return false; + } + + @Override + public boolean renderAsNormalBlock() { + return false; + } + + @Override + public LexiconEntry getEntry(World world, int x, int y, int z, EntityPlayer player, ItemStack lexicon) { + return LexiconData.poolCart; + } + + @Override + public TileEntity createNewTileEntity(World world, int meta) { + return new TilePump(); } } diff --git a/src/main/java/vazkii/botania/common/block/tile/mana/TilePump.java b/src/main/java/vazkii/botania/common/block/tile/mana/TilePump.java new file mode 100644 index 000000000..8a0b7a331 --- /dev/null +++ b/src/main/java/vazkii/botania/common/block/tile/mana/TilePump.java @@ -0,0 +1,72 @@ +/** + * This class was created by . It's distributed as + * part of the Botania Mod. Get the Source Code in github: + * https://github.com/Vazkii/Botania + * + * Botania is Open Source and distributed under the + * Botania License: http://botaniamod.net/license.php + * + * File Created @ [Mar 18, 2015, 3:16:57 PM (GMT)] + */ +package vazkii.botania.common.block.tile.mana; + +import net.minecraft.nbt.NBTTagCompound; +import vazkii.botania.common.block.tile.TileMod; + +public class TilePump extends TileMod { + + private static final String TAG_ACTIVE = "active"; + + public float innerRingPos; + public boolean active = false; + public boolean hasCart = false; + public float moving = 0F; + + @Override + public void updateEntity() { + float max = 8F; + float min = 0F; + + float incr = max / 10F; + + if(innerRingPos < max && active && moving >= 0F) { + innerRingPos += incr; + moving = incr; + if(innerRingPos >= max) { + innerRingPos = Math.min(max, innerRingPos); + moving = 0F; + } + } else if(innerRingPos > min) { + innerRingPos -= incr * 2; + moving = -incr * 2; + if(innerRingPos <= min) { + innerRingPos = Math.max(min, innerRingPos); + moving = 0F; + } + } + + if(!hasCart && active) + setActive(false); + hasCart = false; + + super.updateEntity(); + } + + @Override + public void writeCustomNBT(NBTTagCompound cmp) { + cmp.setBoolean(TAG_ACTIVE, active); + } + + @Override + public void readCustomNBT(NBTTagCompound cmp) { + active = cmp.getBoolean(TAG_ACTIVE); + } + + public void setActive(boolean active) { + if(!worldObj.isRemote) { + this.active = active; + worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + } + } + +} diff --git a/src/main/java/vazkii/botania/common/crafting/ModCraftingRecipes.java b/src/main/java/vazkii/botania/common/crafting/ModCraftingRecipes.java index ad7cbaac0..4e1620923 100644 --- a/src/main/java/vazkii/botania/common/crafting/ModCraftingRecipes.java +++ b/src/main/java/vazkii/botania/common/crafting/ModCraftingRecipes.java @@ -242,6 +242,8 @@ public final class ModCraftingRecipes { public static IRecipe recipeSnowHorn; public static IRecipe recipeFlowerBag; public static IRecipe recipePhantomInk; + public static IRecipe recipePoolCart; + public static IRecipe recipePump; public static void init() { // Lexicon Recipe @@ -1605,6 +1607,18 @@ public final class ModCraftingRecipes { addShapelessOreDictRecipe(new ItemStack(ModItems.phantomInk, 4), LibOreDict.MANA_PEARL, new ItemStack(Items.dye), new ItemStack(Blocks.glass), new ItemStack(Items.glass_bottle), new ItemStack(Items.glass_bottle), new ItemStack(Items.glass_bottle), new ItemStack(Items.glass_bottle)); recipePhantomInk = BotaniaAPI.getLatestAddedRecipe(); + // Minecart with Mana Pool Recipe + GameRegistry.addShapelessRecipe(new ItemStack(ModItems.poolMinecart), new ItemStack(Items.minecart), new ItemStack(ModBlocks.pool)); + recipePoolCart = BotaniaAPI.getLatestAddedRecipe(); + + // Mana Pump Recipe + addOreDictRecipe(new ItemStack(ModBlocks.pump), + "SSS", "IBI", "SSS", + 'S', LibOreDict.LIVING_ROCK, + 'I', LibOreDict.MANA_STEEL, + 'B', new ItemStack(Items.bucket)); + recipePump = BotaniaAPI.getLatestAddedRecipe(); + // Storage Block Recipes addOreDictRecipe(new ItemStack(ModBlocks.storage, 1, 0), "III", "III", "III", diff --git a/src/main/java/vazkii/botania/common/entity/EntityPoolMinecart.java b/src/main/java/vazkii/botania/common/entity/EntityPoolMinecart.java index 207477f2a..775c301e3 100644 --- a/src/main/java/vazkii/botania/common/entity/EntityPoolMinecart.java +++ b/src/main/java/vazkii/botania/common/entity/EntityPoolMinecart.java @@ -21,6 +21,7 @@ import net.minecraftforge.common.util.ForgeDirection; import vazkii.botania.api.mana.IManaPool; import vazkii.botania.common.block.ModBlocks; import vazkii.botania.common.block.tile.mana.TilePool; +import vazkii.botania.common.block.tile.mana.TilePump; import vazkii.botania.common.lib.LibMisc; public class EntityPoolMinecart extends EntityMinecart { @@ -95,13 +96,23 @@ public class EntityPoolMinecart extends EntityMinecart { } else if(pumpDir == dir.getOpposite() && !pool.isFull()) { // Cart -> Pool int cartMana = getMana(); int transfer = Math.min(TRANSFER_RATE, cartMana); - pool.recieveMana(transfer); - setMana(cartMana - transfer); - did = true; + if(transfer > 0) { + pool.recieveMana(transfer); + setMana(cartMana - transfer); + did = true; + } } - if(did) + if(did) { worldObj.markBlockForUpdate(xp_, y, zp_); + TileEntity tile_ = worldObj.getTileEntity(xp, y, zp); + if(tile_ != null && tile_ instanceof TilePump) { + TilePump pump = (TilePump) tile_; + pump.hasCart = true; + if(!pump.active) + pump.setActive(true); + } + } } } } diff --git a/src/main/java/vazkii/botania/common/lexicon/LexiconData.java b/src/main/java/vazkii/botania/common/lexicon/LexiconData.java index c76332dc5..3398a6998 100644 --- a/src/main/java/vazkii/botania/common/lexicon/LexiconData.java +++ b/src/main/java/vazkii/botania/common/lexicon/LexiconData.java @@ -85,7 +85,8 @@ public final class LexiconData { public static LexiconEntry sparkUpgrades; public static LexiconEntry rfGenerator; public static LexiconEntry prism; - + public static LexiconEntry poolCart; + public static LexiconEntry functionalIntro; public static LexiconEntry jadedAmaranthus; public static LexiconEntry bellethorne; @@ -371,6 +372,9 @@ public final class LexiconData { prism = new ALexiconEntry(LibLexicon.MANA_PRISM, categoryMana); prism.setLexiconPages(new PageText("0"), new PageText("1"), new PageText("2"), new PageCraftingRecipe("3", ModCraftingRecipes.recipePrism)); + poolCart = new BLexiconEntry(LibLexicon.MANA_POOL_CART, categoryMana); + poolCart.setLexiconPages(new PageText("0"), new PageText("1"), new PageText("2"), new PageCraftingRecipe("3", ModCraftingRecipes.recipePoolCart), new PageCraftingRecipe("4", ModCraftingRecipes.recipePump)); + // 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", ModCraftingRecipes.recipeRedstoneRoot)).setIcon(null);; diff --git a/src/main/java/vazkii/botania/common/lib/LibLexicon.java b/src/main/java/vazkii/botania/common/lib/LibLexicon.java index 3a5823693..2d7543be4 100644 --- a/src/main/java/vazkii/botania/common/lib/LibLexicon.java +++ b/src/main/java/vazkii/botania/common/lib/LibLexicon.java @@ -56,6 +56,7 @@ public final class LibLexicon { public static final String MANA_SPARKS = "sparks"; public static final String MANA_SPARK_UPGRADES = "sparkUpgrades"; public static final String MANA_PRISM = "prism"; + public static final String MANA_POOL_CART = "poolCart"; public static final String FFLOWER_INTRO = "fIntro"; public static final String FFLOWER_JADED_AMARANTHUS = "jadedAmaranthus"; diff --git a/src/main/resources/assets/botania/lang/en_US.lang b/src/main/resources/assets/botania/lang/en_US.lang index b691da416..c938b48f0 100644 --- a/src/main/resources/assets/botania/lang/en_US.lang +++ b/src/main/resources/assets/botania/lang/en_US.lang @@ -1402,6 +1402,14 @@ botania.page.prism1=Right clicking it with any variety of &1Mana Lens&0 sets the botania.page.prism2=It can also be turned off by the use of a redstone signal. botania.page.prism3=Another pixel in the wall +# -- MANA ON RAILS +botania.entry.poolCart=Mana on Rails +botania.page.poolCart0=What could be an easier way to transport &4Mana&0 over large distances than attaching a &1Mana Pool&0 to a &1Minecart&0 and watch it do the merry-go-round? It's simple. Similarly to other types of carts, one can create a &1Minecart with Mana Pool&0 that can store and transport &4Mana&0 on rails.
Breaking the cart while there's any &4Mana&0 in it will waste the &4Mana&0, care should be taken with it. +botania.page.poolCart1=Transfering &4Mana&0 between the cart and a pool is done with a &1Mana Pump&0. It can face any of the four cardinal directions and will transfer &4Mana&0 between a pool adjacent to it and a cart with a pool on an rail opposite to the target pool.
The transfer rate is extremely fast due to the mechanical nature, so fast that overflow is possible, causing &4Mana Loss&0. +botania.page.poolCart2=The side of the pump where the &4Mana&0 will go towards is the pink one, &4Mana&0 is pulled from the blue side.
Lastly, a pool on a cart serves purely for transport, and can not receive, send, transfer or infuse any items with its &4Mana&0. +botania.page.poolCart3=I like trains +botania.page.poolCart4=This is not a pipe + # - FUNCTIONAL FLOWERS # -- AN INTRODUCTION TO FUNCTION botania.entry.fIntro=An Introduction to Function diff --git a/src/main/resources/assets/botania/textures/model/pump.png b/src/main/resources/assets/botania/textures/model/pump.png new file mode 100644 index 000000000..ee73d7d4a Binary files /dev/null and b/src/main/resources/assets/botania/textures/model/pump.png differ