Java Code Examples for net.minecraft.init.Biomes#OCEAN

The following examples show how to use net.minecraft.init.Biomes#OCEAN . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CollectorHelper.java    From EmergingTechnology with MIT License 5 votes vote down vote up
public static boolean isInValidBiome(Biome biome) {

        if (EmergingTechnologyConfig.POLYMERS_MODULE.COLLECTOR.biomeRequirementDisabled) {
            return true;
        }

        return biome == Biomes.BEACH || biome == Biomes.OCEAN || biome == Biomes.DEEP_OCEAN;
    }
 
Example 2
Source File: PLEvent.java    From Production-Line with MIT License 5 votes vote down vote up
@SubscribeEvent
public void onBucketFill(FillBucketEvent event) {
    if (event.getEntityPlayer() != null) {
        Biome biome = event.getWorld().getBiomeForCoordsBody(event.getTarget().getBlockPos());
        if (biome == Biomes.OCEAN || biome == Biomes.DEEP_OCEAN || biome == Biomes.FROZEN_OCEAN) {
            event.setResult(Event.Result.ALLOW);
            event.setFilledBucket(new ItemStack(PLItems.saltWaterBucket));
        }
    }
}
 
Example 3
Source File: GenLayerBiomePlanet.java    From AdvancedRocketry with MIT License 5 votes vote down vote up
protected BiomeEntry getWeightedBiomeEntry()
{
	if(biomeEntries == null || biomeEntries.isEmpty())
		return new BiomeEntry(Biomes.OCEAN, 100);

	List<BiomeEntry> biomeList = biomeEntries;
	int totalWeight = WeightedRandom.getTotalWeight(biomeList);
	int weight = nextInt(totalWeight / 10) * 10;
	return (BiomeEntry)WeightedRandom.getRandomItem(biomeList, weight);
}
 
Example 4
Source File: TidalHelper.java    From EmergingTechnology with MIT License 4 votes vote down vote up
public static boolean isInValidBiome(Biome biome) {
    return biome == Biomes.BEACH || biome == Biomes.OCEAN || biome == Biomes.DEEP_OCEAN
            || EmergingTechnologyConfig.ELECTRICS_MODULE.TIDALGENERATOR.biomeRequirementDisabled;
}