Added Sea Oats to the Beach biome
This commit is contained in:
parent
953aa894ae
commit
805e0f772d
12 changed files with 80 additions and 5 deletions
|
@ -131,6 +131,7 @@ public class BOPBiomes
|
|||
public static IExtendedBiome mega_taiga_extension;
|
||||
public static IExtendedBiome mega_taiga_hills_extension;
|
||||
public static IExtendedBiome hell_extension;
|
||||
public static IExtendedBiome beach_extension;
|
||||
|
||||
private static IBiomeRegistry createRegistry()
|
||||
{
|
||||
|
|
|
@ -0,0 +1,26 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2014-2017, the Biomes O' Plenty Team
|
||||
*
|
||||
* This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License.
|
||||
*
|
||||
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
|
||||
******************************************************************************/
|
||||
package biomesoplenty.common.biome.vanilla;
|
||||
|
||||
import biomesoplenty.api.generation.GeneratorStage;
|
||||
import biomesoplenty.common.block.BlockBOPDoublePlant;
|
||||
import biomesoplenty.common.world.generator.GeneratorDoubleFlora;
|
||||
import net.minecraft.block.BlockDoublePlant;
|
||||
import net.minecraft.init.Biomes;
|
||||
import net.minecraft.init.Blocks;
|
||||
|
||||
public class BiomeExtBeach extends ExtendedBiomeWrapper
|
||||
{
|
||||
public BiomeExtBeach()
|
||||
{
|
||||
super(Biomes.BEACH);
|
||||
|
||||
this.addGenerator("sea_oats", GeneratorStage.FLOWERS,(new GeneratorDoubleFlora.Builder()).amountPerChunk(10.0F).placeOn(Blocks.SAND.getDefaultState()).with(BlockBOPDoublePlant.DoublePlantType.SEA_OATS).generationAttempts(128).create());
|
||||
}
|
||||
}
|
||||
|
|
@ -44,7 +44,7 @@ public class BlockBOPDoublePlant extends BlockBOPDoubleDecoration implements ISh
|
|||
// add properties (note we inherit HALF from BlockDoubleDecoration)
|
||||
public enum DoublePlantType implements IStringSerializable
|
||||
{
|
||||
FLAX, TALL_CATTAIL, EYEBULB;
|
||||
FLAX, TALL_CATTAIL, EYEBULB, SEA_OATS;
|
||||
@Override
|
||||
public String getName()
|
||||
{
|
||||
|
@ -149,6 +149,8 @@ public class BlockBOPDoublePlant extends BlockBOPDoubleDecoration implements ISh
|
|||
return BlockQueries.litFertileWaterside.matches(world, lowerPos.down());
|
||||
case EYEBULB:
|
||||
return BlockQueries.hellish.matches(world, lowerPos.down());
|
||||
case SEA_OATS:
|
||||
return BlockQueries.fertileOrSand.matches(world, lowerPos.down());
|
||||
case FLAX: default:
|
||||
return BlockQueries.litFertile.matches(world, lowerPos.down());
|
||||
}
|
||||
|
@ -184,7 +186,7 @@ public class BlockBOPDoublePlant extends BlockBOPDoubleDecoration implements ISh
|
|||
DoublePlantType type = (DoublePlantType) lowerState.getValue(VARIANT);
|
||||
switch (type)
|
||||
{
|
||||
case FLAX:
|
||||
case FLAX: case SEA_OATS:
|
||||
break;
|
||||
case TALL_CATTAIL:
|
||||
ret.add(BlockBOPPlant.paging.getVariantItem(BOPPlants.CATTAIL));
|
||||
|
@ -218,7 +220,7 @@ public class BlockBOPDoublePlant extends BlockBOPDoubleDecoration implements ISh
|
|||
DoublePlantType type = (DoublePlantType) lowerState.getValue(VARIANT);
|
||||
switch (type)
|
||||
{
|
||||
case FLAX:
|
||||
case FLAX: case SEA_OATS:
|
||||
ret.add(this.getVariantItem(type));
|
||||
default:
|
||||
break;
|
||||
|
|
|
@ -20,7 +20,6 @@ import java.util.Map;
|
|||
import java.util.Map.Entry;
|
||||
import java.util.Set;
|
||||
|
||||
import net.minecraftforge.fml.common.registry.ForgeRegistries;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
|
||||
import com.google.common.base.Optional;
|
||||
|
@ -102,6 +101,7 @@ import biomesoplenty.common.biome.overworld.BiomeGenWetland;
|
|||
import biomesoplenty.common.biome.overworld.BiomeGenWhiteBeach;
|
||||
import biomesoplenty.common.biome.overworld.BiomeGenWoodland;
|
||||
import biomesoplenty.common.biome.overworld.BiomeGenXericShrubland;
|
||||
import biomesoplenty.common.biome.vanilla.BiomeExtBeach;
|
||||
import biomesoplenty.common.biome.vanilla.BiomeExtBirchForest;
|
||||
import biomesoplenty.common.biome.vanilla.BiomeExtBirchForestHills;
|
||||
import biomesoplenty.common.biome.vanilla.BiomeExtColdTaiga;
|
||||
|
@ -144,6 +144,7 @@ import net.minecraftforge.common.BiomeDictionary;
|
|||
import net.minecraftforge.common.BiomeDictionary.Type;
|
||||
import net.minecraftforge.common.BiomeManager;
|
||||
import net.minecraftforge.common.DimensionManager;
|
||||
import net.minecraftforge.fml.common.registry.ForgeRegistries;
|
||||
|
||||
public class ModBiomes implements BOPBiomes.IBiomeRegistry
|
||||
{
|
||||
|
@ -389,6 +390,7 @@ public class ModBiomes implements BOPBiomes.IBiomeRegistry
|
|||
taiga_extension = registerWrappedBiome(new BiomeExtTaiga());
|
||||
taiga_hills_extension = registerWrappedBiome(new BiomeExtTaigaHills());
|
||||
hell_extension = registerWrappedBiome(new BiomeExtHell());
|
||||
beach_extension = registerWrappedBiome(new BiomeExtBeach());
|
||||
}
|
||||
|
||||
private static void registerBiomeDictionaryTags()
|
||||
|
|
|
@ -22,6 +22,7 @@ import biomesoplenty.common.util.block.BlockQuery.BlockQueryMaterial;
|
|||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockBush;
|
||||
import net.minecraft.block.BlockDoublePlant;
|
||||
import net.minecraft.block.BlockGrass;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.init.Blocks;
|
||||
|
@ -93,6 +94,28 @@ public class GeneratorDoubleFlora extends GeneratorReplacing
|
|||
{
|
||||
BlockPos genPos = pos.add(random.nextInt(8) - random.nextInt(8), random.nextInt(4) - random.nextInt(4), random.nextInt(8) - random.nextInt(8));
|
||||
|
||||
if (this.with == BOPBlocks.double_plant.getDefaultState().withProperty(BlockBOPDoublePlant.VARIANT, BlockBOPDoublePlant.DoublePlantType.SEA_OATS).withProperty(BlockBOPDoublePlant.HALF, BlockBOPDoubleDecoration.Half.LOWER))
|
||||
{
|
||||
boolean grassCheck = false;
|
||||
|
||||
for (int x = -4; x < 4; ++x)
|
||||
{
|
||||
for (int y = -4; y < 4; ++y)
|
||||
{
|
||||
for (int z = -4; z < 4; ++z)
|
||||
{
|
||||
if (world.getBlockState(genPos.down().add(x, y, z)).getBlock() instanceof BlockGrass)
|
||||
{
|
||||
grassCheck = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!grassCheck) { return false; }
|
||||
}
|
||||
|
||||
if (this.placeOn.matches(world, genPos.down()) && this.replace.matches(world, genPos) && this.replace.matches(world, genPos.up()) && genPos.getY() < 254)
|
||||
{
|
||||
boolean canStay;
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
"half=upper,variant=tall_cattail": { "model": "biomesoplenty:tall_cattail_upper" },
|
||||
"half=lower,variant=tall_cattail": { "model": "biomesoplenty:tall_cattail_lower" },
|
||||
"half=upper,variant=eyebulb": { "model": "biomesoplenty:eyebulb_upper" },
|
||||
"half=lower,variant=eyebulb": { "model": "biomesoplenty:eyebulb_lower" }
|
||||
"half=lower,variant=eyebulb": { "model": "biomesoplenty:eyebulb_lower" },
|
||||
"half=upper,variant=sea_oats": { "model": "biomesoplenty:sea_oats_upper" },
|
||||
"half=lower,variant=sea_oats": { "model": "biomesoplenty:sea_oats_lower" }
|
||||
}
|
||||
}
|
|
@ -157,6 +157,7 @@ tile.dirt.coarse_silty_dirt.name=Coarse Silty Dirt
|
|||
tile.double_plant.flax.name=Flax
|
||||
tile.double_plant.tall_cattail.name=Tall Cattail
|
||||
tile.double_plant.eyebulb.name=Eyebulb
|
||||
tile.double_plant.sea_oats.name=Sea Oats
|
||||
tile.ebony_fence.name=Ebony Fence
|
||||
tile.ebony_fence_gate.name=Ebony Fence Gate
|
||||
tile.ebony_wood_slab.name=Ebony Wood Slab
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"parent": "block/cross",
|
||||
"textures": {
|
||||
"cross": "biomesoplenty:blocks/sea_oats_lower"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"parent": "block/cross",
|
||||
"textures": {
|
||||
"cross": "biomesoplenty:blocks/sea_oats_upper"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"parent": "item/generated",
|
||||
"textures": {
|
||||
"layer0": "biomesoplenty:blocks/sea_oats_upper"
|
||||
}
|
||||
}
|
Binary file not shown.
After Width: | Height: | Size: 930 B |
Binary file not shown.
After Width: | Height: | Size: 928 B |
Loading…
Reference in a new issue