Added the Medumone flower.

This commit is contained in:
Lizbeth Rika committed 2015-01-27 21:37:00 +00:00
1 parent f94873ee5b
commit eac9ddaa20
7 files changed
+86 -3

No files matched your search

@@ -83,6 +83,7 @@ public class BlockSpecialFlower extends BlockFlower implements ITileEntityProvid
LibBlockNames.SUBTILE_TANGLEBERRIE,
LibBlockNames.SUBTILE_JIYUULIA,
LibBlockNames.SUBTILE_HYACIDUS,
LibBlockNames.SUBTILE_MEDUMONE,
LibBlockNames.SUBTILE_POLLIDISIAC,
LibBlockNames.SUBTILE_CLAYCONIA,
LibBlockNames.SUBTILE_LOONIUM,
@@ -73,6 +73,7 @@ import vazkii.botania.common.block.subtile.functional.SubTileHyacidus;
import vazkii.botania.common.block.subtile.functional.SubTileJadedAmaranthus;
import vazkii.botania.common.block.subtile.functional.SubTileJiyuulia;
import vazkii.botania.common.block.subtile.functional.SubTileLoonuim;
import vazkii.botania.common.block.subtile.functional.SubTileMedumone;
import vazkii.botania.common.block.subtile.functional.SubTilePollidisiac;
import vazkii.botania.common.block.subtile.functional.SubTileRannuncarpus;
import vazkii.botania.common.block.subtile.functional.SubTileSpectranthemum;
@@ -347,6 +348,7 @@ public final class ModBlocks {
BotaniaAPI.registerSubTile(LibBlockNames.SUBTILE_DAFFOMILL, SubTileDaffomill.class);
BotaniaAPI.registerSubTile(LibBlockNames.SUBTILE_VINCULOTUS, SubTileVinculotus.class);
BotaniaAPI.registerSubTile(LibBlockNames.SUBTILE_SPECTRANTHEMUM, SubTileSpectranthemum.class);
BotaniaAPI.registerSubTile(LibBlockNames.SUBTILE_MEDUMONE, SubTileMedumone.class);
}
private static void registerTile(Class<? extends TileEntity> clazz, String key) {
@@ -0,0 +1,66 @@
/**
* 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 27, 2015, 7:33:17 PM (GMT)]
*/
package vazkii.botania.common.block.subtile.functional;
import java.util.List;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
import net.minecraft.util.AxisAlignedBB;
import vazkii.botania.api.lexicon.LexiconEntry;
import vazkii.botania.api.subtile.SubTileFunctional;
import vazkii.botania.common.lexicon.LexiconData;
public class SubTileMedumone extends SubTileFunctional {
@Override
public void onUpdate() {
super.onUpdate();
final int range = 6;
if(mana > 0) {
List<EntityLivingBase> entities = supertile.getWorldObj().getEntitiesWithinAABB(EntityLivingBase.class, AxisAlignedBB.getBoundingBox(supertile.xCoord - range, supertile.yCoord, supertile.zCoord - range, supertile.xCoord + range, supertile.yCoord + 1, supertile.zCoord + range));
for(EntityLivingBase entity : entities)
if(!(entity instanceof EntityPlayer)) {
entity.addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, 2, 100));
mana--;
if(mana == 0)
return;
}
}
}
@Override
public boolean acceptsRedstone() {
return true;
}
@Override
public int getColor() {
return 0x3D2204;
}
@Override
public int getMaxMana() {
return 4000;
}
@Override
public LexiconEntry getEntry() {
return LexiconData.medumone;
}
}
@@ -64,7 +64,8 @@ public final class ModPetalRecipes {
public static RecipePetals daffomillRecipe;
public static RecipePetals vinculotusRecipe;
public static RecipePetals spectranthemumRecipe;
public static RecipePetals medumoneRecipe;
public static void init() {
pureDaisyRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_PUREDAISY), white, white, white, white);
manastarRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_MANASTAR), lightBlueMana, greenMana, redMana, cyanMana);
@@ -101,6 +102,7 @@ public final class ModPetalRecipes {
daffomillRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_DAFFOMILL), white, whiteMana, brown, yellowMana, runeAir, redstoneRoot);
vinculotusRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_VINCULOTUS), purpleMana, purpleMana, lime, black, blackMana, black, runeWater, runeSloth, runeLust, redstoneRoot);
spectranthemumRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_SPECTRANTHEMUM), whiteMana, whiteMana, white, white, cyan, runeEnvy, runeWater, redstoneRoot, pixieDust);
medumoneRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_MEDUMONE), brown, brown, brownMana, gray, grayMana, runeEarth, redstoneRoot);
ItemStack stack = new ItemStack(Items.skull, 1, 3);
ItemNBTHelper.setString(stack, "SkullOwner", "Vazkii");
@@ -92,6 +92,7 @@ public final class LexiconData {
public static LexiconEntry daffomill;
public static LexiconEntry vinculotus;
public static LexiconEntry spectranthemum;
public static LexiconEntry medumone;
public static LexiconEntry generatingIntro;
public static LexiconEntry daybloom;
@@ -393,6 +394,9 @@ public final class LexiconData {
spectranthemum = new ALexiconEntry(LibLexicon.FFLOWER_SPECTRANTHEMUN, categoryFunctionalFlowers);
spectranthemum.setLexiconPages(new PageText("0"), new PageText("1"), new PageText("2"), new PagePetalRecipe("3", ModPetalRecipes.spectranthemumRecipe));
medumone = new BLexiconEntry(LibLexicon.FFLOWER_MEDUMONE, categoryFunctionalFlowers);
medumone.setLexiconPages(new PageText("0"), new PagePetalRecipe("1", ModPetalRecipes.medumoneRecipe));
// GENERATING FLOWERS ENTRIES
generatingIntro = new BLexiconEntry(LibLexicon.GFLOWER_INTRO, categoryGenerationFlowers);
generatingIntro.setPriority().setLexiconPages(new PageText("0"), new PageText("1"), new PageText("2"));
@@ -73,6 +73,7 @@ public final class LibLexicon {
public static final String FFLOWER_DAFFOMILL = "daffomill";
public static final String FFLOWER_VINCULOTUS = "vinculotus";
public static final String FFLOWER_SPECTRANTHEMUN = "spectranthemum";
public static final String FFLOWER_MEDUMONE = "medumone";
public static final String GFLOWER_INTRO = "gIntro";
public static final String GFLOWER_DAYBLOOM = "daybloom";