Added the Orechid Ignem.

This commit is contained in:
Lizbeth Rika committed 2015-04-30 15:53:51 +01:00
1 parent cf372a9193
commit c91249c78f
12 files changed
+128 -15

No files matched your search

@@ -80,6 +80,7 @@ public final class BotaniaAPI {
public static BiMap<String, String> miniFlowers = HashBiMap.<String, String> create();
public static Map<String, Integer> oreWeights = new HashMap<String, Integer>();
public static Map<String, Integer> oreWeightsNether = new HashMap<String, Integer>();
public static Map<Item, Block> seeds = new HashMap();
public static Set<Item> looniumBlacklist = new LinkedHashSet();
@@ -120,18 +121,15 @@ public final class BotaniaAPI {
addOreWeight("oreAmber", 2075); // Thaumcraft
addOreWeight("oreApatite", 1595); // Forestry
addOreWeight("oreBlueTopaz", 3195); // Ars Magica
addOreWeight("oreCassiterite", 1634); // GregTech
addOreWeight("oreCertusQuartz", 3975); // Applied Energistics
addOreWeight("oreChimerite", 3970); // Ars Magica
addOreWeight("oreCinnabar", 2585); // Thaumcraft
addOreWeight("oreCoal", 46525); // Vanilla
addOreWeight("oreCooperite", 5); // GregTech
addOreWeight("oreCopper", 8325); // IC2, Thermal Expansion, Tinkers' Construct, etc.
addOreWeight("oreDark", 1350); // EvilCraft
addOreWeight("oreDarkIron", 1700); // Factorization
addOreWeight("oreDiamond", 1265); // Vanilla
addOreWeight("oreEmerald", 780); // Vanilla
addOreWeight("oreEmery", 415); // GregTech
addOreWeight("oreGalena", 1000); // Factorization
addOreWeight("oreGold", 2970); // Vanilla
addOreWeight("oreInfusedAir", 925); // Thaumcraft
@@ -140,7 +138,6 @@ public final class BotaniaAPI {
addOreWeight("oreInfusedFire", 925); // Thaumcraft
addOreWeight("oreInfusedOrder", 925); // Thaumcraft
addOreWeight("oreInfusedWater", 925); // Thaumcraft
addOreWeight("oreIridium", 30); // GregTech
addOreWeight("oreIron", 20665); // Vanilla
addOreWeight("oreLapis", 1285); // Vanilla
addOreWeight("oreLead", 7985); // IC2, Thermal Expansion, Factorization, etc.
@@ -151,16 +148,32 @@ public final class BotaniaAPI {
addOreWeight("oreRuby", 1100); // Project RED
addOreWeight("oreSapphire", 1100); // Project RED
addOreWeight("oreSilver", 6300); // Thermal Expansion, Factorization, etc.
addOreWeight("oreSphalerite", 25); // GregTech
addOreWeight("oreSulfur", 1105); // Railcraft
addOreWeight("oreTetrahedrite", 4040); // GregTech
addOreWeight("oreTin", 9450); // IC2, Thermal Expansion, etc.
addOreWeight("oreTungstate", 20); // GregTech
addOreWeight("oreUranium", 1337); // IC2
addOreWeight("oreVinteum", 5925); // Ars Magica
addOreWeight("oreYellorite", 3520); // Big Reactors
addOreWeight("oreZinc", 6485); // Flaxbeard's Steam Power
addOreWeightNether("oreQuartz", 19600); // Vanilla
addOreWeightNether("oreCobalt", 500); // Tinker's Construct
addOreWeightNether("oreArdite", 500); // Tinker's Construct
addOreWeightNether("oreFirestone", 5); // Railcraft
addOreWeightNether("oreNetherCoal", 17000); // Nether Ores
addOreWeightNether("oreNetherCopper", 4700); // Nether Ores
addOreWeightNether("oreNetherDiamond", 175); // Nether Ores
addOreWeightNether("oreNetherEssence", 2460); // Magical Crops
addOreWeightNether("oreNetherGold", 3635); // Nether Ores
addOreWeightNether("oreNetherIron", 5790); // Nether Ores
addOreWeightNether("oreNetherLapis", 3250); // Nether Ores
addOreWeightNether("oreNetherLead", 2790); // Nether Ores
addOreWeightNether("oreNetherNickel", 1790); // Nether Ores
addOreWeightNether("oreNetherPlatinum", 170); // Nether Ores
addOreWeightNether("oreNetherRedstone", 5600); // Nether Ores
addOreWeightNether("oreNetherSilver", 1550); // Nether Ores
addOreWeightNether("oreNetherSteel", 1690); // Nether Ores
addOreWeightNether("oreNetherTin", 3750); // Nether Ores
addSeed(Items.wheat_seeds, Blocks.wheat);
addSeed(Items.potato, Blocks.potatoes);
addSeed(Items.carrot, Blocks.carrots);
@@ -430,11 +443,26 @@ public final class BotaniaAPI {
public static void addOreWeight(String ore, int weight) {
oreWeights.put(ore, weight);
}
/**
* Maps an ore (ore dictionary key) to it's weight on the nether world generation. This
* is used for the Orechid Ignem flower. Check the static block in the BotaniaAPI class
* to get the weights for the vanilla blocks.<br>
* Alternatively get the values with the OreDetector mod:<br>
* https://gist.github.com/Vazkii/9493322
*/
public static void addOreWeightNether(String ore, int weight) {
oreWeightsNether.put(ore, weight);
}
public static int getOreWeight(String ore) {
return oreWeights.get(ore);
}
public static int getOreWeightNether(String ore) {
return oreWeightsNether.get(ore);
}
/**
* Allows an item to be counted as a seed. Any item in this list can be
* dispensed by a dispenser, the block is the block to be placed.
@@ -78,6 +78,7 @@ public class BlockSpecialFlower extends BlockFlower implements ITileEntityProvid
LibBlockNames.SUBTILE_TIGERSEYE,
LibBlockNames.SUBTILE_MARIMORPHOSIS,
LibBlockNames.SUBTILE_ORECHID,
LibBlockNames.SUBTILE_ORECHID_IGNEM,
LibBlockNames.SUBTILE_FALLEN_KANADE,
LibBlockNames.SUBTILE_EXOFLAME,
LibBlockNames.SUBTILE_AGRICARNATION,
@@ -86,6 +86,8 @@ import vazkii.botania.common.block.subtile.functional.SubTileJiyuulia;
import vazkii.botania.common.block.subtile.functional.SubTileLoonuim;
import vazkii.botania.common.block.subtile.functional.SubTileMarimorphosis;
import vazkii.botania.common.block.subtile.functional.SubTileMedumone;
import vazkii.botania.common.block.subtile.functional.SubTileOrechid;
import vazkii.botania.common.block.subtile.functional.SubTileOrechidIgnem;
import vazkii.botania.common.block.subtile.functional.SubTilePollidisiac;
import vazkii.botania.common.block.subtile.functional.SubTileRannuncarpus;
import vazkii.botania.common.block.subtile.functional.SubTileSolegnolia;
@@ -93,7 +95,6 @@ import vazkii.botania.common.block.subtile.functional.SubTileSpectranthemum;
import vazkii.botania.common.block.subtile.functional.SubTileTangleberrie;
import vazkii.botania.common.block.subtile.functional.SubTileTigerseye;
import vazkii.botania.common.block.subtile.functional.SubTileVinculotus;
import vazkii.botania.common.block.subtile.functional.SubtileOrechid;
import vazkii.botania.common.block.subtile.generating.SubTileArcaneRose;
import vazkii.botania.common.block.subtile.generating.SubTileDaybloom;
import vazkii.botania.common.block.subtile.generating.SubTileEndoflame;
@@ -397,7 +398,8 @@ public final class ModBlocks {
BotaniaAPI.registerSubTile(LibBlockNames.SUBTILE_HEISEI_DREAM, SubTileHeiseiDream.class);
BotaniaAPI.registerSubTile(LibBlockNames.SUBTILE_TIGERSEYE, SubTileTigerseye.class);
BotaniaAPI.registerSubTile(LibBlockNames.SUBTILE_JADED_AMARANTHUS, SubTileJadedAmaranthus.class);
BotaniaAPI.registerSubTile(LibBlockNames.SUBTILE_ORECHID, SubtileOrechid.class);
BotaniaAPI.registerSubTile(LibBlockNames.SUBTILE_ORECHID, SubTileOrechid.class);
BotaniaAPI.registerSubTile(LibBlockNames.SUBTILE_ORECHID_IGNEM, SubTileOrechidIgnem.class);
BotaniaAPI.registerSubTile(LibBlockNames.SUBTILE_FALLEN_KANADE, SubTileFallenKanade.class);
BotaniaAPI.registerSubTile(LibBlockNames.SUBTILE_EXOFLAME, SubTileExoflame.class);
registerSubTileWithMini(LibBlockNames.SUBTILE_AGRICARNATION, SubTileAgricarnation.class);
@@ -0,0 +1,48 @@
/**
* 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 the
* Botania License: http://botaniamod.net/license.php
*
* File Created @ [Apr 30, 2015, 3:27:20 PM (GMT)]
*/
package vazkii.botania.common.block.subtile.functional;
import java.util.Map;
import vazkii.botania.api.BotaniaAPI;
import net.minecraft.block.Block;
import net.minecraft.init.Blocks;
public class SubTileOrechidIgnem extends SubTileOrechid {
private static final int COST = 20000;
@Override
public boolean canOperate() {
return supertile.getWorldObj().provider.isHellWorld;
}
@Override
public Map<String, Integer> getOreMap() {
return BotaniaAPI.oreWeightsNether;
}
@Override
public Block getSourceBlock() {
return Blocks.netherrack;
}
@Override
public int getCost() {
return COST;
}
@Override
public int getColor() {
return 0xAE3030;
}
}
@@ -13,6 +13,7 @@ package vazkii.botania.common.block.subtile.functional;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import net.minecraft.block.Block;
import net.minecraft.init.Blocks;
@@ -28,7 +29,7 @@ import vazkii.botania.api.subtile.SubTileFunctional;
import vazkii.botania.common.core.handler.ConfigHandler;
import vazkii.botania.common.lexicon.LexiconData;
public class SubtileOrechid extends SubTileFunctional {
public class SubTileOrechid extends SubTileFunctional {
private static final int COST = 17500;
private static final int RANGE = 5;
@@ -38,7 +39,7 @@ public class SubtileOrechid extends SubTileFunctional {
public void onUpdate() {
super.onUpdate();
if(redstoneSignal > 0)
if(redstoneSignal > 0 || !canOperate())
return;
if(!supertile.getWorldObj().isRemote && mana >= COST && ticksExisted % 100 == 0) {
@@ -62,8 +63,9 @@ public class SubtileOrechid extends SubTileFunctional {
public ItemStack getOreToPut() {
Collection<WeightedRandom.Item> values = new ArrayList();
for(String s : BotaniaAPI.oreWeights.keySet())
values.add(new StringRandomItem(BotaniaAPI.oreWeights.get(s), s));
Map<String, Integer> map = getOreMap();
for(String s : map.keySet())
values.add(new StringRandomItem(map.get(s), s));
String ore = ((StringRandomItem) WeightedRandom.getRandomItem(supertile.getWorldObj().rand, values)).s;
@@ -92,6 +94,7 @@ public class SubtileOrechid extends SubTileFunctional {
public ChunkCoordinates getCoordsToPut() {
List<ChunkCoordinates> possibleCoords = new ArrayList();
Block source = getSourceBlock();
for(int i = -RANGE; i < RANGE + 1; i++)
for(int j = -RANGE_Y; j < RANGE_Y; j++)
for(int k = -RANGE; k < RANGE + 1; k++) {
@@ -99,7 +102,7 @@ public class SubtileOrechid extends SubTileFunctional {
int y = supertile.yCoord + j;
int z = supertile.zCoord + k;
Block block = supertile.getWorldObj().getBlock(x, y, z);
if(block != null && block.isReplaceableOreGen(supertile.getWorldObj(), x, y, z, Blocks.stone))
if(block != null && block.isReplaceableOreGen(supertile.getWorldObj(), x, y, z, source))
possibleCoords.add(new ChunkCoordinates(x, y, z));
}
@@ -107,6 +110,22 @@ public class SubtileOrechid extends SubTileFunctional {
return null;
return possibleCoords.get(supertile.getWorldObj().rand.nextInt(possibleCoords.size()));
}
public boolean canOperate() {
return true;
}
public Map<String, Integer> getOreMap() {
return BotaniaAPI.oreWeights;
}
public Block getSourceBlock() {
return Blocks.stone;
}
public int getCost() {
return COST;
}
@Override
public RadiusDescriptor getRadius() {
@@ -125,7 +144,7 @@ public class SubtileOrechid extends SubTileFunctional {
@Override
public int getMaxMana() {
return COST;
return getCost();
}
@Override
@@ -52,6 +52,7 @@ public final class ModPetalRecipes {
public static RecipePetals heiseiDreamRecipe;
public static RecipePetals tigerseyeRecipe;
public static RecipePetals orechidRecipe;
public static RecipePetals orechidIgnemRecipe;
public static RecipePetals fallenKanadeRecipe;
public static RecipePetals exoflameRecipe;
public static RecipePetals agricarnationRecipe;
@@ -94,6 +95,7 @@ public final class ModPetalRecipes {
heiseiDreamRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_HEISEI_DREAM), purpleMana, pinkMana, magentaMana, purple, pink, magenta, runeWrath, pixieDust);
tigerseyeRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_TIGERSEYE), yellow, brownMana, orangeMana, lime, runeAutumn);
orechidRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_ORECHID), gray, grayMana, lightGray, lightGrayMana, lightBlue, yellow, green, red, runePride, runeSloth, redstoneRoot, pixieDust);
orechidIgnemRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_ORECHID_IGNEM), red, redMana, black, blackMana, white, white, blue, yellow, runePride, runeSloth, redstoneRoot, pixieDust);
if(ConfigHandler.fallenKanadeEnabled)
fallenKanadeRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_FALLEN_KANADE), white, whiteMana, whiteMana, yellowMana, orangeMana, brownMana, runeSpring);
exoflameRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_EXOFLAME), red, redMana, redMana, gray, lightGray, runeFire, runeSummer);
@@ -95,6 +95,7 @@ public final class LexiconData {
public static LexiconEntry heiseiDream;
public static LexiconEntry tigerseye;
public static LexiconEntry orechid;
public static LexiconEntry orechidIgnem;
public static LexiconEntry fallenKanade;
public static LexiconEntry exoflame;
public static LexiconEntry agricarnation;
@@ -411,6 +412,9 @@ public final class LexiconData {
orechid = new ALexiconEntry(LibLexicon.FFLOWER_ORECHID, categoryFunctionalFlowers);
orechid.setLexiconPages(new PageText("0"), new PagePetalRecipe("1", ModPetalRecipes.orechidRecipe));
orechidIgnem = new ALexiconEntry(LibLexicon.FFLOWER_ORECHID_IGNEM, categoryFunctionalFlowers);
orechidIgnem.setLexiconPages(new PageText("0"), new PagePetalRecipe("1", ModPetalRecipes.orechidIgnemRecipe));
if(ConfigHandler.fallenKanadeEnabled) {
fallenKanade = new BLexiconEntry(LibLexicon.FFLOWER_FALLEN_KANADE, categoryFunctionalFlowers);
fallenKanade.setLexiconPages(new PageText(Botania.bloodMagicLoaded ? "0a" : "0"), new PagePetalRecipe("1", ModPetalRecipes.fallenKanadeRecipe), new PageText("2"));
@@ -123,6 +123,7 @@ public final class LibBlockNames {
public static final String SUBTILE_MARIMORPHOSIS = "marimorphosis";
public static final String SUBTILE_BUBBELL = "bubbell";
public static final String SUBTILE_SOLEGNOLIA = "solegnolia";
public static final String SUBTILE_ORECHID_IGNEM = "orechidIgnem";
public static final String QUARTZ_DARK = "Dark";
public static final String QUARTZ_MANA = "Mana";
@@ -67,6 +67,7 @@ public final class LibLexicon {
public static final String FFLOWER_HEISEI_DREAM = "heiseiDream";
public static final String FFLOWER_TIGERSEYE = "tigerseye";
public static final String FFLOWER_ORECHID = "orechid";
public static final String FFLOWER_ORECHID_IGNEM = "orechidIgnem";
public static final String FFLOWER_FALLEN_KANADE = "fallenKanade";
public static final String FFLOWER_EXOFLAME = "exoflame";
public static final String FFLOWER_AGRICARNATION = "agricarnation";
@@ -965,6 +965,8 @@ tile.botania:flower.jadedAmaranthus.name=Jaded Amaranthus
tile.botania:flower.jadedAmaranthus.reference=A couple died for this
tile.botania:flower.orechid.name=Orechid
tile.botania:flower.orechid.reference=I seed what you did there
tile.botania:flower.orechidIgnem.name=Orechid Ignem
tile.botania:flower.orechidIgnem.reference=Red like roses
tile.botania:flower.fallenKanade.name=Fallen Kanade
tile.botania:flower.fallenKanade.reference=I'm not an Angel
tile.botania:flower.exoflame.name=Exoflame
@@ -1679,6 +1681,11 @@ botania.entry.orechid=Orechid
botania.page.orechid0=While going mining is all good, a renewable means of getting ore is due. The &1Orechid&0 will use (a massive amount of) &4Mana&0 to generate &4ores&0 in nearby &1Stone&0 blocks.<br>The ores it generates are random, but seem to be biased towards more common ores rather than rarer ones.
botania.page.orechid1=&oNot dragon poop&r.
# -- ORECHID IGNEM
botania.entry.orechidIgnem=Orechid Ignem
botania.page.orechidIgnem0=The &1Orechid&0 is a great flower. The ability to create raw ores with &4Mana&0 can be a great boon to any sedentary botanist's life. It, however, can't create ores from the &4Nether&0. Getting that sorted out is easy, by switching the petals a bit, it'll create &4Nether&0 ores in &1Netherrack&0 instead. The flower must be in the &4Nether&0 to work.
botania.page.orechidIgnem1=&oGetting hot in here&r.
# -- FALLEN KANADE
botania.entry.fallenKanade=Fallen Kanade
botania.page.fallenKanade0=The &1Fallen Kanade&0 is a flower with angelic properties, it'll use &4Mana&0 from nearby &4Mana Pools&0 in order to apply a regeneration effect to any &4players&0 nearby.
Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB