1112131415161718
col = Color.get(-1, 110, 331, 552); sprite = 1; } public boolean use(Player player, int attackDir) { player.game.setMenu(new ContainerMenu(player, "Chest", inventory)); return true; }
1213141516171819
xr = 3; yr = 2; } public boolean use(Player player, int attackDir) { player.game.setMenu(new CraftingMenu(Crafting.anvilRecipes, player)); return true; }
xr = 3; yr = 2; } public boolean use(Player player, int attackDir) { player.game.setMenu(new CraftingMenu(Crafting.workbenchRecipes, player)); return true; }
xr = 3; yr = 2; } public boolean use(Player player, int attackDir) { player.game.setMenu(new CraftingMenu(Crafting.ovenRecipes, player)); return true; }
xr = 3; yr = 2; } public boolean use(Player player, int attackDir) { player.game.setMenu(new CraftingMenu(Crafting.furnaceRecipes, player)); return true; }
179180181182183184185186187188189
menu.tick(); } else { if (player.removed) { playerDeadTime++; if (playerDeadTime > 60) { setMenu(new DeadMenu()); } } else { if (pendingLevelChange != 0) { setMenu(new LevelTransitionMenu(pendingLevelChange)); pendingLevelChange = 0;
108109110111112113114115116117118
attack(); } } if (input.menu.clicked) { if (!use()) { game.setMenu(new InventoryMenu(this)); } } if (attackTime > 0) attackTime--; }
183184185186187188189190191192193
if (playerDeadTime > 60) { setMenu(new DeadMenu()); } } else { if (pendingLevelChange != 0) { setMenu(new LevelTransitionMenu(pendingLevelChange)); pendingLevelChange = 0; } } if (wonTimer > 0) { if (--wonTimer == 0) {
120121122123124125126
} catch (IOException e) { e.printStackTrace(); } resetGame(); setMenu(new TitleMenu()); }
189190191192193194195196197198199
pendingLevelChange = 0; } } if (wonTimer > 0) { if (--wonTimer == 0) { setMenu(new WonMenu()); } } level.tick(); Tile.tickCount++; }