Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void changeItem() {
- int heat = this.getSlot(0).getStack().getItemDamage();
- if(this.buttonPressed != -1) {
- if(this.inputSlot.getStackInSlot(0).isItemEqualIgnoreDurability(new ItemStack(ItemInit.HOT_TOOL_HEAD))) {
- int weapon = this.buttonPressed;
- if(weapon == 1) {
- ItemStack stack = new ItemStack(ItemInit.DAGGER_HOT_TOOL_HEAD);
- stack.setItemDamage(heat);
- this.inputSlot.decrStackSize(0, 1);
- player.addItemStackToInventory(stack);
- //this.outputSlot.setInventorySlotContents(1, stack);
- //this.outputSlot.getStackInSlot(1).setItemDamage(heat);
- }else if(weapon == 2) {
- ItemStack stack = new ItemStack(ItemInit.KABUTOWARI_HOT_TOOL_HEAD);
- stack.setItemDamage(heat);
- this.inputSlot.decrStackSize(0, 1);
- player.addItemStackToInventory(stack);
- }else if(weapon == 3) {
- ItemStack stack = new ItemStack(ItemInit.TALWAR_HOT_TOOL_HEAD);
- stack.setItemDamage(heat);
- this.inputSlot.decrStackSize(0, 1);
- player.addItemStackToInventory(stack);
- }else if(weapon == 4) {
- ItemStack stack = new ItemStack(ItemInit.RAPIER_HOT_TOOL_HEAD);
- stack.setItemDamage(heat);
- this.inputSlot.decrStackSize(0, 1);
- player.addItemStackToInventory(stack);
- }else {
- ItemStack result = AnvilRecipes.getInstance().getForgingResult(this.inputSlot.getStackInSlot(0));
- this.outputStack = result;
- System.out.print("RESULT IS: " + result.getDisplayName());
- this.inputSlot.clear();
- this.outputSlot.setInventorySlotContents(1, result);
- }
- this.buttonPressed = -1;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement