From 3f4955de0de700530e2c54fd7a3cda23363db66f Mon Sep 17 00:00:00 2001 From: Thanos paravantis Date: Sat, 14 Nov 2015 13:58:23 +0200 Subject: [PATCH] Fix carrot item not being added to player inventory on Fast Food challenge. --- .../game/arcade/game/games/mineware/MineWare.java | 8 ++++---- .../game/games/mineware/challenges/ChallengeFastFood.java | 7 +++++-- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/mineware/MineWare.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/mineware/MineWare.java index 65fe9264a..dacd54a3f 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/mineware/MineWare.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/mineware/MineWare.java @@ -146,10 +146,10 @@ public class MineWare extends SoloGame implements IThrown public void PopulateOrders() { _challenges.add(ChallengeTreasureDigger.class); -// _challenges.add(ChallengeFastFood.class); -// _challenges.add(ChallengeBlockRunner.class); -// _challenges.add(ChallengeAnvilDance.class); -// _challenges.add(ChallengeFallingBlocks.class); + _challenges.add(ChallengeFastFood.class); + _challenges.add(ChallengeBlockRunner.class); + _challenges.add(ChallengeAnvilDance.class); + _challenges.add(ChallengeFallingBlocks.class); // _challenges.add(ChallengeWaveCrush.class); // _challenges.add(ChallengePickASide.class); diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/mineware/challenges/ChallengeFastFood.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/mineware/challenges/ChallengeFastFood.java index cfadf8d00..abf14b386 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/mineware/challenges/ChallengeFastFood.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/mineware/challenges/ChallengeFastFood.java @@ -34,7 +34,7 @@ public class ChallengeFastFood extends Challenge { private static final Material[] _food = { Material.APPLE, Material.BREAD, Material.GRILLED_PORK, Material.COOKED_BEEF, Material.RAW_FISH, Material.COOKED_FISH, Material.CAKE, - Material.COOKIE, Material.MELON, Material.COOKED_CHICKEN, Material.CARROT, Material.BAKED_POTATO, Material.PUMPKIN_PIE }; + Material.COOKIE, Material.MELON, Material.COOKED_CHICKEN, Material.CARROT_ITEM, Material.BAKED_POTATO, Material.PUMPKIN_PIE }; private static final Material[] _flowers = { Material.LONG_GRASS, Material.YELLOW_FLOWER, Material.RED_ROSE }; @@ -86,6 +86,8 @@ public class ChallengeFastFood extends Challenge for(Player player : Host.GetPlayers(true)) { + System.out.println(player.getName()); + for(int i = 0; i < 9; i++) { player.getInventory().setItem(i, getRandomFood()); @@ -173,7 +175,8 @@ public class ChallengeFastFood extends Challenge data = (byte) UtilMath.r(1); } - return new ItemStack(foodMaterial, 5, (byte) data); + ItemStack itemStack = new ItemStack(foodMaterial, 5, (byte) data); + return itemStack; } private void chanceItemSlot(Player player)