Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public boolean handlePlayer(EntityPlayer player) {
- for(int i = 0; i < player.field_71071_by.func_70302_i_(); ++i) // COMMENT: check all items in players hotbar (i think)
- { // COMMENT: for block start
- ItemStack item = player.field_71071_by.func_70301_a(i); // COMMENT: get handle for current item
- if(item != null && // COMMENT: hotbar slot is not empty
- item.func_77973_b() == ExtraUtils.ethericSword && // COMMENT: item is ethericSword
- player.field_71071_by.func_70298_a(i, 1) != null) // COMMENT: if removing item is successfull
- { // COMMENT: if block start
- player.field_71071_by.func_70441_a(createNewStack()); // give new item
- return true; // return success, in this case no further code in this sub gets executed
- } // COMMENT: if block end
- } // COMMENT: for block end
- return false; // no success yet so return failure
- }
Advertisement
Add Comment
Please, Sign In to add comment