Add honey block

This commit is contained in:
Cheeserolls 2015-04-05 14:37:18 +01:00
parent 2afb01bccd
commit 2413786922
7 changed files with 81 additions and 3 deletions

View File

@ -127,6 +127,6 @@ public class BOPBlocks
public static Block foliage;
public static Block double_foliage;
public static Block honey_block;
}

View File

@ -0,0 +1,56 @@
/*******************************************************************************
* 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.material.Material;
import net.minecraft.block.properties.IProperty;
import net.minecraft.block.state.IBlockState;
import net.minecraft.item.ItemBlock;
import net.minecraft.util.EnumWorldBlockLayer;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import biomesoplenty.api.block.IBOPBlock;
import biomesoplenty.common.item.ItemBOPBlock;
public class BlockHoney extends Block implements IBOPBlock
{
// implement IBOPBlock
@Override
public Class<? extends ItemBlock> getItemClass() { return ItemBOPBlock.class; }
@Override
public int getItemRenderColor(IBlockState state, int tintIndex) { return this.getRenderColor(state); }
@Override
public IProperty[] getPresetProperties() { return new IProperty[] {}; }
@Override
public IProperty[] getRenderProperties() { return new IProperty[] {}; }
@Override
public String getStateName(IBlockState state) {return "";}
public BlockHoney() {
super(Material.glass);
this.setHardness(0.5F);
this.setStepSound(soundTypePiston);
}
@Override
@SideOnly(Side.CLIENT)
public EnumWorldBlockLayer getBlockLayer()
{
return EnumWorldBlockLayer.TRANSLUCENT;
}
@Override
public boolean isOpaqueCube()
{
return false;
}
}

View File

@ -59,6 +59,7 @@ import biomesoplenty.common.block.BlockFruit;
import biomesoplenty.common.block.BlockGem;
import biomesoplenty.common.block.BlockGemOre;
import biomesoplenty.common.block.BlockHive;
import biomesoplenty.common.block.BlockHoney;
import biomesoplenty.common.block.BlockMud;
import biomesoplenty.common.block.BlockStoneFormations;
import biomesoplenty.common.block.BlockTurnip;
@ -212,9 +213,9 @@ public class ModBlocks
wisteria = registerBlock( new BlockBOPVine(false), "wisteria" );
foliage = registerBlock( new BlockFoliage(), "foliage" );
double_foliage = registerBlock( new BlockDoubleFoliage(), "double_foliage" );
double_foliage = registerBlock( new BlockDoubleFoliage(), "double_foliage" );
honey_block = registerBlock( new BlockHoney(), "honey_block" );
}

View File

@ -0,0 +1,5 @@
{
"variants": {
"normal": { "model": "biomesoplenty:honey_block" }
}
}

View File

@ -0,0 +1,6 @@
{
"parent": "block/cube_all",
"textures": {
"all": "biomesoplenty:blocks/honey_block"
}
}

View File

@ -0,0 +1,10 @@
{
"parent": "biomesoplenty:block/honey_block",
"display": {
"thirdperson": {
"rotation": [ 10, -45, 170 ],
"translation": [ 0, 1.5, -2.75 ],
"scale": [ 0.375, 0.375, 0.375 ]
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB