mirror of
https://github.com/GTNewHorizons/MagicBees.git
synced 2026-11-25 06:24:54 +00:00
31 lines
1.2 KiB
Java
31 lines
1.2 KiB
Java
package magicbees.bees.allele.effect;
|
|
|
|
import net.minecraft.item.ItemStack;
|
|
import net.minecraft.world.World;
|
|
import net.minecraft.world.biome.BiomeGenBase;
|
|
import net.minecraftforge.oredict.OreDictionary;
|
|
|
|
import magicbees.api.bees.ITransmutationEffectLogic;
|
|
import magicbees.main.utils.compat.BotaniaHelper;
|
|
|
|
public class TransmutationEffectLBotaniaLiving implements ITransmutationEffectLogic {
|
|
|
|
@Override
|
|
public boolean tryTransmutation(World world, BiomeGenBase biome, ItemStack sourceBlock, int x, int y, int z) {
|
|
int[] oreIDs = OreDictionary.getOreIDs(sourceBlock);
|
|
for (int oreId : oreIDs) {
|
|
if (oreId == OreDictionary.getOreID("logWood")) {
|
|
world.setBlock(x, y, z, BotaniaHelper.blockLivingWood);
|
|
return true;
|
|
} else if (oreId == OreDictionary.getOreID("stone")) {
|
|
world.setBlock(x, y, z, BotaniaHelper.blockLivingRock);
|
|
return true;
|
|
} else if (oreId == OreDictionary.getOreID("livingwood")) {
|
|
world.setBlock(x, y, z, BotaniaHelper.blockDreamWood);
|
|
return true;
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
}
|