updates to support the addition of new blocks and recipes, see to-do for upcoming work

This commit is contained in:
Mohammad-Ali Minaie
2017-02-07 08:46:55 -05:00
parent 1e1d620134
commit 890589b7ef
7 changed files with 51 additions and 46 deletions

View File

@@ -1,41 +1,10 @@
To-Dos
- [x] Forging Recipe Handler
- [x] Iron Temp Min
- [x] Iron Temp Max
- [x] Iron Ideal Time
- [x] Iron Time Modifier
- [x] Iron Failure Modifier
- [x] Iron Pre-Fail Output
- [x] Iron Success Output
- [x] Iron Post Fail Output
- [X] Soft Crucible
- [x] Model
- [x] Item
- [x] Tongs
- [x] Model
- [x] Item(s)
- [x] Functionality
- [x] Item NBT
- [x] Modify Model via NBT
- [x] Remove hot things from bloomery / firebox and place in world or anvil to cool
- [x] Update Forge Version 11.2
*** Priority ***
- [ ] 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
- [ ] Tongs Extract from bloomery for Hot Iron
- [ ] Tongs Extract from bloomery for Hot Iron Finished
- [ ] Item Drop for failed crucible
- [ ] Try Submodel
- [ ] Anvil

View File

@@ -131,18 +131,12 @@ public class Bloomery extends CustomContainerFacing implements ITileEntityProvid
return false;
}
if(tileItem1.isEmpty()){
ItemStack tempItem = new ItemStack(ModItems.softcrucible, 1);
ItemStack tempItem = new ItemStack(pItem.getItem(), 1);
tile.setSlotStack(1, tempItem);
pItem.shrink(1);
}
}
/*if(!pItem.isEmpty()) {
if(pItem.getItem() == Item.getItemFromBlock(Blocks.STONE_SLAB)){
world.setBlockState(pos, state.withProperty(COVERED, true), 2);
return true;
}
}*/
}
}
}
return false;

View File

@@ -90,9 +90,10 @@ 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));
if(StringUtils.isEmpty(this.getUnlocalizedName()) == false) {
if (checkDrops(this.getUnlocalizedName()).equals(this.getUnlocalizedName())) {
spawnItemEntityFromWorld(world, pos, new ItemStack(getItemFromName(this.getUnlocalizedName()), 1));
}
}
}
}

View File

@@ -1,10 +1,13 @@
package nmd.primal.forgecraft.blocks;
import net.minecraft.block.Block;
import net.minecraft.block.BlockDynamicLiquid;
import net.minecraft.block.ITileEntityProvider;
import net.minecraft.block.material.Material;
import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.EnumBlockRenderType;
import net.minecraft.util.EnumFacing;
@@ -16,7 +19,13 @@ import net.minecraft.world.World;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import nmd.primal.forgecraft.ModInfo;
import nmd.primal.forgecraft.init.ModBlocks;
import nmd.primal.forgecraft.tiles.TileBaseCrucible;
import org.apache.commons.lang3.StringUtils;
import java.util.Random;
import static nmd.primal.forgecraft.CommonUtils.spawnItemEntityFromWorld;
/**
* Created by mminaie on 2/4/17.
@@ -42,6 +51,20 @@ public class CrucibleHot extends Block implements ITileEntityProvider {
return false;
}
public void onBlockDestroyedByPlayer(World world, BlockPos pos, IBlockState state)
{
if(!world.isRemote){
world.setBlockState(pos, Blocks.FLOWING_LAVA.getDefaultState().withProperty(BlockDynamicLiquid.LEVEL, 1), 3);
}
}
@Override
public int quantityDropped(Random random)
{
return 0;
}
@Override
public TileEntity createNewTileEntity(World worldIn, int meta)
{

View File

@@ -60,7 +60,7 @@ public class ModBlocks {
hotcookedironcrucible = new CrucibleHot(Material.ROCK, "hotcookedironcrucible");
coolironcrucible = new Crucible(Material.ROCK, "coolironcrucible");
failedironcrucible = new Crucible(Material.ROCK, "failedironcrucible");
failedironcruciblehot = new Crucible(Material.ROCK, "failedironcruciblehot");
failedironcruciblehot = new CrucibleHot(Material.ROCK, "failedironcruciblehot");
ironball = new IngotBall(Material.IRON, "ironball", 5.0F);

View File

@@ -88,5 +88,18 @@ public class ModCrafting {
0.5f
);
//Remakes the Burnt Hot Iron Crucible
BloomeryCrafting.addRecipe(
new ItemStack(ModBlocks.failedironcruciblehot, 1),
new ItemStack(ModBlocks.failedironcruciblehot, 1),
new ItemStack(ModBlocks.failedironcruciblehot, 1),
new ItemStack(ModBlocks.failedironcrucible, 1),
5000,
5000,
800,
0.0f,
0.0f
);
}
}

View File

@@ -4,6 +4,7 @@ import net.minecraft.block.BlockFurnace;
import net.minecraft.block.state.IBlockState;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntityFurnace;
@@ -14,6 +15,7 @@ import net.minecraft.world.World;
import nmd.primal.forgecraft.blocks.Bloomery;
import nmd.primal.forgecraft.blocks.Firebox;
import nmd.primal.forgecraft.crafting.BloomeryCrafting;
import nmd.primal.forgecraft.init.ModBlocks;
import nmd.primal.forgecraft.init.ModItems;
import static nmd.primal.forgecraft.CommonUtils.getVanillaItemBurnTime;
@@ -179,6 +181,9 @@ public class TileBloomery extends TileBaseSlot implements ITickable {
if (stack.getItem() == ModItems.softcrucible) {
return true;
}
if(stack.getItem() == Item.getItemFromBlock(ModBlocks.rawironcrucible)){
return true;
}
}
return false;
}