From b26378ca17dbeb37648d95d7f0b2a1ed50e54358 Mon Sep 17 00:00:00 2001 From: Cheeserolls Date: Fri, 27 Mar 2015 17:58:47 +0000 Subject: [PATCH] Add crystal and crystal shard --- .../biomesoplenty/api/block/BOPBlocks.java | 1 - .../java/biomesoplenty/api/item/BOPItems.java | 1 + .../common/block/BlockCrystal.java | 42 ++++++++++++++++++ .../biomesoplenty/blockstates/crystal.json | 5 +++ .../assets/biomesoplenty/lang/en_US.lang | 2 + .../biomesoplenty/models/block/crystal.json | 6 +++ .../biomesoplenty/models/item/crystal.json | 10 +++++ .../models/item/crystal_shard.json | 18 ++++++++ .../biomesoplenty/textures/blocks/crystal.png | Bin 0 -> 439 bytes .../textures/items/crystal_shard.png | Bin 0 -> 437 bytes 10 files changed, 84 insertions(+), 1 deletion(-) create mode 100644 src/main/java/biomesoplenty/common/block/BlockCrystal.java create mode 100644 src/main/resources/assets/biomesoplenty/blockstates/crystal.json create mode 100644 src/main/resources/assets/biomesoplenty/models/block/crystal.json create mode 100644 src/main/resources/assets/biomesoplenty/models/item/crystal.json create mode 100644 src/main/resources/assets/biomesoplenty/models/item/crystal_shard.json create mode 100644 src/main/resources/assets/biomesoplenty/textures/blocks/crystal.png create mode 100644 src/main/resources/assets/biomesoplenty/textures/items/crystal_shard.png diff --git a/src/main/java/biomesoplenty/api/block/BOPBlocks.java b/src/main/java/biomesoplenty/api/block/BOPBlocks.java index a1c8bd792..9d15911bb 100644 --- a/src/main/java/biomesoplenty/api/block/BOPBlocks.java +++ b/src/main/java/biomesoplenty/api/block/BOPBlocks.java @@ -43,6 +43,5 @@ public class BOPBlocks public static Block dried_dirt; public static Block crag_rock; public static Block mud_brick; - public static Block biome_block; public static Block crystal; } diff --git a/src/main/java/biomesoplenty/api/item/BOPItems.java b/src/main/java/biomesoplenty/api/item/BOPItems.java index ee649bae7..822a15008 100644 --- a/src/main/java/biomesoplenty/api/item/BOPItems.java +++ b/src/main/java/biomesoplenty/api/item/BOPItems.java @@ -19,4 +19,5 @@ public class BOPItems public static Item persimmon; public static Item peach; public static Item pear; + public static Item crystal_shard; } \ No newline at end of file diff --git a/src/main/java/biomesoplenty/common/block/BlockCrystal.java b/src/main/java/biomesoplenty/common/block/BlockCrystal.java new file mode 100644 index 000000000..9a10f51a4 --- /dev/null +++ b/src/main/java/biomesoplenty/common/block/BlockCrystal.java @@ -0,0 +1,42 @@ +/******************************************************************************* + * 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 java.util.Random; + +import biomesoplenty.api.block.BOPBlock; +import biomesoplenty.api.item.BOPItems; +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.block.state.IBlockState; +import net.minecraft.item.Item; + +public class BlockCrystal extends BOPBlock +{ + public BlockCrystal() { + super(Material.glass); + this.setHardness(0.15F); + this.setResistance(5.0F); + this.setLightLevel(1.0F); + this.setStepSound(Block.soundTypeGlass); + } + + @Override + public Item getItemDropped(IBlockState state, Random rand, int fortune) + { + return BOPItems.crystal_shard; + } + + @Override + public int quantityDropped(Random random) + { + return 4; + } + +} \ No newline at end of file diff --git a/src/main/resources/assets/biomesoplenty/blockstates/crystal.json b/src/main/resources/assets/biomesoplenty/blockstates/crystal.json new file mode 100644 index 000000000..8c949439e --- /dev/null +++ b/src/main/resources/assets/biomesoplenty/blockstates/crystal.json @@ -0,0 +1,5 @@ +{ + "variants": { + "normal": { "model": "biomesoplenty:crystal" } + } +} diff --git a/src/main/resources/assets/biomesoplenty/lang/en_US.lang b/src/main/resources/assets/biomesoplenty/lang/en_US.lang index 7a01f27b7..28da0691f 100644 --- a/src/main/resources/assets/biomesoplenty/lang/en_US.lang +++ b/src/main/resources/assets/biomesoplenty/lang/en_US.lang @@ -155,6 +155,7 @@ tile.hard_ice.name=Hardened Ice tile.dried_dirt.name=Dried Dirt tile.crag_rock.name=Crag Rock tile.mud_brick.name=Mud Bricks +tile.crystal.name=Celestial Crystal item.fleshchunk.name=Chunk of Flesh item.mudball.name=Mud Ball @@ -163,3 +164,4 @@ item.turnip_seeds.name=Turnip Seeds item.persimmon.name=Persimmon item.peach.name=Peach item.pear.name=Pear +item.crystal_shard.name=Celestial Crystal Shard diff --git a/src/main/resources/assets/biomesoplenty/models/block/crystal.json b/src/main/resources/assets/biomesoplenty/models/block/crystal.json new file mode 100644 index 000000000..45f8574fa --- /dev/null +++ b/src/main/resources/assets/biomesoplenty/models/block/crystal.json @@ -0,0 +1,6 @@ +{ + "parent": "block/cube_all", + "textures": { + "all": "biomesoplenty:blocks/crystal" + } +} diff --git a/src/main/resources/assets/biomesoplenty/models/item/crystal.json b/src/main/resources/assets/biomesoplenty/models/item/crystal.json new file mode 100644 index 000000000..a30f14b12 --- /dev/null +++ b/src/main/resources/assets/biomesoplenty/models/item/crystal.json @@ -0,0 +1,10 @@ +{ + "parent": "biomesoplenty:block/crystal", + "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/models/item/crystal_shard.json b/src/main/resources/assets/biomesoplenty/models/item/crystal_shard.json new file mode 100644 index 000000000..c0f90acaa --- /dev/null +++ b/src/main/resources/assets/biomesoplenty/models/item/crystal_shard.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "biomesoplenty:items/crystal_shard" + }, + "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 ] + } + } +} diff --git a/src/main/resources/assets/biomesoplenty/textures/blocks/crystal.png b/src/main/resources/assets/biomesoplenty/textures/blocks/crystal.png new file mode 100644 index 0000000000000000000000000000000000000000..6ec662670f4cd5f3640c87abed96fa6187b1e1a9 GIT binary patch literal 439 zcmV;o0Z9IdP)<{98gxZibW?9;ba!ELWdKlNX>N2bPDNB8 zb~7$DE-^7j^FlWO00A>eL_t(IPfd|AN<&c)Mc)=oVc{auScrv1(x{!bT8Ui*3F&NH zfjbcFL?xBD0UHBpVlN0O1d$K|$p$=+^SOMu|L4ujx%1{v%G1r_WPjM*IgG{^Kj+<1 zuQO1D=}?$z!hJq0$&e>m4c6Ugi)_E_y>RhApgt$=v)8*002ovPDHLkV1ilYt*ih5 literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/biomesoplenty/textures/items/crystal_shard.png b/src/main/resources/assets/biomesoplenty/textures/items/crystal_shard.png new file mode 100644 index 0000000000000000000000000000000000000000..5e426c88544118e4c4679b9e84fe3c1fdd25606f GIT binary patch literal 437 zcmV;m0ZRUfP)N2bPDNB8 zb~7$DE-^7j^FlWO00A*cL_t(IPhgoS+mXrP$`Yrt*Y+m=@N->tO0U!mZx4r#8 zrSSa!WV=-{0h|qIfD}#w+MeSzAE!oa7|wucB32^|V-+L? fV-+MG|7QRI$iKG!-y%*s00000NkvXXu0mjfm