fixed missing recipe and breaker bug

This commit is contained in:
Mohammad-Ali Minaie
2017-06-27 22:20:55 -04:00
parent 16868d3a1c
commit ee788d0b35
1517 changed files with 41 additions and 11659 deletions

View File

@@ -5,7 +5,7 @@ org.gradle.jvmargs=-Xmx3G
mod_group=nmd.primal.forgecraft
mod_name=ForgeCraft
mod_version=1.2.52
mod_version=1.2.53
forge_version=13.20.0.2315
mcp_mappings=snapshot_20170121
mc_version=1.11.2

View File

@@ -17,7 +17,7 @@ public class ModInfo {
public static final String MOD_CONFIG = "primal/" + MOD_ID;
//public static final String MOD_PREFIX = MOD_ID + ":";
public static final String MOD_CHANNEL = MOD_ID;
public static final String MOD_VERSION = "1.2.52";
public static final String MOD_VERSION = "1.2.53";
public static final String MC_VERSIONS = "[1.11.0, 1.12.0)";
public static final String DEPENDENCIES = "required-after:forge@[13.20.0.2315,);" + "required-after:primal@[0.4,);";

View File

@@ -54,8 +54,9 @@ public class Breaker extends CustomContainerFacing implements BreakerHandler {
}*/
if(state.getValue(PrimalStates.ACTIVE) == true && player.isSneaking() && pItem.isEmpty()){
world.setBlockState(pos, state.withProperty(FACING, state.getValue(FACING)).withProperty(PrimalStates.ACTIVE, false));
doBreaking(world, state, pos, tile);
world.setBlockState(pos, state.withProperty(FACING, state.getValue(FACING)).withProperty(PrimalStates.ACTIVE, false));
tile.setCharge(0);
return true;
}

View File

@@ -34,6 +34,12 @@ public class ModCrafting {
true, new Object[]{" S ", "S S", " S ",
('S'), "logSplit"
}));
/***CASTING MUD***/
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.castingmud, 4),
true, new Object[]{" C ", "CSC", " C ",
('S'), Blocks.SAND,
('C'), PrimalItems.MUD_CLUMP
}));
/***Forge***/
GameRegistry.addShapedRecipe(new ItemStack(ModBlocks.forge_brick),

View File

@@ -46,48 +46,59 @@ return false;
//if(hasOreName(new ItemStack(Blocks.LOG), "logWood"))
// item is logWood
default void doBreaking(World world, IBlockState state, BlockPos pos, TileBreaker tile){
for (EnumFacing face : EnumFacing.values()) {
if(world.getBlockState(pos).getValue(CustomContainerFacing.FACING) == face) {
if (tile.getCharge() > getThreshold(world, pos.offset(face))) {
Block smashBlock = world.getBlockState(pos.offset(face)).getBlock();
ItemStack smashStack = new ItemStack(smashBlock, 1);
System.out.println(smashStack.getItem());
if (hasOreName(smashStack, "oreIron")) {
default boolean doBreaking(World world, IBlockState state, BlockPos pos, TileBreaker tile) {
for (int i=0; i < EnumFacing.HORIZONTALS.length; i++) {
EnumFacing face = world.getBlockState(pos).getValue(CustomContainerFacing.FACING);
if(face.equals(world.getBlockState(pos).getValue(CustomContainerFacing.FACING))){
Block smashBlock = world.getBlockState(pos.offset(face)).getBlock();
ItemStack smashStack = new ItemStack(smashBlock);
if (hasOreName(smashStack, "oreIron")) {
if (tile.getCharge() > getThreshold(world, pos.offset(face))) {
world.setBlockToAir(pos.offset(face));
PlayerHelper.spawnItemOnGround(world, pos.offset(face), new ItemStack(PrimalItems.IRON_DUST, randomChanceReturn(9, 1, 2)));
tile.getSlotStack(0).setItemDamage(tile.getSlotStack(0).getItemDamage() + 1);
return true;
}
if (hasOreName(smashStack, "oreCopper")) {
}
if (hasOreName(smashStack, "oreCopper")) {
if (tile.getCharge() > getThreshold(world, pos.offset(face))) {
world.setBlockToAir(pos.offset(face));
PlayerHelper.spawnItemOnGround(world, pos.offset(face), new ItemStack(PrimalItems.COPPER_DUST, randomChanceReturn(9, 1, 2)));
tile.getSlotStack(0).setItemDamage(tile.getSlotStack(0).getItemDamage() + 1);
return true;
}
if (hasOreName(smashStack, "oreTin")) {
}
if (hasOreName(smashStack, "oreTin")) {
if (tile.getCharge() > getThreshold(world, pos.offset(face))) {
world.setBlockToAir(pos.offset(face));
PlayerHelper.spawnItemOnGround(world, pos.offset(face), new ItemStack(PrimalItems.TIN_DUST, randomChanceReturn(9, 1, 2)));
tile.getSlotStack(0).setItemDamage(tile.getSlotStack(0).getItemDamage() + 1);
return true;
}
if (hasOreName(smashStack, "oreZinc")) {
}
if (hasOreName(smashStack, "oreZinc")) {
if (tile.getCharge() > getThreshold(world, pos.offset(face))) {
world.setBlockToAir(pos.offset(face));
PlayerHelper.spawnItemOnGround(world, pos.offset(face), new ItemStack(PrimalItems.ZINC_DUST, randomChanceReturn(9, 1, 2)));
tile.getSlotStack(0).setItemDamage(tile.getSlotStack(0).getItemDamage() + 1);
return true;
}
if (hasOreName(smashStack, "oreGold")) {
}
if (hasOreName(smashStack, "oreGold")) {
if (tile.getCharge() > getThreshold(world, pos.offset(face))) {
world.setBlockToAir(pos.offset(face));
PlayerHelper.spawnItemOnGround(world, pos.offset(face), new ItemStack(PrimalItems.GOLD_DUST, randomChanceReturn(9, 1, 2)));
tile.getSlotStack(0).setItemDamage(tile.getSlotStack(0).getItemDamage() + 1);
return true;
}
} else {
tile.getSlotStack(0).setItemDamage(tile.getSlotStack(0).getItemDamage() + 10);
}
} else {
tile.getSlotStack(0).setItemDamage(tile.getSlotStack(0).getItemDamage() + 10);
return true;
}
tile.setCharge(0.0f);
i++;
}
return false;
}
default float getThreshold(World world, BlockPos pos){

View File

@@ -2,7 +2,7 @@
"modid": "forgecraft",
"name": "Kitsu's Forgecraft",
"description": "Forged with sweat and blood",
"version": "1.2.52",
"version": "1.2.53",
"mcversion": "1.11.2",
"url": "",
"updateUrl": "",