Readied the remaining flowers
|
@ -14,6 +14,7 @@ public class BOPBlocks
|
|||
{
|
||||
public static Block ash_block;
|
||||
public static Block flower;
|
||||
public static Block flower2;
|
||||
public static Block log;
|
||||
public static Block log2;
|
||||
public static Block log3;
|
||||
|
|
|
@ -42,12 +42,6 @@ public class BOPPlant extends BOPBlock
|
|||
return super.canPlaceBlockOnSide(world, pos, side) && this.canBlockStay(world, pos, this.getStateFromMeta(stack.getMetadata()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canPlaceBlockAt(World world, BlockPos pos)
|
||||
{
|
||||
return super.canPlaceBlockAt(world, pos) && this.canBlockStay(world, pos, this.getDefaultState());
|
||||
}
|
||||
|
||||
public boolean canBlockStay(World world, BlockPos pos, IBlockState state)
|
||||
{
|
||||
Block ground = world.getBlockState(pos.offsetDown()).getBlock();
|
||||
|
|
|
@ -48,10 +48,11 @@ public class BlockBOPFlower extends BOPPlant
|
|||
super(VARIANT_PROP);
|
||||
}
|
||||
|
||||
//TODO: Add light for glowflowers and enderlotus (Requires Forge)
|
||||
//TODO: Add light for glowflowers, enderlotus and the burning blossom (Requires Forge)
|
||||
|
||||
//TODO: Make enderlotus require spectral moss
|
||||
//TODO: Make bromeliads require hard dirt, hardened clay or sand
|
||||
//TODO: Make the burning blossom require netherrack or overgrown netherrack
|
||||
|
||||
@Override
|
||||
public void harvestBlock(World world, EntityPlayer player, BlockPos pos, IBlockState state, TileEntity tileentity)
|
||||
|
@ -60,9 +61,18 @@ public class BlockBOPFlower extends BOPPlant
|
|||
|
||||
FlowerType type = (FlowerType)state.getValue(VARIANT_PROP);
|
||||
|
||||
if (type == FlowerType.DEATHBLOOM && (player.getCurrentEquippedItem() == null || !(player.getCurrentEquippedItem().getItem() instanceof ItemShears)))
|
||||
if (player.getCurrentEquippedItem() == null || !(player.getCurrentEquippedItem().getItem() instanceof ItemShears))
|
||||
{
|
||||
player.addPotionEffect(new PotionEffect(Potion.wither.id, 300));
|
||||
switch (type)
|
||||
{
|
||||
case DEATHBLOOM:
|
||||
player.addPotionEffect(new PotionEffect(Potion.wither.id, 300));
|
||||
break;
|
||||
|
||||
case BURNING_BLOSSOM:
|
||||
player.setFire(5);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -71,7 +81,11 @@ public class BlockBOPFlower extends BOPPlant
|
|||
{
|
||||
FlowerType type = (FlowerType)state.getValue(VARIANT_PROP);
|
||||
|
||||
if (entity instanceof EntityLivingBase && type == FlowerType.DEATHBLOOM)
|
||||
if (type == FlowerType.BURNING_BLOSSOM)
|
||||
{
|
||||
entity.setFire(1);
|
||||
}
|
||||
else if (entity instanceof EntityLivingBase && type == FlowerType.DEATHBLOOM)
|
||||
{
|
||||
((EntityLivingBase)entity).addPotionEffect(new PotionEffect(Potion.wither.id, 200));
|
||||
}
|
||||
|
@ -106,10 +120,6 @@ public class BlockBOPFlower extends BOPPlant
|
|||
this.setBlockBounds(0.3F, 0.0F, 0.3F, 0.7F, 0.5F, 0.7F);
|
||||
break;
|
||||
|
||||
case ENDERLOTUS:
|
||||
this.setBlockBounds(0.3F, 0.0F, 0.3F, 0.7F, 0.4F, 0.7F);
|
||||
break;
|
||||
|
||||
case DANDELION:
|
||||
this.setBlockBounds(0.3F, 0.0F, 0.3F, 0.7F, 0.6F, 0.7F);
|
||||
break;
|
||||
|
@ -124,11 +134,18 @@ public class BlockBOPFlower extends BOPPlant
|
|||
@SideOnly(Side.CLIENT)
|
||||
public void randomDisplayTick(World world, BlockPos pos, IBlockState state, Random rand)
|
||||
{
|
||||
if ((FlowerType)state.getValue(VARIANT_PROP) == FlowerType.DEATHBLOOM)
|
||||
FlowerType type = (FlowerType)state.getValue(VARIANT_PROP);
|
||||
|
||||
if (type == FlowerType.DEATHBLOOM)
|
||||
{
|
||||
if (rand.nextInt(4) != 0) world.spawnParticle(EnumParticleTypes.TOWN_AURA, pos.getX() + rand.nextFloat(), pos.getY() + rand.nextFloat(), pos.getZ() + rand.nextFloat(), 0.0D, 0.0D, 0.0D, new int[0]);
|
||||
if (rand.nextInt(4) == 0) world.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, pos.getX() + rand.nextFloat(), pos.getY() + rand.nextFloat(), pos.getZ() + rand.nextFloat(), 0.0D, 0.0D, 0.0D, new int[0]);
|
||||
}
|
||||
else if (type == FlowerType.BURNING_BLOSSOM)
|
||||
{
|
||||
if (rand.nextInt(2) == 0) world.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, pos.getX() + rand.nextFloat(), pos.getY() + rand.nextFloat(), pos.getZ() + rand.nextFloat(), 0.0D, 0.0D, 0.0D, new int[0]);
|
||||
if (rand.nextInt(4) == 0) world.spawnParticle(EnumParticleTypes.FLAME, pos.getX() + rand.nextFloat(), pos.getY() + rand.nextFloat(), pos.getZ() + rand.nextFloat(), 0.0D, 0.0D, 0.0D, new int[0]);
|
||||
}
|
||||
}
|
||||
|
||||
//TODO: Readd eyebulb in as a seperate block
|
||||
|
@ -147,7 +164,10 @@ public class BlockBOPFlower extends BOPPlant
|
|||
WHITE_ANEMONE,
|
||||
ENDERLOTUS,
|
||||
BROMELIAD,
|
||||
DANDELION;
|
||||
DANDELION,
|
||||
PINK_HIBISCUS,
|
||||
LILY_OF_THE_VALLEY,
|
||||
BURNING_BLOSSOM;
|
||||
|
||||
@Override
|
||||
public String getBaseName()
|
||||
|
|
|
@ -0,0 +1,93 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2014, 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.block;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.properties.IProperty;
|
||||
import net.minecraft.block.properties.PropertyEnum;
|
||||
import net.minecraft.block.state.BlockState;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import biomesoplenty.api.block.BOPPlant;
|
||||
import biomesoplenty.api.block.IBOPVariant;
|
||||
|
||||
public class BlockBOPFlower2 extends BOPPlant
|
||||
{
|
||||
public static PropertyEnum VARIANT_PROP = PropertyEnum.create("variant", FlowerType.class);
|
||||
|
||||
public BlockBOPFlower2()
|
||||
{
|
||||
super(VARIANT_PROP);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canBlockStay(World world, BlockPos pos, IBlockState state)
|
||||
{
|
||||
Block ground = world.getBlockState(pos.offsetDown()).getBlock();
|
||||
FlowerType type = (FlowerType)state.getValue(VARIANT_PROP);
|
||||
|
||||
switch (type)
|
||||
{
|
||||
case MINERS_DELIGHT:
|
||||
return ground == Blocks.stone;
|
||||
|
||||
default:
|
||||
return ground == Blocks.grass || ground == Blocks.dirt || ground == Blocks.farmland;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected BlockState createBlockState()
|
||||
{
|
||||
return new BlockState(this, new IProperty[] { VARIANT_PROP });
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setBlockBoundsBasedOnState(IBlockAccess world, BlockPos pos)
|
||||
{
|
||||
this.setBlockBounds(0.1F, 0.0F, 0.1F, 0.9F, 0.8F, 0.9F);
|
||||
}
|
||||
|
||||
public static enum FlowerType implements IBOPVariant
|
||||
{
|
||||
LAVENDER,
|
||||
GOLDENROD,
|
||||
BLUEBELLS,
|
||||
MINERS_DELIGHT,
|
||||
ICY_IRIS,
|
||||
ROSE;
|
||||
|
||||
@Override
|
||||
public String getBaseName()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName()
|
||||
{
|
||||
return this.name().toLowerCase();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
return getName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getDefaultMetadata()
|
||||
{
|
||||
return this.ordinal();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -18,6 +18,7 @@ import biomesoplenty.client.util.ModelHelper;
|
|||
import biomesoplenty.common.block.BOPBlockPlanks;
|
||||
import biomesoplenty.common.block.BlockAsh;
|
||||
import biomesoplenty.common.block.BlockBOPFlower;
|
||||
import biomesoplenty.common.block.BlockBOPFlower2;
|
||||
import biomesoplenty.common.block.BlockBOPLog;
|
||||
import biomesoplenty.common.block.BlockBOPLog2;
|
||||
import biomesoplenty.common.block.BlockBOPLog3;
|
||||
|
@ -31,6 +32,7 @@ public class ModBlocks
|
|||
{
|
||||
ash_block = registerBlock(new BlockAsh(), "ash_block");
|
||||
flower = registerBlock(new BlockBOPFlower(), "flower");
|
||||
flower2 = registerBlock(new BlockBOPFlower2(), "flower2");
|
||||
log = registerBlock(new BlockBOPLog(), "log");
|
||||
log2 = registerBlock(new BlockBOPLog2(), "log2");
|
||||
log3 = registerBlock(new BlockBOPLog3(), "log3");
|
||||
|
|
|
@ -12,6 +12,9 @@
|
|||
"variant=white_anemone": { "model": "biomesoplenty:white_anemone" },
|
||||
"variant=enderlotus": { "model": "biomesoplenty:enderlotus" },
|
||||
"variant=bromeliad": { "model": "biomesoplenty:bromeliad" },
|
||||
"variant=dandelion": { "model": "biomesoplenty:dandelion" }
|
||||
"variant=dandelion": { "model": "biomesoplenty:dandelion" },
|
||||
"variant=pink_hibiscus": { "model": "biomesoplenty:pink_hibiscus" },
|
||||
"variant=lily_of_the_valley": { "model": "biomesoplenty:lily_of_the_valley" },
|
||||
"variant=burning_blossom": { "model": "biomesoplenty:burning_blossom" }
|
||||
}
|
||||
}
|
||||
|
|
10
src/main/resources/assets/biomesoplenty/blockstates/flower2.json
Executable file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"variants": {
|
||||
"variant=lavender": { "model": "biomesoplenty:lavender" },
|
||||
"variant=goldenrod": { "model": "biomesoplenty:goldenrod" },
|
||||
"variant=bluebells": { "model": "biomesoplenty:bluebells" },
|
||||
"variant=miners_delight": { "model": "biomesoplenty:miners_delight" },
|
||||
"variant=icy_iris": { "model": "biomesoplenty:icy_iris" },
|
||||
"variant=rose": { "model": "biomesoplenty:rose" }
|
||||
}
|
||||
}
|
|
@ -13,6 +13,16 @@ tile.flower.white_anemone.name=White Anemone
|
|||
tile.flower.enderlotus.name=Enderlotus
|
||||
tile.flower.bromeliad.name=Bromeliad
|
||||
tile.flower.dandelion.name=Dandelion Puff
|
||||
tile.flower.pink_hibiscus.name=Pink Hibiscus
|
||||
tile.flower.lily_of_the_valley.name=Lily of the Valley
|
||||
tile.flower.burning_blossom.name=Burning Blossom
|
||||
|
||||
tile.flower2.lavender.name=Lavender
|
||||
tile.flower2.goldenrod.name=Goldenrod
|
||||
tile.flower2.bluebells.name=Bluebells
|
||||
tile.flower2.miners_delight.name=Miner's Delight
|
||||
tile.flower2.icy_iris.name=Icy Iris
|
||||
tile.flower2.rose.name=Rose
|
||||
|
||||
tile.log.sacred_oak.name=Sacred Oak Wood
|
||||
tile.log.cherry.name=Cherry Wood
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"parent": "block/cross",
|
||||
"textures": {
|
||||
"cross": "biomesoplenty:blocks/bluebells"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"parent": "block/cross",
|
||||
"textures": {
|
||||
"cross": "biomesoplenty:blocks/burning_blossom"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"parent": "block/cross",
|
||||
"textures": {
|
||||
"cross": "biomesoplenty:blocks/goldenrod"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"parent": "block/cross",
|
||||
"textures": {
|
||||
"cross": "biomesoplenty:blocks/icy_iris"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"parent": "block/cross",
|
||||
"textures": {
|
||||
"cross": "biomesoplenty:blocks/lavender"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"parent": "block/cross",
|
||||
"textures": {
|
||||
"cross": "biomesoplenty:blocks/lily_of_the_valley"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"parent": "block/cross",
|
||||
"textures": {
|
||||
"cross": "biomesoplenty:blocks/miners_delight"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"parent": "block/cross",
|
||||
"textures": {
|
||||
"cross": "biomesoplenty:blocks/pink_hibiscus"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"parent": "block/cross",
|
||||
"textures": {
|
||||
"cross": "biomesoplenty:blocks/rose"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
"parent": "builtin/generated",
|
||||
"textures": {
|
||||
"layer0": "biomesoplenty:blocks/bluebells"
|
||||
},
|
||||
"display": {
|
||||
"thirdperson": {
|
||||
"rotation": [ -90, 0, 0 ],
|
||||
"translation": [ 0, 1, -3 ],
|
||||
"scale": [ 0.55, 0.55, 0.55 ]
|
||||
},
|
||||
"firstperson": {
|
||||
"rotation": [ 0, -135, 25 ],
|
||||
"translation": [ 0, 4, 2 ],
|
||||
"scale": [ 1.7, 1.7, 1.7 ]
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
"parent": "builtin/generated",
|
||||
"textures": {
|
||||
"layer0": "biomesoplenty:blocks/burning_blossom"
|
||||
},
|
||||
"display": {
|
||||
"thirdperson": {
|
||||
"rotation": [ -90, 0, 0 ],
|
||||
"translation": [ 0, 1, -3 ],
|
||||
"scale": [ 0.55, 0.55, 0.55 ]
|
||||
},
|
||||
"firstperson": {
|
||||
"rotation": [ 0, -135, 25 ],
|
||||
"translation": [ 0, 4, 2 ],
|
||||
"scale": [ 1.7, 1.7, 1.7 ]
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
"parent": "builtin/generated",
|
||||
"textures": {
|
||||
"layer0": "biomesoplenty:blocks/goldenrod"
|
||||
},
|
||||
"display": {
|
||||
"thirdperson": {
|
||||
"rotation": [ -90, 0, 0 ],
|
||||
"translation": [ 0, 1, -3 ],
|
||||
"scale": [ 0.55, 0.55, 0.55 ]
|
||||
},
|
||||
"firstperson": {
|
||||
"rotation": [ 0, -135, 25 ],
|
||||
"translation": [ 0, 4, 2 ],
|
||||
"scale": [ 1.7, 1.7, 1.7 ]
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
"parent": "builtin/generated",
|
||||
"textures": {
|
||||
"layer0": "biomesoplenty:blocks/icy_iris"
|
||||
},
|
||||
"display": {
|
||||
"thirdperson": {
|
||||
"rotation": [ -90, 0, 0 ],
|
||||
"translation": [ 0, 1, -3 ],
|
||||
"scale": [ 0.55, 0.55, 0.55 ]
|
||||
},
|
||||
"firstperson": {
|
||||
"rotation": [ 0, -135, 25 ],
|
||||
"translation": [ 0, 4, 2 ],
|
||||
"scale": [ 1.7, 1.7, 1.7 ]
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
"parent": "builtin/generated",
|
||||
"textures": {
|
||||
"layer0": "biomesoplenty:blocks/lavender"
|
||||
},
|
||||
"display": {
|
||||
"thirdperson": {
|
||||
"rotation": [ -90, 0, 0 ],
|
||||
"translation": [ 0, 1, -3 ],
|
||||
"scale": [ 0.55, 0.55, 0.55 ]
|
||||
},
|
||||
"firstperson": {
|
||||
"rotation": [ 0, -135, 25 ],
|
||||
"translation": [ 0, 4, 2 ],
|
||||
"scale": [ 1.7, 1.7, 1.7 ]
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
"parent": "builtin/generated",
|
||||
"textures": {
|
||||
"layer0": "biomesoplenty:blocks/lily_of_the_valley"
|
||||
},
|
||||
"display": {
|
||||
"thirdperson": {
|
||||
"rotation": [ -90, 0, 0 ],
|
||||
"translation": [ 0, 1, -3 ],
|
||||
"scale": [ 0.55, 0.55, 0.55 ]
|
||||
},
|
||||
"firstperson": {
|
||||
"rotation": [ 0, -135, 25 ],
|
||||
"translation": [ 0, 4, 2 ],
|
||||
"scale": [ 1.7, 1.7, 1.7 ]
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
"parent": "builtin/generated",
|
||||
"textures": {
|
||||
"layer0": "biomesoplenty:blocks/miners_delight"
|
||||
},
|
||||
"display": {
|
||||
"thirdperson": {
|
||||
"rotation": [ -90, 0, 0 ],
|
||||
"translation": [ 0, 1, -3 ],
|
||||
"scale": [ 0.55, 0.55, 0.55 ]
|
||||
},
|
||||
"firstperson": {
|
||||
"rotation": [ 0, -135, 25 ],
|
||||
"translation": [ 0, 4, 2 ],
|
||||
"scale": [ 1.7, 1.7, 1.7 ]
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
"parent": "builtin/generated",
|
||||
"textures": {
|
||||
"layer0": "biomesoplenty:blocks/pink_hibiscus"
|
||||
},
|
||||
"display": {
|
||||
"thirdperson": {
|
||||
"rotation": [ -90, 0, 0 ],
|
||||
"translation": [ 0, 1, -3 ],
|
||||
"scale": [ 0.55, 0.55, 0.55 ]
|
||||
},
|
||||
"firstperson": {
|
||||
"rotation": [ 0, -135, 25 ],
|
||||
"translation": [ 0, 4, 2 ],
|
||||
"scale": [ 1.7, 1.7, 1.7 ]
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
"parent": "builtin/generated",
|
||||
"textures": {
|
||||
"layer0": "biomesoplenty:blocks/rose"
|
||||
},
|
||||
"display": {
|
||||
"thirdperson": {
|
||||
"rotation": [ -90, 0, 0 ],
|
||||
"translation": [ 0, 1, -3 ],
|
||||
"scale": [ 0.55, 0.55, 0.55 ]
|
||||
},
|
||||
"firstperson": {
|
||||
"rotation": [ 0, -135, 25 ],
|
||||
"translation": [ 0, 4, 2 ],
|
||||
"scale": [ 1.7, 1.7, 1.7 ]
|
||||
}
|
||||
}
|
||||
}
|
After Width: | Height: | Size: 473 B |
After Width: | Height: | Size: 655 B |
After Width: | Height: | Size: 646 B |
After Width: | Height: | Size: 426 B |
After Width: | Height: | Size: 671 B |
After Width: | Height: | Size: 496 B |
After Width: | Height: | Size: 390 B |
After Width: | Height: | Size: 768 B |
BIN
src/main/resources/assets/biomesoplenty/textures/blocks/rose.png
Normal file
After Width: | Height: | Size: 252 B |