player arm can swing
This commit is contained in:
12
1.11/To-Dos
12
1.11/To-Dos
@@ -1,15 +1,16 @@
|
|||||||
To-Dos
|
To-Dos
|
||||||
|
|
||||||
*** Priority ***
|
*** Priority ***
|
||||||
- [ ] Create the hoe Item
|
- [ ] Sound Handler
|
||||||
|
- [ ] OreDict Stuff
|
||||||
- [ ] Create the Sword Model
|
- [ ] Create the Sword Model
|
||||||
- [ ] Add randomInt to anvil
|
- [ ] Sword Item
|
||||||
|
- [ ] Sword Json
|
||||||
|
|
||||||
*** Backlog ***
|
*** Backlog ***
|
||||||
- [ ] Create a method which adds the types of NBT upgrades and creates a unique float instead of using magic numbers
|
- [ ] Create a method which adds the types of NBT upgrades and creates a unique float instead of using magic numbers
|
||||||
- [ ] Add forgehammer to oreDict
|
- [ ] Add forgehammer to oreDict
|
||||||
- [ ] Finish Toolhead Recipes
|
|
||||||
- [ ] WeaponHead recipes
|
- [ ] WeaponHead recipes
|
||||||
|
|
||||||
- [ ] Casting Table
|
- [ ] Casting Table
|
||||||
@@ -25,6 +26,9 @@ To-Dos
|
|||||||
|
|
||||||
*** Completed ***
|
*** Completed ***
|
||||||
|
|
||||||
|
- [x] Create the hoe Item
|
||||||
|
- [x] Finish Toolhead Recipes
|
||||||
|
- [x] Add randomInt to anvil
|
||||||
- [x] Create the axe Item
|
- [x] Create the axe Item
|
||||||
- [x] Create the shovel Item
|
- [x] Create the shovel Item
|
||||||
- [x] Create the axe Model
|
- [x] Create the axe Model
|
||||||
|
|||||||
@@ -73,15 +73,23 @@ public class Anvil extends CustomContainerFacing {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing facing, float hitx, float hity, float hitz) {
|
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing facing, float hitx, float hity, float hitz) {
|
||||||
if (!world.isRemote) {
|
if (world.isRemote) {
|
||||||
TileAnvil tile = (TileAnvil) world.getTileEntity(pos);
|
if (!player.isSwingInProgress) {
|
||||||
if (tile != null) {
|
player.swingArm(hand);
|
||||||
ItemStack pItem = player.inventory.getCurrentItem();
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
Crafting Anvil Recipes
|
Crafting Anvil Recipes
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
if (!world.isRemote) {
|
||||||
|
if ((player.inventory.getCurrentItem().getItem().equals(PrimalItems.STONE_GALLAGHER)) || (player.inventory.getCurrentItem().getItem() == ModItems.forgehammer)) {
|
||||||
|
TileAnvil tile = (TileAnvil) world.getTileEntity(pos);
|
||||||
|
ItemStack pItem = player.inventory.getCurrentItem();
|
||||||
|
if (tile != null) {
|
||||||
|
|
||||||
if ((pItem.getItem().equals(PrimalItems.STONE_GALLAGHER)) || (pItem.getItem() == ModItems.forgehammer)) {
|
if ((pItem.getItem().equals(PrimalItems.STONE_GALLAGHER)) || (pItem.getItem() == ModItems.forgehammer)) {
|
||||||
|
|
||||||
String[] tempArray = new String[25];
|
String[] tempArray = new String[25];
|
||||||
for (int i = 0; i < 25; i++) {
|
for (int i = 0; i < 25; i++) {
|
||||||
|
|
||||||
@@ -98,6 +106,10 @@ public class Anvil extends CustomContainerFacing {
|
|||||||
if (pItem.getItem().equals(ModItems.forgehammer)) {
|
if (pItem.getItem().equals(ModItems.forgehammer)) {
|
||||||
pItem.damageItem(1, player);
|
pItem.damageItem(1, player);
|
||||||
}
|
}
|
||||||
|
world.playEvent(1031, pos, 0);
|
||||||
|
|
||||||
|
|
||||||
|
if (world.rand.nextBoolean()) {
|
||||||
|
|
||||||
if (recipe.getOutput().getItem() instanceof ToolPart) {
|
if (recipe.getOutput().getItem() instanceof ToolPart) {
|
||||||
|
|
||||||
@@ -174,17 +186,7 @@ public class Anvil extends CustomContainerFacing {
|
|||||||
} else {
|
} else {
|
||||||
CommonUtils.spawnItemEntityFromWorld(world, pos, recipe.getOutput());
|
CommonUtils.spawnItemEntityFromWorld(world, pos, recipe.getOutput());
|
||||||
}
|
}
|
||||||
|
//world.playEvent(1031, pos, 0);
|
||||||
/*
|
|
||||||
NBTTagCompound tempNBT = this.getSlotStack(i).getSubCompound("tags");
|
|
||||||
ItemStack outputStack = recipe.getOutput();
|
|
||||||
outputStack.getTagCompound().setTag("tags", tempNBT);
|
|
||||||
outputStack.getSubCompound("tags").setBoolean("hot", true);
|
|
||||||
this.setSlotStack(i, outputStack);
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
world.playEvent(1031, pos, 0);
|
|
||||||
for (int i = 0; i < tile.getSlotListSize(); i++) {
|
for (int i = 0; i < tile.getSlotListSize(); i++) {
|
||||||
if (!tile.getSlotStack(i).isEmpty()) {
|
if (!tile.getSlotStack(i).isEmpty()) {
|
||||||
tile.setSlotStack(i, ItemStack.EMPTY);
|
tile.setSlotStack(i, ItemStack.EMPTY);
|
||||||
@@ -193,6 +195,11 @@ public class Anvil extends CustomContainerFacing {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
@@ -200,6 +207,8 @@ public class Anvil extends CustomContainerFacing {
|
|||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if ((pItem.getItem() != PrimalItems.STONE_GALLAGHER) || (pItem.getItem() != ModItems.forgehammer)) {
|
if ((pItem.getItem() != PrimalItems.STONE_GALLAGHER) || (pItem.getItem() != ModItems.forgehammer)) {
|
||||||
|
|
||||||
if (state.getValue(FACING) == EnumFacing.NORTH) {
|
if (state.getValue(FACING) == EnumFacing.NORTH) {
|
||||||
@@ -262,10 +271,11 @@ public class Anvil extends CustomContainerFacing {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user