From 1e1d6201346773f4904a69dee9c2b1788adc6c51 Mon Sep 17 00:00:00 2001 From: Mohammad-Ali Minaie Date: Mon, 6 Feb 2017 22:03:27 -0500 Subject: [PATCH] check to-dos for current state --- 1.11/To-Dos | 13 ++-- .../primal/forgecraft/blocks/BlockBase.java | 20 ++++++ .../forgecraft/blocks/BlockCustomBase.java | 61 ++++++++++++++++++ .../primal/forgecraft/blocks/Crucible.java | 3 +- .../primal/forgecraft/blocks/IngotBall.java | 27 ++++++++ .../nmd/primal/forgecraft/init/ModBlocks.java | 8 +++ .../primal/forgecraft/init/ModCrafting.java | 31 ++++++++- .../forgecraft/blockstates/ironball.json | 5 ++ .../forgecraft/models/block/ironball.json | 40 ++++++++++++ .../forgecraft/models/item/ironball.json | 8 +++ .../forgecraft/textures/blocks/iron_ingot.png | Bin 0 -> 714 bytes 11 files changed, 209 insertions(+), 7 deletions(-) create mode 100644 1.11/src/main/java/nmd/primal/forgecraft/blocks/BlockBase.java create mode 100644 1.11/src/main/java/nmd/primal/forgecraft/blocks/BlockCustomBase.java create mode 100644 1.11/src/main/java/nmd/primal/forgecraft/blocks/IngotBall.java create mode 100644 1.11/src/main/resources/assets/forgecraft/blockstates/ironball.json create mode 100644 1.11/src/main/resources/assets/forgecraft/models/block/ironball.json create mode 100644 1.11/src/main/resources/assets/forgecraft/models/item/ironball.json create mode 100644 1.11/src/main/resources/assets/forgecraft/textures/blocks/iron_ingot.png diff --git a/1.11/To-Dos b/1.11/To-Dos index b60e80ee..4015f269 100644 --- a/1.11/To-Dos +++ b/1.11/To-Dos @@ -26,11 +26,14 @@ To-Dos - [x] Update Forge Version 11.2 *** Priority *** -- [ ] Wrought Iron Ingot model -- [ ] Crafting for filled crucible -- [ ] Crafting Recipe for filled iron crucible -- [ ] Crafting Recipe for hot iron crucible -- [ ] Crafting Recipe for hot cooked iron crucible +- [ ] isItemValidForSlot tileBloomery +- [ ] Null Check for Crucible +- [x] Wrought Iron Ingot model +- [x] Crafting for filled crucible +- [x] Bloomery Recipe for filled iron crucible +- [x] Bloomery Recipe for hot iron crucible +- [x] Bloomery Recipe for hot cooked iron crucible + - [ ] Item Drop for failed crucible diff --git a/1.11/src/main/java/nmd/primal/forgecraft/blocks/BlockBase.java b/1.11/src/main/java/nmd/primal/forgecraft/blocks/BlockBase.java new file mode 100644 index 00000000..b901f641 --- /dev/null +++ b/1.11/src/main/java/nmd/primal/forgecraft/blocks/BlockBase.java @@ -0,0 +1,20 @@ +package nmd.primal.forgecraft.blocks; + +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import nmd.primal.forgecraft.ModInfo; + +/** + * Created by mminaie on 2/6/17. + */ +public class BlockBase extends Block{ + + public BlockBase(Material material, String registryName, Float hardness) { + super(material); + setUnlocalizedName(registryName); + setRegistryName(registryName); + setCreativeTab(ModInfo.TAB_FORGECRAFT); + setHardness(hardness); + } + +} diff --git a/1.11/src/main/java/nmd/primal/forgecraft/blocks/BlockCustomBase.java b/1.11/src/main/java/nmd/primal/forgecraft/blocks/BlockCustomBase.java new file mode 100644 index 00000000..4ce7313e --- /dev/null +++ b/1.11/src/main/java/nmd/primal/forgecraft/blocks/BlockCustomBase.java @@ -0,0 +1,61 @@ +package nmd.primal.forgecraft.blocks; + +import net.minecraft.block.material.Material; +import net.minecraft.block.state.IBlockState; +import net.minecraft.util.EnumBlockRenderType; +import net.minecraft.util.EnumFacing; +import net.minecraft.util.math.AxisAlignedBB; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.IBlockAccess; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; +import nmd.primal.forgecraft.ModInfo; + +/** + * Created by mminaie on 2/6/17. + */ +public class BlockCustomBase extends BlockBase { + + protected static final AxisAlignedBB boundBox = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 1.0D, 1.0D); + + public BlockCustomBase(Material material, String registryName, Float hardness) { + super(material, registryName, hardness); + } + + @Override + public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos) + { + return boundBox; + } + + @Override + public boolean isFullCube(IBlockState state) + { + return false; + } + + @Override + public boolean isFullyOpaque(IBlockState state) + { + return false; + } + + @Override + public boolean isOpaqueCube(IBlockState state) + { + return false; + } + + @Override + @SideOnly(Side.CLIENT) + public boolean shouldSideBeRendered(IBlockState blockState, IBlockAccess blockAccess, BlockPos pos, EnumFacing side) + { + return true; + } + + @Override + public EnumBlockRenderType getRenderType(IBlockState state) + { + return EnumBlockRenderType.MODEL; + } +} diff --git a/1.11/src/main/java/nmd/primal/forgecraft/blocks/Crucible.java b/1.11/src/main/java/nmd/primal/forgecraft/blocks/Crucible.java index 9101a0b4..c137c509 100644 --- a/1.11/src/main/java/nmd/primal/forgecraft/blocks/Crucible.java +++ b/1.11/src/main/java/nmd/primal/forgecraft/blocks/Crucible.java @@ -90,6 +90,7 @@ public class Crucible extends Block { if(!world.isRemote){ spawnItemEntityFromWorld(world, pos, new ItemStack(ModBlocks.emptycrucible, 1)); + //Insert Null Check if (checkDrops(this.getUnlocalizedName()).equals(this.getUnlocalizedName())){ spawnItemEntityFromWorld(world, pos, new ItemStack(getItemFromName(this.getUnlocalizedName()), 1)); } @@ -107,7 +108,7 @@ public class Crucible extends Block { private Item getItemFromName(String name){ if(name.equals(getUnlocalizedName())){ - return Items.IRON_INGOT; + return Item.getItemFromBlock(ModBlocks.ironball); } else return Items.AIR; } diff --git a/1.11/src/main/java/nmd/primal/forgecraft/blocks/IngotBall.java b/1.11/src/main/java/nmd/primal/forgecraft/blocks/IngotBall.java new file mode 100644 index 00000000..812393f4 --- /dev/null +++ b/1.11/src/main/java/nmd/primal/forgecraft/blocks/IngotBall.java @@ -0,0 +1,27 @@ +package nmd.primal.forgecraft.blocks; + +import net.minecraft.block.material.Material; +import net.minecraft.block.state.IBlockState; +import net.minecraft.util.math.AxisAlignedBB; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.IBlockAccess; +import nmd.primal.forgecraft.ModInfo; + +/** + * Created by mminaie on 2/6/17. + */ +public class IngotBall extends BlockCustomBase { + + protected static final AxisAlignedBB boundBox = new AxisAlignedBB(7/16D, 0.0D, 7/16D, 9/16D, 2/16D, 9/16D); + + public IngotBall(Material material, String registryName, Float hardness){ + super(material, registryName, hardness); + } + + @Override + public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos) + { + return boundBox; + } + +} diff --git a/1.11/src/main/java/nmd/primal/forgecraft/init/ModBlocks.java b/1.11/src/main/java/nmd/primal/forgecraft/init/ModBlocks.java index 71527032..d6ea9f41 100644 --- a/1.11/src/main/java/nmd/primal/forgecraft/init/ModBlocks.java +++ b/1.11/src/main/java/nmd/primal/forgecraft/init/ModBlocks.java @@ -34,6 +34,9 @@ public class ModBlocks { public static Block failedironcrucible; public static Block failedironcruciblehot; + public static Block ironball; + + public static void init() { firebox = new Firebox(Material.ROCK); @@ -59,6 +62,8 @@ public class ModBlocks { failedironcrucible = new Crucible(Material.ROCK, "failedironcrucible"); failedironcruciblehot = new Crucible(Material.ROCK, "failedironcruciblehot"); + ironball = new IngotBall(Material.IRON, "ironball", 5.0F); + } public static void register() { @@ -84,6 +89,7 @@ public class ModBlocks { registerBlock(failedironcrucible); registerBlock(failedironcruciblehot); + registerBlock(ironball); } public static void registerRenders() { @@ -107,6 +113,8 @@ public class ModBlocks { registerRender(failedironcrucible); registerRender(failedironcruciblehot); + registerRender(ironball); + } private static void registerBlock(Block block) { diff --git a/1.11/src/main/java/nmd/primal/forgecraft/init/ModCrafting.java b/1.11/src/main/java/nmd/primal/forgecraft/init/ModCrafting.java index 265822af..f090cac5 100644 --- a/1.11/src/main/java/nmd/primal/forgecraft/init/ModCrafting.java +++ b/1.11/src/main/java/nmd/primal/forgecraft/init/ModCrafting.java @@ -37,7 +37,8 @@ public class ModCrafting { GameRegistry.addShapedRecipe(new ItemStack(ModItems.stonetongs, 1), "X X", "YSY", 'X', Blocks.STONE, 'S', Items.STRING, 'Y', Items.STICK); /***Bloomery Crafting***/ - //DryingRecipe.addRecipe(new ItemStack(Items.FISH, 1, 0), new ItemStack(PrimalItems.FISH_COD_DRIED), new ItemStack(PrimalItems.FISH_COD_ROTTEN), 25, 0.006F); + +//Makes the Empty Crucible BloomeryCrafting.addRecipe( new ItemStack(ModItems.softcrucible, 1), new ItemStack(ModBlocks.emptycruciblehot, 1), @@ -49,6 +50,7 @@ public class ModCrafting { 0.25f, 0.25f); +//Makes the Cracked Crucible BloomeryCrafting.addRecipe( new ItemStack(ModBlocks.emptycruciblehot, 1), new ItemStack(ModBlocks.emptycruciblecrackedhot, 1), @@ -59,5 +61,32 @@ public class ModCrafting { 600, 0.0f, 0.0f); + +//Makes the Hot Iron Crucible + BloomeryCrafting.addRecipe( + new ItemStack(ModBlocks.rawironcrucible, 1), + new ItemStack(ModBlocks.hotironcrucible, 1), + new ItemStack(ModBlocks.hotironcrucible, 1), + new ItemStack(ModBlocks.rawironcrucible, 1), + 800, + 20, + 500, + 0.5f, + 0.0f + ); + +//Makes the Finished Hot Iron Crucible + BloomeryCrafting.addRecipe( + new ItemStack(ModBlocks.hotironcrucible, 1), + new ItemStack(ModBlocks.hotcookedironcrucible, 1), + new ItemStack(ModBlocks.failedironcruciblehot, 1), + new ItemStack(ModBlocks.coolironcrucible, 1), + 1550, + 1200, + 800, + 0.33f, + 0.5f + ); + } } diff --git a/1.11/src/main/resources/assets/forgecraft/blockstates/ironball.json b/1.11/src/main/resources/assets/forgecraft/blockstates/ironball.json new file mode 100644 index 00000000..93632e8c --- /dev/null +++ b/1.11/src/main/resources/assets/forgecraft/blockstates/ironball.json @@ -0,0 +1,5 @@ +{ + "variants": { + "normal": { "model": "forgecraft:ironball" } + } +} \ No newline at end of file diff --git a/1.11/src/main/resources/assets/forgecraft/models/block/ironball.json b/1.11/src/main/resources/assets/forgecraft/models/block/ironball.json new file mode 100644 index 00000000..f899f75e --- /dev/null +++ b/1.11/src/main/resources/assets/forgecraft/models/block/ironball.json @@ -0,0 +1,40 @@ +{ + "__comment": "Designed by Kitsushadow with Cubik Studio - https://cubik.studio", + "textures": { + "particle": "forgecraft:blocks/iron_ingot", + "texture": "forgecraft:blocks/iron_ingot" + }, + "elements": [ + { + "__comment": "Cube1", + "from": [ 7, 0, 7 ], + "to": [ 9, 2, 9 ], + "faces": { + "down": { "uv": [ 7, 5, 9, 7 ], "texture": "#texture" }, + "up": { "uv": [ 7, 7, 9, 9 ], "texture": "#texture" }, + "north": { "uv": [ 7, 12, 9, 14 ], "texture": "#texture" }, + "south": { "uv": [ 7, 14, 9, 16 ], "texture": "#texture" }, + "west": { "uv": [ 5, 8, 7, 10 ], "texture": "#texture" }, + "east": { "uv": [ 5, 10, 7, 12 ], "texture": "#texture" } + } + } + ], + "display": { + "thirdperson_righthand": { + "translation": [ 0, 7, -0.7 ] + }, + "firstperson_righthand": { + "translation": [ 0, 7.35, 0 ] + }, + "gui": { + "rotation": [ 30, 225, 0 ], + "scale": [ 0.625, 0.625, 0.625 ] + }, + "ground": { + "translation": [ 0, 4, 0 ] + }, + "fixed": { + "translation": [ 0, 7, 0 ] + } + } +} \ No newline at end of file diff --git a/1.11/src/main/resources/assets/forgecraft/models/item/ironball.json b/1.11/src/main/resources/assets/forgecraft/models/item/ironball.json new file mode 100644 index 00000000..ec035235 --- /dev/null +++ b/1.11/src/main/resources/assets/forgecraft/models/item/ironball.json @@ -0,0 +1,8 @@ +{ + "forge_marker":1, + "textures": { + "particle": "forgecraft:blocks/iron_ingot", + "texture": "forgecraft:blocks/iron_ingot" + }, + "parent": "forgecraft:block/ironball" +} \ No newline at end of file diff --git a/1.11/src/main/resources/assets/forgecraft/textures/blocks/iron_ingot.png b/1.11/src/main/resources/assets/forgecraft/textures/blocks/iron_ingot.png new file mode 100644 index 0000000000000000000000000000000000000000..b6739c167607c4c3c59fe15e6aa8a101cdbb1b01 GIT binary patch literal 714 zcmV;*0yX`KP)di=Q#jD5MTi)rM9^KrIbw5gw`6{wgC`A z5JeGT7;-+JX_^LWnkF2_K}tzkmW<`36h&MQ>-+l~r4;MBZsuCo70a>+f`HG@Pl6zzZQH*cT#W&2hH)H+ wIF6a72_XbomXT!{r_+gLS-8KyXBY