mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-26 06:52:58 +00:00
Added the Black Lotus.
This commit is contained in:
1 parent
6d5653d6c6
commit
598ce7f98f
16 files changed
+223
-16
No files matched your search
@@ -0,0 +1,26 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. 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 a
|
||||
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
|
||||
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
|
||||
*
|
||||
* File Created @ [Jan 18, 2015, 12:20:44 AM (GMT)]
|
||||
*/
|
||||
package vazkii.botania.api.item;
|
||||
|
||||
import vazkii.botania.api.mana.IManaPool;
|
||||
|
||||
/**
|
||||
* Used to define a Mana Pool that can be dyed through floral powder.
|
||||
*/
|
||||
public interface IDyablePool {
|
||||
|
||||
public int getColor();
|
||||
|
||||
public void setColor(int color);
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. 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 a
|
||||
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
|
||||
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
|
||||
*
|
||||
* File Created @ [Jan 18, 2015, 12:10:00 AM (GMT)]
|
||||
*/
|
||||
package vazkii.botania.api.item;
|
||||
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import vazkii.botania.api.mana.IManaPool;
|
||||
|
||||
/**
|
||||
* An item that implements this will have a function called when its standing atop
|
||||
* a mana pool.
|
||||
*/
|
||||
public interface IManaDissolvable {
|
||||
|
||||
/**
|
||||
* Called for every tick the item is on a mana pool. If the stack has stack
|
||||
* size 0 the item is killed. This is called in both the server and client.
|
||||
*/
|
||||
public void onDissolveTick(IManaPool pool, ItemStack stack, EntityItem item);
|
||||
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
@API(owner = "Botania", apiVersion = "28", provides = "BotaniaAPI")
|
||||
@API(owner = "Botania", apiVersion = "29", provides = "BotaniaAPI")
|
||||
package vazkii.botania.api;
|
||||
import cpw.mods.fml.common.API;
|
||||
|
||||
@@ -31,6 +31,8 @@ import net.minecraft.util.StatCollector;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import vazkii.botania.api.BotaniaAPI;
|
||||
import vazkii.botania.api.item.IDyablePool;
|
||||
import vazkii.botania.api.item.IManaDissolvable;
|
||||
import vazkii.botania.api.mana.IKeyLocked;
|
||||
import vazkii.botania.api.mana.IManaItem;
|
||||
import vazkii.botania.api.mana.IManaPool;
|
||||
@@ -49,7 +51,7 @@ import vazkii.botania.common.core.handler.ManaNetworkHandler;
|
||||
import vazkii.botania.common.core.helper.Vector3;
|
||||
import vazkii.botania.common.item.ModItems;
|
||||
|
||||
public class TilePool extends TileMod implements IManaPool, IKeyLocked, ISparkAttachable {
|
||||
public class TilePool extends TileMod implements IManaPool, IDyablePool, IKeyLocked, ISparkAttachable {
|
||||
|
||||
public static final int MAX_MANA = 1000000;
|
||||
public static final int MAX_MANA_DILLUTED = 10000;
|
||||
@@ -111,7 +113,7 @@ public class TilePool extends TileMod implements IManaPool, IKeyLocked, ISparkAt
|
||||
}
|
||||
|
||||
public boolean collideEntityItem(EntityItem item) {
|
||||
if(item.isDead || item.age > 100 && item.age < 130 || !catalystsRegistered)
|
||||
if(item.isDead)
|
||||
return false;
|
||||
|
||||
boolean didChange = false;
|
||||
@@ -119,17 +121,15 @@ public class TilePool extends TileMod implements IManaPool, IKeyLocked, ISparkAt
|
||||
if(stack == null)
|
||||
return false;
|
||||
|
||||
if(stack.getItem() == ModItems.dye && !worldObj.isRemote) {
|
||||
int meta = stack.getItemDamage();
|
||||
if(meta != color) {
|
||||
color = meta;
|
||||
stack.stackSize--;
|
||||
if(stack.stackSize == 0)
|
||||
item.setDead();
|
||||
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
|
||||
}
|
||||
if(stack.getItem() instanceof IManaDissolvable) {
|
||||
((IManaDissolvable) stack.getItem()).onDissolveTick(this, stack, item);
|
||||
if(stack.stackSize == 0)
|
||||
item.setDead();
|
||||
}
|
||||
|
||||
if((item.age > 100 && item.age < 130) || !catalystsRegistered)
|
||||
return false;
|
||||
|
||||
for(RecipeManaInfusion recipe : BotaniaAPI.manaInfusionRecipes) {
|
||||
if(recipe.matches(stack) && (!recipe.isAlchemy() || alchemy) && (!recipe.isConjuration() || conjuration) && (getBlockMetadata() != 2 || recipe.getOutput().getItem() == Item.getItemFromBlock(getBlockType()))) {
|
||||
int mana = recipe.getManaToConsume();
|
||||
@@ -366,4 +366,14 @@ public class TilePool extends TileMod implements IManaPool, IKeyLocked, ISparkAt
|
||||
public int getAvailableSpaceForMana() {
|
||||
return Math.max(0, manaCap - getCurrentMana());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getColor() {
|
||||
return color;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setColor(int color) {
|
||||
this.color = color;
|
||||
}
|
||||
}
|
||||
@@ -64,6 +64,7 @@ public final class BotaniaCreativeTab extends CreativeTabs {
|
||||
addItem(ModItems.dye);
|
||||
addItem(ModItems.fertilizer);
|
||||
addItem(ModItems.grassSeeds);
|
||||
addItem(ModItems.blackLotus);
|
||||
addItem(ModItems.twigWand);
|
||||
addItem(ModItems.manaResource);
|
||||
addBlock(ModBlocks.storage);
|
||||
|
||||
@@ -25,11 +25,25 @@ public final class ChestGenHandler {
|
||||
c = ChestGenHooks.STRONGHOLD_CORRIDOR;
|
||||
ChestGenHooks.addItem(c, new WeightedRandomChestContent(new ItemStack(ModItems.manaResource, 1, 1), 1, 1, 8));
|
||||
ChestGenHooks.addItem(c, new WeightedRandomChestContent(new ItemStack(ModItems.manaResource, 1, 1), 1, 3, 2));
|
||||
|
||||
ChestGenHooks.addItem(c, new WeightedRandomChestContent(new ItemStack(ModItems.blackLotus), 1, 1, 6));
|
||||
|
||||
c = ChestGenHooks.DUNGEON_CHEST;
|
||||
ChestGenHooks.addItem(c, new WeightedRandomChestContent(new ItemStack(ModItems.manaResource, 1, 0), 1, 5, 9));
|
||||
ChestGenHooks.addItem(c, new WeightedRandomChestContent(new ItemStack(ModItems.lexicon), 1, 1, 6));
|
||||
ChestGenHooks.addItem(c, new WeightedRandomChestContent(new ItemStack(ModItems.manaBottle), 1, 1, 5));
|
||||
ChestGenHooks.addItem(c, new WeightedRandomChestContent(new ItemStack(ModItems.blackLotus), 1, 1, 6));
|
||||
|
||||
c = ChestGenHooks.PYRAMID_DESERT_CHEST;
|
||||
ChestGenHooks.addItem(c, new WeightedRandomChestContent(new ItemStack(ModItems.blackLotus), 1, 1, 6));
|
||||
|
||||
c = ChestGenHooks.MINESHAFT_CORRIDOR;
|
||||
ChestGenHooks.addItem(c, new WeightedRandomChestContent(new ItemStack(ModItems.blackLotus), 1, 1, 6));
|
||||
|
||||
c = ChestGenHooks.PYRAMID_JUNGLE_DISPENSER;
|
||||
ChestGenHooks.addItem(c, new WeightedRandomChestContent(new ItemStack(ModItems.blackLotus), 1, 1, 6));
|
||||
|
||||
c = ChestGenHooks.VILLAGE_BLACKSMITH;
|
||||
ChestGenHooks.addItem(c, new WeightedRandomChestContent(new ItemStack(ModItems.blackLotus), 1, 1, 6));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. 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 a
|
||||
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
|
||||
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
|
||||
*
|
||||
* File Created @ [Jan 18, 2015, 12:17:10 AM (GMT)]
|
||||
*/
|
||||
package vazkii.botania.common.item;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import vazkii.botania.api.item.IManaDissolvable;
|
||||
import vazkii.botania.api.mana.IManaPool;
|
||||
import vazkii.botania.common.Botania;
|
||||
import vazkii.botania.common.lib.LibItemNames;
|
||||
|
||||
public class ItemBlackLotus extends ItemMod implements IManaDissolvable {
|
||||
|
||||
private static final int MANA_PER = 8000;
|
||||
private static final int MANA_PER_T2 = 100000;
|
||||
|
||||
public ItemBlackLotus() {
|
||||
setUnlocalizedName(LibItemNames.BLACK_LOTUS);
|
||||
setHasSubtypes(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getSubItems(Item item, CreativeTabs tab, List list) {
|
||||
for(int i = 0; i < 2; i++)
|
||||
list.add(new ItemStack(item, 1, i));
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasEffect(ItemStack par1ItemStack, int pass) {
|
||||
return par1ItemStack.getItemDamage() > 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack par1ItemStack) {
|
||||
return super.getUnlocalizedName(par1ItemStack) + par1ItemStack.getItemDamage();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDissolveTick(IManaPool pool, ItemStack stack, EntityItem item) {
|
||||
if(pool.isFull() || pool.getCurrentMana() == 0)
|
||||
return;
|
||||
|
||||
TileEntity tile = (TileEntity) pool;
|
||||
boolean t2 = stack.getItemDamage() > 0;
|
||||
|
||||
if(!item.worldObj.isRemote) {
|
||||
pool.recieveMana(t2 ? MANA_PER_T2 : MANA_PER);
|
||||
stack.stackSize--;
|
||||
item.worldObj.markBlockForUpdate(tile.xCoord, tile.yCoord, tile.zCoord);
|
||||
}
|
||||
|
||||
for(int i = 0; i < 50; i++) {
|
||||
float r = (float) Math.random() * 0.25F;
|
||||
float g = 0F;
|
||||
float b = (float) Math.random() * 0.25F;
|
||||
float s = 0.45F * (float) Math.random() * 0.25F;
|
||||
|
||||
float m = 0.045F;
|
||||
float mx = ((float) Math.random() - 0.5F) * m;
|
||||
float my = (float) Math.random() * m;
|
||||
float mz = ((float) Math.random() - 0.5F) * m;
|
||||
|
||||
Botania.proxy.wispFX(item.worldObj, item.posX, tile.yCoord + 0.5F, item.posZ, r, g, b, s, mx, my, mz);
|
||||
}
|
||||
item.worldObj.playSoundAtEntity(item, "botania:blackLotus", 0.5F, t2 ? 0.1F : 1F);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean adv) {
|
||||
list.add(StatCollector.translateToLocal("botaniamisc.lotusDesc"));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -187,6 +187,7 @@ public final class ModItems {
|
||||
public static Item holyCloak;
|
||||
public static Item unholyCloak;
|
||||
public static Item craftingHalo;
|
||||
public static Item blackLotus;
|
||||
|
||||
public static void init() {
|
||||
lexicon = new ItemLexicon();
|
||||
@@ -285,6 +286,7 @@ public final class ModItems {
|
||||
holyCloak = new ItemHolyCloak();
|
||||
unholyCloak = new ItemUnholyCloak();
|
||||
craftingHalo = new ItemCraftingHalo();
|
||||
blackLotus = new ItemBlackLotus();
|
||||
|
||||
OreDictionary.registerOre(LibOreDict.LEXICON, lexicon);
|
||||
for(int i = 0; i < 16; i++) {
|
||||
|
||||
@@ -12,14 +12,19 @@
|
||||
package vazkii.botania.common.item.material;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import vazkii.botania.api.item.IDyablePool;
|
||||
import vazkii.botania.api.item.IManaDissolvable;
|
||||
import vazkii.botania.api.mana.IManaPool;
|
||||
import vazkii.botania.common.item.Item16Colors;
|
||||
import vazkii.botania.common.lib.LibItemNames;
|
||||
|
||||
public class ItemDye extends Item16Colors {
|
||||
public class ItemDye extends Item16Colors implements IManaDissolvable {
|
||||
|
||||
public ItemDye() {
|
||||
super(LibItemNames.DYE);
|
||||
@@ -37,4 +42,18 @@ public class ItemDye extends Item16Colors {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDissolveTick(IManaPool pool, ItemStack stack, EntityItem item) {
|
||||
if(!item.worldObj.isRemote && pool instanceof IDyablePool) {
|
||||
IDyablePool dyable = (IDyablePool) pool;
|
||||
TileEntity tile = (TileEntity) pool;
|
||||
int meta = stack.getItemDamage();
|
||||
if(meta != dyable.getColor()) {
|
||||
dyable.setColor(meta);
|
||||
stack.stackSize--;
|
||||
item.worldObj.markBlockForUpdate(tile.xCoord, tile.yCoord, tile.zCoord);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -11,6 +11,8 @@
|
||||
*/
|
||||
package vazkii.botania.common.lexicon;
|
||||
|
||||
import org.apache.logging.log4j.core.pattern.AbstractStyleNameConverter.Black;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import vazkii.botania.api.BotaniaAPI;
|
||||
import vazkii.botania.api.lexicon.LexiconCategory;
|
||||
@@ -53,6 +55,7 @@ public final class LexiconData {
|
||||
public static LexiconEntry pureDaisy;
|
||||
public static LexiconEntry runicAltar;
|
||||
public static LexiconEntry terrasteel;
|
||||
public static LexiconEntry blackLotus;
|
||||
|
||||
public static LexiconEntry manaIntro;
|
||||
public static LexiconEntry spreader;
|
||||
@@ -244,6 +247,9 @@ public final class LexiconData {
|
||||
terrasteel = new BLexiconEntry(LibLexicon.BASICS_TERRASTEEL, categoryBasics);
|
||||
terrasteel.setLexiconPages(new PageText("0"), new PageCraftingRecipe("1", ModCraftingRecipes.recipeTerraPlate), new PageText("2"), new PageTerrasteel("3"));
|
||||
|
||||
blackLotus = new BLexiconEntry(LibLexicon.BASICS_BLACK_LOTUS, categoryBasics);
|
||||
blackLotus.setLexiconPages(new PageText("0"));
|
||||
|
||||
if(Botania.thaumcraftLoaded)
|
||||
new BLexiconEntry("wrap", categoryBasics).setLexiconPages(new PageText("0")); // lel
|
||||
|
||||
|
||||
@@ -110,7 +110,8 @@ public final class LibItemNames {
|
||||
public static final String HOLY_CLOAK = "holyCloak";
|
||||
public static final String UNHOLY_CLOAK = "unholyCloak";
|
||||
public static final String CRAFTING_HALO = "craftingHalo";
|
||||
|
||||
public static final String BLACK_LOTUS = "blackLotus";
|
||||
|
||||
public static final String[] LENS_NAMES = new String[] {
|
||||
"lensNormal",
|
||||
"lensSpeed",
|
||||
|
||||
@@ -33,7 +33,8 @@ public final class LibLexicon {
|
||||
public static final String BASICS_PURE_DAISY = "pureDaisy";
|
||||
public static final String BASICS_RUNE_ALTAR = "runeAltar";
|
||||
public static final String BASICS_TERRASTEEL = "terrasteel";
|
||||
|
||||
public static final String BASICS_BLACK_LOTUS = "blackLotus";
|
||||
|
||||
public static final String MANA_INTRO = "mIntro";
|
||||
public static final String MANA_SPREADER = "spreader";
|
||||
public static final String MANA_POOL = "pool";
|
||||
|
||||
@@ -71,6 +71,7 @@ botaniamisc.getALife=Get a Life
|
||||
botaniamisc.floatingPrefix=Floating %s
|
||||
botaniamisc.unsetRecipe=[No Recipe] Right click to set:
|
||||
botaniamisc.cantCraft=Not enough Materials!
|
||||
botaniamisc.lotusDesc=It emits strong magical vibes
|
||||
|
||||
# NEI INTEGRATION
|
||||
botania.nei.brewery=Botanical Brewery
|
||||
@@ -799,6 +800,8 @@ item.botania:missileRod.name=Rod of the Unstable Reservoir
|
||||
item.botania:holyCloak.name=Cloak of Virtue
|
||||
item.botania:unholyCloak.name=Cloak of Sin
|
||||
item.botania:craftingHalo.name=Assembly Halo
|
||||
item.botania:blackLotus0.name=Black Lotus
|
||||
item.botania:blackLotus1.name=Void Lotus
|
||||
|
||||
# BREW NAMES
|
||||
botania.brew.fallback=Fallback
|
||||
@@ -932,6 +935,10 @@ botania.page.terrasteel1=Creating the plate
|
||||
botania.page.terrasteel2=After the plate is set up and ready to receive &4Mana&0, tossing a single &1Manasteel Ingot, Mana Diamond and Mana Pearl&0 on top of it will begin the infusion.<br>Picking up any of the items will halt the infusion causing severe &4Mana Loss&0. The infusion uses half a &1Mana Pool&0 total to create a single piece of &4Terrasteel&0, multiple &1Sparks&0 would make it go faster, too.
|
||||
botania.page.terrasteel3=The pattern for creating &1Terrasteel&0
|
||||
|
||||
# -- BLACK LOTUS
|
||||
botania.entry.blackLotus=Black Lotus
|
||||
botania.page.blackLotus0=An elusive flower by the name of &1Black Lotus&0 is known to exist, however, it does not grow or reproduce. Where they can be found or come from is not known.<br>It is known, however, that it contains a strong amount of concentrated &4Mana&0, that can be released by putting it in contact with a &1Mana Pool&0 that already has some in it. Just tossing it would do.
|
||||
|
||||
# -- WRAP
|
||||
botania.entry.wrap=Wrap
|
||||
botania.page.wrap0=It seems like the creator of this mod decided to add a weird game mechanic in the form of &1Wrap&0. I don't really know what it does, probably something bad. :/<br>What's this "Fourth Wall" you're talking about...?
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
"agricarnation": { "category": "neutral", "sounds":["agricarnation"] },
|
||||
"altarCraft": { "category": "neutral", "sounds":["altarCraft"] },
|
||||
"bifrostRod": { "category": "neutral", "sounds":["bifrostRod"] },
|
||||
"blackLotus": { "category": "neutral", "sounds":["blackLotus"] },
|
||||
"ding": { "category": "neutral", "sounds":["ding"] },
|
||||
"divaCharm": { "category": "neutral", "sounds":["divaCharm"] },
|
||||
"divinationRod": { "category": "neutral", "sounds":["divinationRod"] },
|
||||
|
||||
Binary file not shown.
Binary file not shown.
|
After Width: | Height: | Size: 3.1 KiB |
Reference in new issue
Block a user