Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff -rua old/ComputerCraft/dan200/turtle/shared/TileEntityTurtle.java new/ComputerCraft/dan200/turtle/shared/TileEntityTurtle.java
- --- old/ComputerCraft/dan200/turtle/shared/TileEntityTurtle.java 2012-06-14 12:46:38.000000000 +0200
- +++ new/ComputerCraft/dan200/turtle/shared/TileEntityTurtle.java 2012-06-14 22:30:20.000000000 +0200
- @@ -197,6 +197,19 @@
- /* 288 */ throw new UnsupportedOperationException();
- /* */ }
- /* */
- + public int getSelectedSlotId()
- + {
- + if (!mod_ComputerCraft.isMultiplayerClient()) {
- + synchronized (this.m_inventory) {
- + ItemStack itemstack = this.m_inventory[this.m_state.selectedSlot];
- + if (itemstack == null) return -1;
- + return itemstack.id;
- + }
- + }
- +
- + throw new UnsupportedOperationException();
- + }
- +
- /* */ public int getSelectedSlot()
- /* */ {
- /* 293 */ if (!mod_ComputerCraft.isMultiplayerClient()) {
- @@ -753,7 +766,19 @@
- /* */
- /* 854 */ return false;
- /* */ }
- -/* */
- +/* */
- + private boolean compare(int i)
- + {
- + int j = this.x + net.minecraft.server.Facing.b[i];
- + int k = this.y + net.minecraft.server.Facing.c[i];
- + int l = this.z + net.minecraft.server.facing.d[i];
- +
- + if (!isBlockInWorld(k)) return false;
- +
- + int id = getSelectedSlotId();
- + return id == this.world.getTypeId(j, k, l).id;
- + }
- +
- /* */ private void dropStack(ItemStack itemstack, int i) {
- /* 858 */ double d = this.x + 0.5D;
- /* 859 */ double d1 = this.y + 0.5D;
- @@ -966,6 +991,16 @@
- /* 1102 */ break;
- /* */ case 25:
- /* 1105 */ flag = detect(0);
- + break;
- + case 26:
- + flag = compare(this.m_clientState.dir);
- + break;
- + case 27:
- + flag = detect(1);
- + break;
- + case 28:
- + flag = detect(0);
- + break;
- /* */ }
- /* */
- /* */ }
- Only in new/ComputerCraft/dan200/turtle/shared: TileEntityTurtle.java~
Add Comment
Please, Sign In to add comment