mirror of
https://github.com/GTNewHorizons/MagicBees.git
synced 2026-11-18 19:39:06 +00:00
Breaking effect alleles and flower providers into their own namespace.
Cleaned up effect & flower provider alleles. Added basic genome template for Botanical, Blossoming, Floral bees. Added FlowerProviderBotania to grow Mystical Flowers.
This commit is contained in:
1 parent
eeb6cb356d
commit
7afda32063
23 files changed
+604
-690
No files matched your search
@@ -0,0 +1,49 @@
|
||||
package magicbees.bees.allele.effect;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import magicbees.api.bees.ITransmutationEffectLogic;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.biome.BiomeGenBase;
|
||||
import net.minecraftforge.common.BiomeDictionary;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
public class TransmutationEffectRailcraft implements ITransmutationEffectLogic {
|
||||
@Override
|
||||
public boolean tryTransmutation(World world, BiomeGenBase biome, ItemStack sourceBlock, int x, int y, int z) {
|
||||
boolean flag = false;
|
||||
if (OreDictionary.itemMatches(new ItemStack(Blocks.stone), sourceBlock, false)
|
||||
|| OreDictionary.itemMatches(new ItemStack(Blocks.cobblestone), sourceBlock, false)) {
|
||||
flag = trySpawnQuarriedStone(world, biome, sourceBlock, x, y, z) || trySpawnAbyssalStone(world, biome, sourceBlock, x, y, z);
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
private boolean trySpawnQuarriedStone(World world, BiomeGenBase biome, ItemStack sourceBlock, int x, int y, int z) {
|
||||
boolean flag = false;
|
||||
if (BiomeDictionary.isBiomeOfType(biome, BiomeDictionary.Type.FOREST) && !BiomeDictionary.isBiomeOfType(biome, BiomeDictionary.Type.SNOWY)) {
|
||||
ItemStack item = GameRegistry.findItemStack("Railcraft", "cube.stone.quarried", 1);
|
||||
if (item != null) {
|
||||
world.setBlock(x, y, z, Block.getBlockFromItem(item.getItem()), item.getItemDamage(), 2);
|
||||
flag = true;
|
||||
}
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
private boolean trySpawnAbyssalStone(World world, BiomeGenBase biome, ItemStack sourceBlock, int x, int y, int z) {
|
||||
boolean flag = false;
|
||||
if (BiomeDictionary.isBiomeOfType(biome, BiomeDictionary.Type.WATER) && !biome.biomeName.toLowerCase(Locale.ENGLISH).contains("river")) {
|
||||
ItemStack item = GameRegistry.findItemStack("Railcraft", "cube.stone.abyssal", 1);
|
||||
if (item != null) {
|
||||
world.setBlock(x, y, z, Block.getBlockFromItem(item.getItem()), item.getItemDamage(), 2);
|
||||
flag = true;
|
||||
}
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user