Removed old rock formation blocks

(Is this proof enough for you?)
This commit is contained in:
Forstride 2016-02-05 22:44:25 -05:00
parent b1b21dbd57
commit b94f4c0ed8
10 changed files with 0 additions and 169 deletions

View File

@ -1,111 +0,0 @@
/*******************************************************************************
* Copyright 2014-2016, 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.util.IStringSerializable;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
public class BlockBOPStoneFormations extends BlockBOPDecoration
{
// add properties
public static enum StoneFormationType implements IStringSerializable
{
STALACTITE, STALAGMITE;
@Override
public String getName()
{
return this.name().toLowerCase();
}
@Override
public String toString()
{
return this.getName();
}
};
public static final PropertyEnum VARIANT = PropertyEnum.create("variant", StoneFormationType.class);
@Override
protected BlockState createBlockState() {return new BlockState(this, new IProperty[] { VARIANT });}
// implement IBOPBlock
@Override
public IProperty[] getPresetProperties() { return new IProperty[] {VARIANT}; }
@Override
public IProperty[] getNonRenderingProperties() { return null; }
@Override
public String getStateName(IBlockState state)
{
return ((StoneFormationType) state.getValue(VARIANT)).getName();
}
// constructor
public BlockBOPStoneFormations() {
// set some defaults
this.setHardness(0.5F);
this.setStepSound(Block.soundTypePiston);
this.setDefaultState( this.blockState.getBaseState().withProperty(VARIANT, StoneFormationType.STALAGMITE) );
}
// map from state to meta and vice verca
@Override
public IBlockState getStateFromMeta(int meta)
{
return this.getDefaultState().withProperty(VARIANT, StoneFormationType.values()[meta]);
}
@Override
public int getMetaFromState(IBlockState state)
{
return ((StoneFormationType) state.getValue(VARIANT)).ordinal();
}
// bounding box is not full size and depends on whether it's a stalagmite or stalactite
@Override
public void setBlockBoundsBasedOnState(IBlockAccess worldIn, BlockPos pos) {
switch ((StoneFormationType) worldIn.getBlockState(pos).getValue(VARIANT))
{
case STALACTITE:
// against top of block for stalactites
this.setBlockBoundsByRadiusAndHeight(0.3F, 0.6F, true);
break;
case STALAGMITE: default:
// against bottom of block for stalagmites
this.setBlockBoundsByRadiusAndHeight(0.3F, 0.6F);
break;
}
}
// only allow stalactites hanging from stone, and only allow stalagmites on top of stone
@Override
public boolean canBlockStay(World world, BlockPos pos, IBlockState state)
{
IBlockState touching;
switch ((StoneFormationType)state.getValue(VARIANT))
{
case STALACTITE:
touching = world.getBlockState(pos.up());
break;
case STALAGMITE: default:
touching = world.getBlockState(pos.down());
break;
}
return touching.getBlock() == Blocks.stone;
}
}

View File

@ -66,7 +66,6 @@ import biomesoplenty.common.block.BlockBOPSand;
import biomesoplenty.common.block.BlockBOPSapling; import biomesoplenty.common.block.BlockBOPSapling;
import biomesoplenty.common.block.BlockBOPSeaweed; import biomesoplenty.common.block.BlockBOPSeaweed;
import biomesoplenty.common.block.BlockBOPStone; import biomesoplenty.common.block.BlockBOPStone;
import biomesoplenty.common.block.BlockBOPStoneFormations;
import biomesoplenty.common.block.BlockBOPTerrarium; import biomesoplenty.common.block.BlockBOPTerrarium;
import biomesoplenty.common.block.BlockBOPTurnip; import biomesoplenty.common.block.BlockBOPTurnip;
import biomesoplenty.common.block.BlockBOPVine; import biomesoplenty.common.block.BlockBOPVine;
@ -116,7 +115,6 @@ public class ModBlocks
grass = registerBlock( new BlockBOPGrass(), "grass" ); grass = registerBlock( new BlockBOPGrass(), "grass" );
waterlily = registerBlock( new BlockBOPLilypad(), "waterlily" ); waterlily = registerBlock( new BlockBOPLilypad(), "waterlily" );
dirt = registerBlock( new BlockBOPDirt(), "dirt" ); dirt = registerBlock( new BlockBOPDirt(), "dirt" );
stone_formations = registerBlock( new BlockBOPStoneFormations(), "stone_formations" );
crystal = registerBlock( new BlockBOPCrystal(), "crystal" ); crystal = registerBlock( new BlockBOPCrystal(), "crystal" );
biome_block = registerBlock( new BlockBOPBiomeBlock(), "biome_block" ); biome_block = registerBlock( new BlockBOPBiomeBlock(), "biome_block" );

View File

@ -1,6 +0,0 @@
{
"variants": {
"variant=stalagmite": { "model": "biomesoplenty:stalagmite" },
"variant=stalactite": { "model": "biomesoplenty:stalactite" }
}
}

View File

@ -425,8 +425,6 @@ tile.stone.siltstone.name=Siltstone
tile.stone.polished_siltstone.name=Polished Siltstone tile.stone.polished_siltstone.name=Polished Siltstone
tile.stone.shale.name=Shale tile.stone.shale.name=Shale
tile.stone.polished_shale.name=Polished Shale tile.stone.polished_shale.name=Polished Shale
tile.stone_formations.stalagmite.name=Stalagmite
tile.stone_formations.stalactite.name=Stalactite
tile.terrarium.terrarium_fern.name=Fern Terrarium tile.terrarium.terrarium_fern.name=Fern Terrarium
tile.terrarium.terrarium_mushroom.name=Mushroom Terrarium tile.terrarium.terrarium_mushroom.name=Mushroom Terrarium
tile.terrarium.terrarium_cactus.name=Cactus Terrarium tile.terrarium.terrarium_cactus.name=Cactus Terrarium

View File

@ -1,6 +0,0 @@
{
"parent": "block/cross",
"textures": {
"cross": "biomesoplenty:blocks/stalactite"
}
}

View File

@ -1,6 +0,0 @@
{
"parent": "block/cross",
"textures": {
"cross": "biomesoplenty:blocks/stalagmite"
}
}

View File

@ -1,18 +0,0 @@
{
"parent": "builtin/generated",
"textures": {
"layer0": "biomesoplenty:blocks/stalactite"
},
"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 ]
}
}
}

View File

@ -1,18 +0,0 @@
{
"parent": "builtin/generated",
"textures": {
"layer0": "biomesoplenty:blocks/stalagmite"
},
"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 ]
}
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 273 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 281 B