trying to fix merge conflixt

This commit is contained in:
Mohammad-Ali Minaie
2018-10-20 19:49:32 -04:00
15 changed files with 141 additions and 33 deletions

View File

@@ -6,7 +6,7 @@ org.gradle.jvmargs=-Xmx3G
mod_group=nmd.primal.forgecraft mod_group=nmd.primal.forgecraft
mod_name=ForgeCraft mod_name=ForgeCraft
mod_version=1.6.29 mod_version=1.6.30
forge_version=14.23.4.2765 forge_version=14.23.4.2765
mcp_mappings=snapshot_20171003 mcp_mappings=snapshot_20171003
mc_version=1.12.2 mc_version=1.12.2

View File

@@ -22,7 +22,7 @@ public class ModInfo {
//public static final String MOD_PREFIX = MOD_ID + ":"; //public static final String MOD_PREFIX = MOD_ID + ":";
public static final String MOD_CHANNEL = MOD_ID; public static final String MOD_CHANNEL = MOD_ID;
public static final String MOD_VERSION = "1.6.29"; public static final String MOD_VERSION = "1.6.30";
public static final String MC_VERSIONS = "[1.12.0, 1.13.0)"; public static final String MC_VERSIONS = "[1.12.0, 1.13.0)";
public static final String DEPENDENCIES = "required-after:forge@[14.21.1.2400,);" + "required-after:primal@[0.6.69,);"; public static final String DEPENDENCIES = "required-after:forge@[14.21.1.2400,);" + "required-after:primal@[0.6.69,);";

View File

@@ -122,10 +122,10 @@ public class Chisel extends CustomFacing implements ToolMaterialMap {
} }
@Override @Override
public void onBlockPlacedBy(World worldIn, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack) public void onBlockPlacedBy(World world, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack)
{ {
if(!worldIn.isRemote) { if(!world.isRemote) {
worldIn.setBlockState(pos, state.withProperty(FACING, reverseFacing(EnumFacing.getDirectionFromEntityLiving(pos, placer))).withProperty(PrimalAPI.States.ACTIVE, Boolean.valueOf(false)), 2); world.setBlockState(pos, state.withProperty(FACING, EnumFacing.getFacingFromVector((float)placer.getLookVec().x, (float)placer.getLookVec().y, (float)placer.getLookVec().z)).withProperty(PrimalAPI.States.ACTIVE, Boolean.valueOf(false)), 2);
} }
} }

View File

@@ -114,7 +114,7 @@ public class NBTCrucible extends BlockContainer implements ITileEntityProvider {
} }
} }
} }
/**CLEARS THE INVENTORY**/ /**CLEARS THE INVENTORY**/
if(hand.equals(MAIN_HAND)) { if(hand.equals(MAIN_HAND)) {
if (player.isSneaking()) { if (player.isSneaking()) {
ItemStack pItem = player.inventory.getCurrentItem().copy(); ItemStack pItem = player.inventory.getCurrentItem().copy();
@@ -138,7 +138,7 @@ public class NBTCrucible extends BlockContainer implements ITileEntityProvider {
} }
} }
} }
/**REMOVE COOKED ITEM**/ /**REMOVE COOKED ITEM**/
if (player.isSneaking() == true) { if (player.isSneaking() == true) {
if (hand.equals(MAIN_HAND)) { if (hand.equals(MAIN_HAND)) {
ItemStack pItem = player.inventory.getCurrentItem().copy(); ItemStack pItem = player.inventory.getCurrentItem().copy();

View File

@@ -29,6 +29,7 @@ import nmd.primal.forgecraft.ModInfo;
import nmd.primal.forgecraft.blocks.CustomContainerFacing; import nmd.primal.forgecraft.blocks.CustomContainerFacing;
import nmd.primal.forgecraft.tiles.TileForge; import nmd.primal.forgecraft.tiles.TileForge;
import nmd.primal.forgecraft.util.ForgeHandler; import nmd.primal.forgecraft.util.ForgeHandler;
import nmd.primal.forgecraft.util.SlotHelper;
import javax.annotation.Nullable; import javax.annotation.Nullable;
import java.util.Random; import java.util.Random;
@@ -42,7 +43,7 @@ import static nmd.primal.core.common.helper.FireHelper.makeSmoke;
/** /**
* Created by kitsu on 11/26/2016. * Created by kitsu on 11/26/2016.
*/ */
public class Forge extends CustomContainerFacing implements ITileEntityProvider, ForgeHandler{ public class Forge extends CustomContainerFacing implements ITileEntityProvider, ForgeHandler, SlotHelper {
private int maxHeat; private int maxHeat;
//public static final PropertyBool PrimalAPI.States.ACTIVE = PropertyBool.create("PrimalAPI.States.ACTIVE"); //public static final PropertyBool PrimalAPI.States.ACTIVE = PropertyBool.create("PrimalAPI.States.ACTIVE");
@@ -97,7 +98,7 @@ public class Forge extends CustomContainerFacing implements ITileEntityProvider,
ItemStack fuelItem = tile.getSlotStack(0); ItemStack fuelItem = tile.getSlotStack(0);
/*********************** /***********************
FUEL SLOT CODE FUEL SLOT REMOVAL CODE
***********************/ ***********************/
if (!tile.getSlotStack(0).isEmpty()) { if (!tile.getSlotStack(0).isEmpty()) {
if (player.inventory.getCurrentItem().getItem() instanceof ItemSpade) { if (player.inventory.getCurrentItem().getItem() instanceof ItemSpade) {
@@ -107,6 +108,10 @@ public class Forge extends CustomContainerFacing implements ITileEntityProvider,
return true; return true;
} }
} }
/***********************
TEMP PRINT OUT CODE
***********************/
if (pItem.isEmpty()) { if (pItem.isEmpty()) {
if (!player.isSneaking()) { if (!player.isSneaking()) {
if (world.getBlockState(pos).getValue(PrimalAPI.States.ACTIVE) == true) { if (world.getBlockState(pos).getValue(PrimalAPI.States.ACTIVE) == true) {
@@ -119,6 +124,9 @@ public class Forge extends CustomContainerFacing implements ITileEntityProvider,
} }
} }
} }
/***********************
Forge Activation Code
***********************/
if ((FireSource.useSource(world, pos, facing, player, hand, pItem, hitX, hitY, hitZ))) { if ((FireSource.useSource(world, pos, facing, player, hand, pItem, hitX, hitY, hitZ))) {
world.setBlockState(pos, state.withProperty(PrimalAPI.States.ACTIVE, true), 2); world.setBlockState(pos, state.withProperty(PrimalAPI.States.ACTIVE, true), 2);
tile.setHeat(100); tile.setHeat(100);
@@ -126,34 +134,49 @@ public class Forge extends CustomContainerFacing implements ITileEntityProvider,
tile.updateBlock(); tile.updateBlock();
return true; return true;
} }
if ((!pItem.isEmpty()) && tile.isItemValidForSlot(0, pItem)) {
if (!fuelItem.isEmpty()) { /***********************
if (pItem.getItem() == fuelItem.getItem()) { FUEL SLOT MANAGEMENT Code
if (fuelItem.getCount() < 64) { ***********************/
if (fuelItem.getCount() + pItem.getCount() <= 64) {
fuelItem.grow(pItem.getCount()); /***********************
player.inventory.setInventorySlotContents(player.inventory.currentItem, ItemStack.EMPTY); FUEL SLOT IS EMPTYT
tile.markDirty(); ***********************/
tile.updateBlock(); if (tile.getSlotStack(0).isEmpty()) {
return true; if(tile.isItemValidForSlot(0, player.inventory.getCurrentItem())) {
} tile.setSlotStack(0, player.inventory.getCurrentItem());
if (fuelItem.getCount() + pItem.getCount() > 64) {
pItem.setCount(64 - pItem.getCount());
fuelItem.setCount(64);
tile.markDirty();
tile.updateBlock();
return true;
}
}
}
}
if (fuelItem.isEmpty()) {
tile.setSlotStack(0, pItem);
player.inventory.setInventorySlotContents(player.inventory.currentItem, ItemStack.EMPTY); player.inventory.setInventorySlotContents(player.inventory.currentItem, ItemStack.EMPTY);
tile.markDirty();
tile.updateBlock();
return true; return true;
} }
} }
/***********************
FUEL SLOT HAS STUFF
***********************/
if(ItemStack.areItemsEqual(player.inventory.getCurrentItem(), tile.getSlotStack(0)) && !tile.getSlotStack(0).isEmpty()) {
if (tile.getSlotStack(0).getCount() < 64) {
if (tile.getSlotStack(0).getCount() + player.inventory.getCurrentItem().getCount() <= 64) {
tile.getSlotStack(0).grow(pItem.getCount());
player.inventory.setInventorySlotContents(player.inventory.currentItem, ItemStack.EMPTY);
tile.markDirty();
tile.updateBlock();
return true;
}
if (tile.getSlotStack(0).getCount() + player.inventory.getCurrentItem().getCount() > 64) {
int count = 64 - tile.getSlotStack(0).getCount();
tile.getSlotStack(0).grow(count);
pItem.shrink(count);
tile.markDirty();
tile.updateBlock();
return true;
}
}
}
if (facing == EnumFacing.UP) { if (facing == EnumFacing.UP) {
doForgeInventoryManager(pItem, world, tile, pos, hitX, hitY, hitZ, state, player); doForgeInventoryManager(pItem, world, tile, pos, hitX, hitY, hitZ, state, player);
return true; return true;

View File

@@ -0,0 +1,10 @@
package nmd.primal.forgecraft.items.parts;
import nmd.primal.forgecraft.items.BaseItem;
public class WeaponGuard extends BaseItem {
public WeaponGuard(String registryName) {
super(registryName);
}
}

View File

@@ -0,0 +1,10 @@
package nmd.primal.forgecraft.items.parts;
import nmd.primal.forgecraft.items.BaseItem;
public class WeaponHandle extends BaseItem {
public WeaponHandle(String registryName) {
super(registryName);
}
}

View File

@@ -0,0 +1,27 @@
package nmd.primal.forgecraft.util;
import net.minecraft.item.ItemStack;
public interface SlotHelper {
default void doFuelSlotManagement(ItemStack tileSlot, ItemStack playerSlot){
/***
*
* if fuelSlot is empty and playeritem is valid, set fuelSlot playerItem and clear player item
*
* if fuelSlot isn't empty and player item matches
* if fuelSLot + playerItem <= 64 set Fuelslot to fuelSlot.count plus playerItem.count and clear playerItem
* if fuelSlot + playeritem > 64
* do 64 - fuelSlot
* add that to fuel slot
* decrment that from playerItem
*
*
*/
}
}

View File

@@ -0,0 +1,6 @@
{
"parent": "item/handheld",
"textures": {
"layer0": "forgecraft:items/boneguard"
}
}

View File

@@ -0,0 +1,6 @@
{
"parent": "item/handheld",
"textures": {
"layer0": "forgecraft:items/bonehandle"
}
}

View File

@@ -0,0 +1,13 @@
{
"type": "forge:ore_shaped",
"group": "forgecraft.bonehandle",
"result": { "item": "forgecraft.bonehandle", "count": 2 },
"pattern": [
"T",
"B"
],
"key": {
"T": { "type": "forge:ore_dict", "ore": "toolWorkBlade" },
"B": { "type": "forge:ore_dict", "ore": "bone" }
}
}

View File

@@ -0,0 +1,13 @@
{
"type": "forge:ore_shaped",
"group": "forgecraft.bonehandle",
"result": { "item": "forgecraft.bonehandle", "count": 2 },
"pattern": [
"T",
"B"
],
"key": {
"T": { "type": "forge:ore_dict", "ore": "toolSaw" },
"B": { "type": "forge:ore_dict", "ore": "bone" }
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 282 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 280 B

View File

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