mirror of
https://github.com/GTNewHorizons/MagicBees.git
synced 2026-11-23 21:50:06 +00:00
Spotless
This commit is contained in:
156 files changed
+14896
-13422
No files matched your search
@@ -1,8 +1,7 @@
|
||||
package magicbees.bees.allele.effect;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import java.util.Locale;
|
||||
import magicbees.api.bees.ITransmutationEffectLogic;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.init.Blocks;
|
||||
@@ -13,37 +12,40 @@ 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;
|
||||
}
|
||||
@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 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;
|
||||
}
|
||||
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