use of com.bewitchment.common.block.tools.BlockCandle in project Bewitchment by Um-Mitternacht.
the class TileEntityWitchAltar method getGain.
private int getGain(BlockPos pos, boolean[] types) {
IBlockState blockState = getWorld().getBlockState(pos);
if (blockState.getBlock().equals(Blocks.SKULL)) {
if (types[0])
return 0;
types[0] = true;
TileEntitySkull tes = (TileEntitySkull) world.getTileEntity(pos);
switch(tes.getSkullType()) {
case 0:
case 2:
case 4:
// Zombie, Skeleton and creeper
return 1;
case 1:
case 3:
// Wither skull and player skull
return 2;
case 5:
// Ender dragon
return 4;
default:
return 0;
}
} else if (blockState.getBlock().equals(Blocks.TORCH)) {
if (types[1])
return 0;
types[1] = true;
return 1;
} else if (blockState.getBlock().equals(Blocks.FLOWER_POT)) {
if (blockState.getBlock().hasTileEntity(blockState)) {
TileEntityFlowerPot tefp = (TileEntityFlowerPot) world.getTileEntity(pos);
if (!tefp.getFlowerItemStack().isEmpty()) {
if (types[2])
return 0;
types[2] = true;
return 1;
}
}
// TODO: Change the way gems are stored on an altar. Use a ritual plate. Pick them up via the oredict, to increase mod support.
} else if (blockState.getBlock().equals(Blocks.DIAMOND_BLOCK)) {
return 325;
} else if (blockState.getBlock().equals(Blocks.EMERALD_BLOCK)) {
return 275;
} else if (blockState.getBlock().equals(ModBlocks.moldavite_block)) {
return 225;
} else if (blockState.getBlock().equals(ModBlocks.alexandrite_block)) {
return 225;
} else if (blockState.getBlock().equals(ModBlocks.nuummite_block)) {
return 225;
} else if (blockState.getBlock().equals(ModBlocks.garnet_block)) {
return 225;
} else if (blockState.getBlock().equals(ModBlocks.amethyst_block)) {
return 225;
} else if (blockState.getBlock().equals(ModBlocks.tourmaline_block)) {
return 225;
} else if (blockState.getBlock().equals(ModBlocks.tigers_eye_block)) {
return 225;
} else if (blockState.getBlock().equals(ModBlocks.malachite_block)) {
return 225;
} else if (blockState.getBlock().equals(ModBlocks.bloodstone_block)) {
return 225;
} else if (blockState.getBlock().equals(ModBlocks.jasper_block)) {
return 225;
} else if (blockState.getBlock().equals(Blocks.LAPIS_BLOCK)) {
return 225;
} else if (blockState.getBlock().equals(Blocks.QUARTZ_BLOCK)) {
return 225;
} else if (blockState.getBlock().equals(Blocks.REDSTONE_BLOCK)) {
return 200;
} else if (blockState.getBlock() instanceof BlockCandle) {
if (types[1])
return 0;
types[1] = true;
return 2;
// } else if (blockState.getBlock().equals(ModBlocks.ritual_candle)) {
// if (types[1]) return 0;
// types[1]=true;
// return 2;
}
return 0;
}
Aggregations