Removed bone segment blocks
This commit is contained in:
parent
9ca79082e2
commit
cdeffc1dfa
14 changed files with 0 additions and 257 deletions
|
@ -16,7 +16,6 @@ public class BOPBlocks
|
|||
public static Block bamboo_thatching;
|
||||
public static Block ash_block;
|
||||
public static Block bamboo;
|
||||
public static Block bone_segment;
|
||||
public static Block coral;
|
||||
public static Block seaweed;
|
||||
public static Block gem_block;
|
||||
|
|
|
@ -1,173 +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 biomesoplenty.common.item.ItemBOPBlock;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.SoundType;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.properties.IProperty;
|
||||
import net.minecraft.block.properties.PropertyEnum;
|
||||
import net.minecraft.block.state.BlockStateContainer;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.client.renderer.color.IBlockColor;
|
||||
import net.minecraft.client.renderer.color.IItemColor;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.IStringSerializable;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
public class BlockBOPBones extends Block implements IBOPBlock
|
||||
{
|
||||
|
||||
// add properties
|
||||
public static enum BoneType implements IStringSerializable
|
||||
{
|
||||
SMALL, MEDIUM, LARGE;
|
||||
@Override
|
||||
public String getName()
|
||||
{
|
||||
return this.name().toLowerCase();
|
||||
}
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
return this.getName();
|
||||
}
|
||||
};
|
||||
public static final PropertyEnum VARIANT = PropertyEnum.create("variant", BoneType.class);
|
||||
public static final PropertyEnum AXIS = PropertyEnum.create("axis", EnumFacing.Axis.class);
|
||||
@Override
|
||||
protected BlockStateContainer createBlockState() {return new BlockStateContainer(this, new IProperty[] { AXIS, VARIANT });}
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IBlockColor getBlockColor() { return null; }
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IItemColor getItemColor() { return null; }
|
||||
|
||||
// implement IBOPBlock
|
||||
@Override
|
||||
public Class<? extends ItemBlock> getItemClass() { return ItemBOPBlock.class; }
|
||||
@Override
|
||||
public IProperty[] getPresetProperties() { return new IProperty[] {VARIANT}; }
|
||||
@Override
|
||||
public IProperty[] getNonRenderingProperties() { return null; }
|
||||
@Override
|
||||
public String getStateName(IBlockState state)
|
||||
{
|
||||
return ((BoneType) state.getValue(VARIANT)).getName() + "_bone_segment";
|
||||
}
|
||||
|
||||
public ItemStack getVariantItem(BoneType type)
|
||||
{
|
||||
return this.getVariantItem(type, 1);
|
||||
}
|
||||
public ItemStack getVariantItem(BoneType type, int howMany)
|
||||
{
|
||||
return new ItemStack(this, howMany, this.getMetaFromState(this.getDefaultState().withProperty(VARIANT, type)));
|
||||
}
|
||||
|
||||
public BlockBOPBones()
|
||||
{
|
||||
super(Material.ROCK);
|
||||
|
||||
// set some defaults
|
||||
this.setHardness(3.0F);
|
||||
this.setResistance(5.0F);
|
||||
this.setSoundType(SoundType.STONE);
|
||||
|
||||
this.setDefaultState(this.blockState.getBaseState().withProperty(AXIS, EnumFacing.Axis.Y).withProperty(VARIANT, BoneType.LARGE));
|
||||
}
|
||||
|
||||
|
||||
// map from state to meta and vice verca
|
||||
@Override
|
||||
public IBlockState getStateFromMeta(int meta)
|
||||
{
|
||||
int axis = meta % 3;
|
||||
int type = (meta - axis) / 3;
|
||||
return this.getDefaultState().withProperty(VARIANT, BoneType.values()[type]).withProperty(AXIS, EnumFacing.Axis.values()[axis]);
|
||||
}
|
||||
@Override
|
||||
public int getMetaFromState(IBlockState state)
|
||||
{
|
||||
int baseMeta = ((BoneType) state.getValue(VARIANT)).ordinal();
|
||||
return baseMeta * 3 + ((EnumFacing.Axis) state.getValue(AXIS)).ordinal();
|
||||
}
|
||||
|
||||
|
||||
// align placed block according to side clicked on
|
||||
@Override
|
||||
public IBlockState onBlockPlaced(World world, BlockPos pos, EnumFacing side, float hitX, float hitY, float hitZ, int metadata, EntityLivingBase entity)
|
||||
{
|
||||
return super.onBlockPlaced(world, pos, side, hitX, hitY, hitZ, metadata, entity).withProperty(AXIS, side.getAxis());
|
||||
}
|
||||
|
||||
// discard axis info in dropped block
|
||||
@Override
|
||||
public int damageDropped(IBlockState state)
|
||||
{
|
||||
return this.getMetaFromState(this.getDefaultState().withProperty(VARIANT, state.getValue(VARIANT)));
|
||||
}
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos)
|
||||
{
|
||||
double width = 1.0D;
|
||||
|
||||
switch ((BoneType) state.getValue(VARIANT))
|
||||
{
|
||||
case SMALL:
|
||||
width = 0.25D;
|
||||
break;
|
||||
|
||||
case MEDIUM:
|
||||
width = 0.625D;
|
||||
break;
|
||||
}
|
||||
|
||||
double min = (1.0D - width) / 2D;
|
||||
double max = 1.0D - min;
|
||||
|
||||
switch ((EnumFacing.Axis) state.getValue(AXIS))
|
||||
{
|
||||
case X:
|
||||
return new AxisAlignedBB(0.0D, min, min, 1.0D, max, max);
|
||||
|
||||
case Y:
|
||||
return new AxisAlignedBB(min, 0.0D, min, max, 1.0D, max);
|
||||
|
||||
case Z:
|
||||
return new AxisAlignedBB(min, min, 0.0D, max, max, 1.0D);
|
||||
}
|
||||
|
||||
return FULL_BLOCK_AABB;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isOpaqueCube(IBlockState state)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isFullCube(IBlockState state)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
|
@ -90,7 +90,6 @@ public class ModBlocks
|
|||
gem_block = registerBlock( new BlockBOPGem(), "gem_block" );
|
||||
hive = registerBlock( new BlockBOPHive(), "hive" );
|
||||
honey_block = registerBlock( new BlockBOPHoney(), "honey_block" );
|
||||
bone_segment = registerBlock( new BlockBOPBones(), "bone_segment" );
|
||||
|
||||
//Material Blocks
|
||||
bamboo_thatching = registerBlock( (new BlockBOPGeneric(Material.WOOD, SoundType.WOOD)).setHardness(2.0F), "bamboo_thatching"); bamboo_thatching.setHarvestLevel("axe", 0);
|
||||
|
|
|
@ -12,7 +12,6 @@ import com.google.common.base.CaseFormat;
|
|||
|
||||
import biomesoplenty.api.block.BOPBlocks;
|
||||
import biomesoplenty.api.item.BOPItems;
|
||||
import biomesoplenty.common.block.BlockBOPBones;
|
||||
import biomesoplenty.common.block.BlockBOPDirt;
|
||||
import biomesoplenty.common.block.BlockBOPDoor;
|
||||
import biomesoplenty.common.block.BlockBOPDoublePlant;
|
||||
|
@ -265,11 +264,6 @@ public class ModCrafting
|
|||
// Rotten Flesh
|
||||
GameRegistry.addShapedRecipe(new ItemStack(Items.ROTTEN_FLESH), new Object[] {"FFF", "FPF", "FFF", 'F', new ItemStack(BOPItems.fleshchunk), 'P', new ItemStack(BOPItems.jar_filled, 1, ItemJarFilled.JarContents.POISON.ordinal())});
|
||||
|
||||
// Bone Segments > Bonemeal
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(Items.DYE, 3, EnumDyeColor.WHITE.getDyeDamage()), new Object[] {((BlockBOPBones)BOPBlocks.bone_segment).getVariantItem(BlockBOPBones.BoneType.SMALL)});
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(Items.DYE, 6, EnumDyeColor.WHITE.getDyeDamage()), new Object[] {((BlockBOPBones)BOPBlocks.bone_segment).getVariantItem(BlockBOPBones.BoneType.MEDIUM)});
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(Items.DYE, 12, EnumDyeColor.WHITE.getDyeDamage()), new Object[] {((BlockBOPBones)BOPBlocks.bone_segment).getVariantItem(BlockBOPBones.BoneType.LARGE)});
|
||||
|
||||
// Honeycombs
|
||||
GameRegistry.addShapedRecipe(new ItemStack(BOPBlocks.hive, 1, BlockBOPHive.HiveType.HONEYCOMB.ordinal()), new Object [] {"##", "##", '#', new ItemStack(BOPItems.honeycomb)});
|
||||
GameRegistry.addShapedRecipe(new ItemStack(BOPBlocks.hive, 1, BlockBOPHive.HiveType.FILLED_HONEYCOMB.ordinal()), new Object [] {"##", "##", '#', new ItemStack(BOPItems.filled_honeycomb)});
|
||||
|
|
|
@ -68,9 +68,6 @@ public class ThaumcraftCompat
|
|||
addAspectsToState(BOPBlocks.gem_block.getDefaultState().withProperty(BlockBOPGem.VARIANT, BOPGems.AMETHYST), new Aspect[] { Aspect.DESIRE, Aspect.ORDER, Aspect.CRYSTAL }, new int[] { 5, 5, 8 });
|
||||
addAspectsToState(BlockBOPLeaves.paging.getVariantState(BOPTrees.RED_BIG_FLOWER), new Aspect[] { Aspect.PLANT }, new int[] { 4 });
|
||||
addAspectsToState(BlockBOPLeaves.paging.getVariantState(BOPTrees.YELLOW_BIG_FLOWER), new Aspect[] { Aspect.PLANT }, new int[] { 4 });
|
||||
addAspectsToState(BOPBlocks.bone_segment.getDefaultState().withProperty(BlockBOPBones.VARIANT, BoneType.SMALL), new Aspect[] { Aspect.DEATH }, new int[] { 3 });
|
||||
addAspectsToState(BOPBlocks.bone_segment.getDefaultState().withProperty(BlockBOPBones.VARIANT, BoneType.MEDIUM), new Aspect[] { Aspect.DEATH }, new int[] { 5 });
|
||||
addAspectsToState(BOPBlocks.bone_segment.getDefaultState().withProperty(BlockBOPBones.VARIANT, BoneType.LARGE), new Aspect[] { Aspect.DEATH }, new int[] { 7 });
|
||||
addAspectsToState(BlockBOPPlant.paging.getVariantState(BOPPlants.POISONIVY), new Aspect[] { Aspect.PLANT }, new int[] { 2 });
|
||||
|
||||
//Plants
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
{
|
||||
"variants": {
|
||||
"axis=x,variant=small": { "model": "biomesoplenty:small_bone_segment", "x": 90, "y": 90 },
|
||||
"axis=y,variant=small": { "model": "biomesoplenty:small_bone_segment" },
|
||||
"axis=z,variant=small": { "model": "biomesoplenty:small_bone_segment", "x": 90 },
|
||||
"axis=x,variant=medium": { "model": "biomesoplenty:medium_bone_segment", "x": 90, "y": 90 },
|
||||
"axis=y,variant=medium": { "model": "biomesoplenty:medium_bone_segment" },
|
||||
"axis=z,variant=medium": { "model": "biomesoplenty:medium_bone_segment", "x": 90 },
|
||||
"axis=x,variant=large": { "model": "biomesoplenty:large_bone_segment", "x": 90, "y": 90 },
|
||||
"axis=y,variant=large": { "model": "biomesoplenty:large_bone_segment" },
|
||||
"axis=z,variant=large": { "model": "biomesoplenty:large_bone_segment", "x": 90 }
|
||||
}
|
||||
}
|
|
@ -187,9 +187,6 @@ tile.ash_block.name=Ash Block
|
|||
tile.bamboo.name=Bamboo
|
||||
tile.bamboo_thatching.name=Bamboo Thatching
|
||||
tile.biome_block.name=Biome Essence Ore
|
||||
tile.bone_segment.small_bone_segment.name=Small Bone Segment
|
||||
tile.bone_segment.medium_bone_segment.name=Medium Bone Segment
|
||||
tile.bone_segment.large_bone_segment.name=Large Bone Segment
|
||||
tile.cherry_fence.name=Cherry Fence
|
||||
tile.cherry_fence_gate.name=Cherry Fence Gate
|
||||
tile.cherry_wood_slab.name=Cherry Wood Slab
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
{
|
||||
"parent": "block/cube_all",
|
||||
"textures": {
|
||||
"all": "biomesoplenty:blocks/bone_segment"
|
||||
}
|
||||
}
|
|
@ -1,21 +0,0 @@
|
|||
{
|
||||
"parent": "block/block",
|
||||
"textures": {
|
||||
"bone_segment": "biomesoplenty:blocks/bone_segment",
|
||||
"particle": "biomesoplenty:blocks/bone_segment"
|
||||
},
|
||||
"elements": [
|
||||
{
|
||||
"from": [ 3, 0, 3 ],
|
||||
"to": [ 13, 16, 13 ],
|
||||
"faces": {
|
||||
"down": { "uv": [ 3, 3, 13, 10 ], "texture": "#bone_segment" },
|
||||
"up": { "uv": [ 3, 3, 13, 10 ], "texture": "#bone_segment" },
|
||||
"north": { "uv": [ 3, 0, 13, 16 ], "texture": "#bone_segment" },
|
||||
"south": { "uv": [ 3, 0, 13, 16 ], "texture": "#bone_segment" },
|
||||
"west": { "uv": [ 3, 0, 13, 16 ], "texture": "#bone_segment" },
|
||||
"east": { "uv": [ 3, 0, 13, 16 ], "texture": "#bone_segment" }
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
|
@ -1,21 +0,0 @@
|
|||
{
|
||||
"parent": "block/block",
|
||||
"textures": {
|
||||
"bone_segment": "biomesoplenty:blocks/bone_segment",
|
||||
"particle": "biomesoplenty:blocks/bone_segment"
|
||||
},
|
||||
"elements": [
|
||||
{
|
||||
"from": [ 6, 0, 6 ],
|
||||
"to": [ 10, 16, 10 ],
|
||||
"faces": {
|
||||
"down": { "uv": [ 6, 6, 10, 10 ], "texture": "#bone_segment" },
|
||||
"up": { "uv": [ 6, 6, 10, 10 ], "texture": "#bone_segment" },
|
||||
"north": { "uv": [ 6, 0, 10, 16 ], "texture": "#bone_segment" },
|
||||
"south": { "uv": [ 6, 0, 10, 16 ], "texture": "#bone_segment" },
|
||||
"west": { "uv": [ 6, 0, 10, 16 ], "texture": "#bone_segment" },
|
||||
"east": { "uv": [ 6, 0, 10, 16 ], "texture": "#bone_segment" }
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
{
|
||||
"parent": "biomesoplenty:block/large_bone_segment"
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
{
|
||||
"parent": "biomesoplenty:block/medium_bone_segment"
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
{
|
||||
"parent": "biomesoplenty:block/small_bone_segment"
|
||||
}
|
Binary file not shown.
Before Width: | Height: | Size: 523 B |
Loading…
Reference in a new issue