From 241378692240084620a8614b822bc4e7daa0dda3 Mon Sep 17 00:00:00 2001 From: Cheeserolls Date: Sun, 5 Apr 2015 14:37:18 +0100 Subject: [PATCH] Add honey block --- .../biomesoplenty/api/block/BOPBlocks.java | 2 +- .../common/block/BlockHoney.java | 56 ++++++++++++++++++ .../biomesoplenty/common/init/ModBlocks.java | 5 +- .../blockstates/honey_block.json | 5 ++ .../models/block/honey_block.json | 6 ++ .../models/item/honey_block.json | 10 ++++ .../textures/blocks/honey_block.png | Bin 0 -> 15110 bytes 7 files changed, 81 insertions(+), 3 deletions(-) create mode 100644 src/main/java/biomesoplenty/common/block/BlockHoney.java create mode 100644 src/main/resources/assets/biomesoplenty/blockstates/honey_block.json create mode 100644 src/main/resources/assets/biomesoplenty/models/block/honey_block.json create mode 100644 src/main/resources/assets/biomesoplenty/models/item/honey_block.json create mode 100644 src/main/resources/assets/biomesoplenty/textures/blocks/honey_block.png diff --git a/src/main/java/biomesoplenty/api/block/BOPBlocks.java b/src/main/java/biomesoplenty/api/block/BOPBlocks.java index 05f3ff8d9..76a089f55 100644 --- a/src/main/java/biomesoplenty/api/block/BOPBlocks.java +++ b/src/main/java/biomesoplenty/api/block/BOPBlocks.java @@ -127,6 +127,6 @@ public class BOPBlocks public static Block foliage; public static Block double_foliage; - + public static Block honey_block; } diff --git a/src/main/java/biomesoplenty/common/block/BlockHoney.java b/src/main/java/biomesoplenty/common/block/BlockHoney.java new file mode 100644 index 000000000..3c10c642f --- /dev/null +++ b/src/main/java/biomesoplenty/common/block/BlockHoney.java @@ -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 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; + } + +} \ No newline at end of file diff --git a/src/main/java/biomesoplenty/common/init/ModBlocks.java b/src/main/java/biomesoplenty/common/init/ModBlocks.java index 8d88ed1ea..bbd10149d 100644 --- a/src/main/java/biomesoplenty/common/init/ModBlocks.java +++ b/src/main/java/biomesoplenty/common/init/ModBlocks.java @@ -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" ); } diff --git a/src/main/resources/assets/biomesoplenty/blockstates/honey_block.json b/src/main/resources/assets/biomesoplenty/blockstates/honey_block.json new file mode 100644 index 000000000..05fcc8c7a --- /dev/null +++ b/src/main/resources/assets/biomesoplenty/blockstates/honey_block.json @@ -0,0 +1,5 @@ +{ + "variants": { + "normal": { "model": "biomesoplenty:honey_block" } + } +} diff --git a/src/main/resources/assets/biomesoplenty/models/block/honey_block.json b/src/main/resources/assets/biomesoplenty/models/block/honey_block.json new file mode 100644 index 000000000..007896f07 --- /dev/null +++ b/src/main/resources/assets/biomesoplenty/models/block/honey_block.json @@ -0,0 +1,6 @@ +{ + "parent": "block/cube_all", + "textures": { + "all": "biomesoplenty:blocks/honey_block" + } +} diff --git a/src/main/resources/assets/biomesoplenty/models/item/honey_block.json b/src/main/resources/assets/biomesoplenty/models/item/honey_block.json new file mode 100644 index 000000000..6df25c77e --- /dev/null +++ b/src/main/resources/assets/biomesoplenty/models/item/honey_block.json @@ -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 ] + } + } +} diff --git a/src/main/resources/assets/biomesoplenty/textures/blocks/honey_block.png b/src/main/resources/assets/biomesoplenty/textures/blocks/honey_block.png new file mode 100644 index 0000000000000000000000000000000000000000..d0d1a5a88019650e97203942948bb72f10e18335 GIT binary patch literal 15110 zcmeI3Yj6|S701^kHjXlOnTc^il1UbkQXY|3D{EzIBMI9QMxI*OwGFnX)MT~0wsw%T zLc7K?p{^eZg-+89q@6;BGA82|8dDw#PDx4}NZRm7Axug-)S;7<(!n?Z2ADLM=Fz*7 zEM3boH_7DV)r`Ey_x{g0cYo*HtNpSYYnCp_)7`Hl2qLf2xiCc= zO;jc)flvB`+aiJ3(gdCo17c7NsS5C;Gx~-7vMMWnd5V7ut?R4irg0A#l>sDt<1@E_o~#AD$ayR+RT(|7o*Y?ZrV)TE!GP0 z3faNEvaX28sdA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