mirror of
https://github.com/GTNewHorizons/MagicBees.git
synced 2026-11-25 06:24:54 +00:00
Cleaned up effect & flower provider alleles. Added basic genome template for Botanical, Blossoming, Floral bees. Added FlowerProviderBotania to grow Mystical Flowers.
26 lines
989 B
Java
26 lines
989 B
Java
package magicbees.bees.allele.effect;
|
|
|
|
import magicbees.api.bees.ITransmutationEffectLogic;
|
|
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 TransmutationEffectVanilla implements ITransmutationEffectLogic {
|
|
@Override
|
|
public boolean tryTransmutation(World world, BiomeGenBase biome, ItemStack sourceBlock, int x, int y, int z) {
|
|
return trySpawnSandstone(world, biome, sourceBlock, x, y, z);
|
|
}
|
|
|
|
private boolean trySpawnSandstone(World world, BiomeGenBase biome, ItemStack sourceBlock, int x, int y, int z) {
|
|
boolean flag = false;
|
|
if (BiomeDictionary.isBiomeOfType(biome, BiomeDictionary.Type.SANDY) && OreDictionary.itemMatches(new ItemStack(Blocks.sand), sourceBlock, false)) {
|
|
world.setBlock(x, y, z, Blocks.sandstone);
|
|
flag = true;
|
|
}
|
|
return flag;
|
|
}
|
|
}
|