From bd140502f5d1a8bc78c27f79327be89caf0d76fe Mon Sep 17 00:00:00 2001 From: Mohammad-Ali Minaie Date: Sat, 1 Apr 2017 20:29:36 -0400 Subject: [PATCH 1/5] updating ignore --- .gitignore | 6 +- .../nmd/primal/forgecraft/blocks/Anvil.java | 95 ++++++++++--------- 2 files changed, 54 insertions(+), 47 deletions(-) diff --git a/.gitignore b/.gitignore index 42bedf08..3ea35ad1 100644 --- a/.gitignore +++ b/.gitignore @@ -19,7 +19,11 @@ forge-*-changelog.txt 1.11/usernamecache.json 1.11/options.txt *.DS_Store - +*.iml +*.ipr +*.iws +1.11/eula.txt +1.11/server.properties # eclipse bin diff --git a/1.11/src/main/java/nmd/primal/forgecraft/blocks/Anvil.java b/1.11/src/main/java/nmd/primal/forgecraft/blocks/Anvil.java index f435c409..978e2587 100644 --- a/1.11/src/main/java/nmd/primal/forgecraft/blocks/Anvil.java +++ b/1.11/src/main/java/nmd/primal/forgecraft/blocks/Anvil.java @@ -94,6 +94,8 @@ public class Anvil extends CustomContainerFacing { //System.out.println("Tile is not null"); //if ((player.inventory.getCurrentItem().getItem().equals(PrimalItems.STONE_GALLAGHER)) || (player.inventory.getCurrentItem().getItem() == ModItems.forgehammer)) { + + if ((pItem.getItem() instanceof WorkMallet) || (pItem.getItem() == ModItems.forgehammer)) { @@ -244,65 +246,66 @@ public class Anvil extends CustomContainerFacing { if ( (!(pItem.getItem() instanceof WorkMallet)) || (!(pItem.getItem() instanceof ForgeHammer)) ) { + if(Block.getBlockFromItem(pItem.getItem()) instanceof IngotBall) { + return false; + } - if (state.getValue(FACING) == EnumFacing.NORTH) { - int counter = 0; - for (int z = 0; z < 5; z++) { - for (int x = 0; x < 5; x++) { - if (hitx >= this.getNormalMin(x) && hitx <= this.getNormalMax(x)) { - if (hitz >= this.getNormalMin(z) && hitz <= this.getNormalMax(z)) { - doWork(pItem, counter, tile, world, pos, player); - return true; - } - } - counter++; + if (state.getValue(FACING) == EnumFacing.NORTH) { + int counter = 0; + for (int z = 0; z < 5; z++) { + for (int x = 0; x < 5; x++) { + if (hitx >= this.getNormalMin(x) && hitx <= this.getNormalMax(x)) { + if (hitz >= this.getNormalMin(z) && hitz <= this.getNormalMax(z)) { + doWork(pItem, counter, tile, world, pos, player); + return true; } } + counter++; } - if (state.getValue(FACING) == EnumFacing.SOUTH) { - int counter = 0; - for (int z = 0; z < 5; z++) { - for (int x = 0; x < 5; x++) { - if (hitx >= this.getReverseMin(x) && hitx <= this.getReverseMax(x)) { - if (hitz >= this.getReverseMin(z) && hitz <= this.getReverseMax(z)) { - doWork(pItem, counter, tile, world, pos, player); - return true; - } - } - counter++; + } + } + if (state.getValue(FACING) == EnumFacing.SOUTH) { + int counter = 0; + for (int z = 0; z < 5; z++) { + for (int x = 0; x < 5; x++) { + if (hitx >= this.getReverseMin(x) && hitx <= this.getReverseMax(x)) { + if (hitz >= this.getReverseMin(z) && hitz <= this.getReverseMax(z)) { + doWork(pItem, counter, tile, world, pos, player); + return true; } } + counter++; } - if (state.getValue(FACING) == EnumFacing.WEST) { - int counter = 0; - for (int x = 0; x < 5; x++) { - for (int z = 0; z < 5; z++) { - if (hitx >= this.getNormalMin(x) && hitx <= this.getNormalMax(x)) { - if (hitz >= this.getReverseMin(z) && hitz <= this.getReverseMax(z)) { - doWork(pItem, counter, tile, world, pos, player); - return true; - } - } - counter++; + } + } + if (state.getValue(FACING) == EnumFacing.WEST) { + int counter = 0; + for (int x = 0; x < 5; x++) { + for (int z = 0; z < 5; z++) { + if (hitx >= this.getNormalMin(x) && hitx <= this.getNormalMax(x)) { + if (hitz >= this.getReverseMin(z) && hitz <= this.getReverseMax(z)) { + doWork(pItem, counter, tile, world, pos, player); + return true; } } + counter++; } - if (state.getValue(FACING) == EnumFacing.EAST) { - int counter = 0; - for (int x = 0; x < 5; x++) { - for (int z = 0; z < 5; z++) { - if (hitx >= this.getReverseMin(x) && hitx <= this.getReverseMax(x)) { - if (hitz >= this.getNormalMin(z) && hitz <= this.getNormalMax(z)) { - doWork(pItem, counter, tile, world, pos, player); - return true; - } - } - counter++; + } + } + if (state.getValue(FACING) == EnumFacing.EAST) { + int counter = 0; + for (int x = 0; x < 5; x++) { + for (int z = 0; z < 5; z++) { + if (hitx >= this.getReverseMin(x) && hitx <= this.getReverseMax(x)) { + if (hitz >= this.getNormalMin(z) && hitz <= this.getNormalMax(z)) { + doWork(pItem, counter, tile, world, pos, player); + return true; } } + counter++; } - - + } + } } } return false; From efc3a2b7f94b678a694fd3507d4185949a5eb726 Mon Sep 17 00:00:00 2001 From: Mohammad-Ali Minaie Date: Sat, 1 Apr 2017 21:26:03 -0400 Subject: [PATCH 2/5] updating ModBlocks --- 1.11/src/main/java/nmd/primal/forgecraft/init/ModBlocks.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 b27bc751..4d72af1b 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 @@ -106,7 +106,7 @@ public class ModBlocks { //CommonUtils.spawnItemEntityFromWorld(world, pos, new ItemStack(ModBlocks.stoneanvil, 1)); return true; } - if (pItem.equals(PrimalItems.STONE_GALLAGHER) || pItem.equals(ModItems.forgehammer)) { + if (pItem instanceof WorkMallet || pItem.equals(ModItems.forgehammer)) { if(world.getBlockState(belowPos).getBlock().equals(ModBlocks.stoneanvil)) { From 9f1f8e4f9134d1feb9595db5b9c550948f8a5da3 Mon Sep 17 00:00:00 2001 From: Mohammad-Ali Minaie Date: Sat, 1 Apr 2017 21:27:50 -0400 Subject: [PATCH 3/5] modified push script --- push.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/push.sh b/push.sh index eba4d10b..cd25b2b6 100644 --- a/push.sh +++ b/push.sh @@ -5,5 +5,6 @@ git status git add --all :/ IFS= read -r -p "Enter commit message: " com git commit -m "${com}" -git push nmd master -git push github master +IFS= read -r -p "Enter Branch name: " com1 +git push nmd ${com1} +git push github ${com1} From 70610cc8ca95a89d8b2275f5840671c9c99cac67 Mon Sep 17 00:00:00 2001 From: kitsushadow Date: Sat, 1 Apr 2017 23:01:15 -0400 Subject: [PATCH 4/5] trying with no fetch --- 1.11/e_particle.png | Bin 0 -> 159 bytes 1.11/e_texture.png | Bin 0 -> 141 bytes 1.11/stoneanvil.json | 59 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 59 insertions(+) create mode 100644 1.11/e_particle.png create mode 100644 1.11/e_texture.png create mode 100644 1.11/stoneanvil.json diff --git a/1.11/e_particle.png b/1.11/e_particle.png new file mode 100644 index 0000000000000000000000000000000000000000..e557878f9b0081df0e6c571ed915f4780bf1a2fc GIT binary patch literal 159 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61SBU+%rFB|X`U{QAsV7vCj@daC~~-LPd)$i z?$?xTj^-IIp9ACFK7V={aJAiXe!J@v0mIGT4Z3dBCY+nlAN}mLRowa~J3GYg{eRVX zXUUaN&3PXSznt{pUt?*oMTj?KX|GSjMcIr5t;EiVqsx9UI;{|T9DHPlG0;W^Pgg&e IbxsLQ03WwL?f?J) literal 0 HcmV?d00001 diff --git a/1.11/e_texture.png b/1.11/e_texture.png new file mode 100644 index 0000000000000000000000000000000000000000..7291f2ea2b524eccecb6678f7bd40262c849bf2f GIT binary patch literal 141 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61SBU+%rFB|A)YRdAsV8|HWeQfm^B+%SKK&v zuFpfaoliDNDM&L$@~vsZp9Y?WbuQ1CZf4l2-1K~5=5VI@Msu3kk+ey<5-m~}Y Date: Sat, 1 Apr 2017 23:02:51 -0400 Subject: [PATCH 5/5] update to tileanvil --- .../main/java/nmd/primal/forgecraft/tiles/TileAnvil.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/1.11/src/main/java/nmd/primal/forgecraft/tiles/TileAnvil.java b/1.11/src/main/java/nmd/primal/forgecraft/tiles/TileAnvil.java index b10ccdd4..a02767d1 100644 --- a/1.11/src/main/java/nmd/primal/forgecraft/tiles/TileAnvil.java +++ b/1.11/src/main/java/nmd/primal/forgecraft/tiles/TileAnvil.java @@ -49,24 +49,24 @@ public class TileAnvil extends TileBaseSlot implements ITickable { if (!world.isRemote) { IBlockState state = world.getBlockState(this.pos); - if ( ThreadLocalRandom.current().nextInt(0,500) == 0 ) { + if ( ThreadLocalRandom.current().nextInt(0,10000) == 0 ) { for(int i=0; i