diff --git a/CHANGELOG.md b/CHANGELOG.md index eee12476b..c88420407 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -65,6 +65,7 @@ * Thunderstorms now count as night time for Solar Generators * Coolant Cells can no longer be placed on the ground * Crafting Nether Ice Coolant Cells now results in 4 items +* Moved Soulbound Backpack to the "Magical Gadgets" Category #### Fixes * Fixed #2005 diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/androids/ButcherAndroid.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/androids/ButcherAndroid.java index 4afc62ddf..0c1e8ad0f 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/androids/ButcherAndroid.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/androids/ButcherAndroid.java @@ -14,7 +14,6 @@ import org.bukkit.metadata.FixedMetadataValue; import io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin; import me.mrCookieSlime.Slimefun.Lists.RecipeType; import me.mrCookieSlime.Slimefun.Objects.Category; -import me.mrCookieSlime.Slimefun.api.BlockStorage; import me.mrCookieSlime.Slimefun.api.SlimefunItemStack; public abstract class ButcherAndroid extends ProgrammableAndroid { @@ -31,14 +30,14 @@ public abstract class ButcherAndroid extends ProgrammableAndroid { } @Override - protected void attack(Block b, Predicate predicate) { + protected void attack(Block b, BlockFace face, Predicate predicate) { double damage = getTier() >= 3 ? 20D : 4D * getTier(); double radius = 4.0 + getTier(); for (Entity n : b.getWorld().getNearbyEntities(b.getLocation(), radius, radius, radius, n -> n instanceof LivingEntity && !(n instanceof ArmorStand) && !(n instanceof Player) && n.isValid() && predicate.test((LivingEntity) n))) { boolean attack = false; - switch (BlockFace.valueOf(BlockStorage.getLocationInfo(b.getLocation(), "rotation"))) { + switch (face) { case NORTH: attack = n.getLocation().getZ() < b.getZ(); break; diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/androids/Instruction.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/androids/Instruction.java index a2c70889b..02a24c1af 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/androids/Instruction.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/androids/Instruction.java @@ -83,22 +83,22 @@ enum Instruction { // Action - Sword ATTACK_MOBS_ANIMALS(AndroidType.FIGHTER, HeadTexture.SCRIPT_ATTACK, (android, b, inv, face) -> { Predicate predicate = e -> true; - android.attack(b, predicate); + android.attack(b, face, predicate); }), ATTACK_MOBS(AndroidType.FIGHTER, HeadTexture.SCRIPT_ATTACK, (android, b, inv, face) -> { Predicate predicate = e -> e instanceof Monster; - android.attack(b, predicate); + android.attack(b, face, predicate); }), ATTACK_ANIMALS(AndroidType.FIGHTER, HeadTexture.SCRIPT_ATTACK, (android, b, inv, face) -> { Predicate predicate = e -> e instanceof Animals; - android.attack(b, predicate); + android.attack(b, face, predicate); }), ATTACK_ANIMALS_ADULT(AndroidType.FIGHTER, HeadTexture.SCRIPT_ATTACK, (android, b, inv, face) -> { Predicate predicate = e -> e instanceof Animals && e instanceof Ageable && ((Ageable) e).isAdult(); - android.attack(b, predicate); + android.attack(b, face, predicate); }), // Action - Axe diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/androids/ProgrammableAndroid.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/androids/ProgrammableAndroid.java index e2497fd2e..52547aa0e 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/androids/ProgrammableAndroid.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/androids/ProgrammableAndroid.java @@ -814,7 +814,7 @@ public abstract class ProgrammableAndroid extends SlimefunItem implements Invent } } - protected void attack(Block b, Predicate predicate) { + protected void attack(Block b, BlockFace face, Predicate predicate) { throw new UnsupportedOperationException("Non-butcher Android tried to butcher!"); } diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/setup/DefaultCategories.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/setup/DefaultCategories.java index dc1d564c8..c90bc6e43 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/setup/DefaultCategories.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/setup/DefaultCategories.java @@ -35,7 +35,7 @@ class DefaultCategories { protected final Category weapons = new Category(new NamespacedKey(SlimefunPlugin.instance(), "weapons"), new CustomItem(SlimefunItems.BLADE_OF_VAMPIRES, "&7Weapons"), 1); protected final Category tools = new Category(new NamespacedKey(SlimefunPlugin.instance(), "tools"), new CustomItem(SlimefunItems.SMELTERS_PICKAXE, "&7Tools"), 1); protected final Category usefulItems = new Category(new NamespacedKey(SlimefunPlugin.instance(), "items"), new CustomItem(SlimefunItems.BACKPACK_MEDIUM, "&7Useful Items"), 1); - protected final Category basicMachines = new Category(new NamespacedKey(SlimefunPlugin.instance(), "basic_machines"), new CustomItem(Material.CRAFTING_TABLE, "&7Basic Machines"), 1); + protected final Category basicMachines = new Category(new NamespacedKey(SlimefunPlugin.instance(), "basic_machines"), new CustomItem(SlimefunItems.ENHANCED_CRAFTING_TABLE, "&7Basic Machines"), 1); protected final Category food = new Category(new NamespacedKey(SlimefunPlugin.instance(), "food"), new CustomItem(SlimefunItems.FORTUNE_COOKIE, "&7Food"), 2); protected final Category armor = new Category(new NamespacedKey(SlimefunPlugin.instance(), "armor"), new CustomItem(SlimefunItems.DAMASCUS_STEEL_CHESTPLATE, "&7Armor"), 2); diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/setup/SlimefunItemSetup.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/setup/SlimefunItemSetup.java index b55604b1d..aa44a3712 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/setup/SlimefunItemSetup.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/setup/SlimefunItemSetup.java @@ -1108,7 +1108,7 @@ public final class SlimefunItemSetup { new ItemStack[] {SlimefunItems.ENDER_LUMP_3, SlimefunItems.AIR_RUNE, SlimefunItems.ENDER_LUMP_3, SlimefunItems.EARTH_RUNE, SlimefunItems.NECROTIC_SKULL, SlimefunItems.FIRE_RUNE, SlimefunItems.ENDER_LUMP_3, SlimefunItems.WATER_RUNE, SlimefunItems.ENDER_LUMP_3}) .register(plugin); - new SoulboundBackpack(36, categories.usefulItems, SlimefunItems.BOUND_BACKPACK, RecipeType.MAGIC_WORKBENCH, + new SoulboundBackpack(36, categories.magicalGadgets, SlimefunItems.BOUND_BACKPACK, RecipeType.MAGIC_WORKBENCH, new ItemStack[] {SlimefunItems.ENDER_LUMP_2, null, SlimefunItems.ENDER_LUMP_2, SlimefunItems.ESSENCE_OF_AFTERLIFE, SlimefunItems.WOVEN_BACKPACK, SlimefunItems.ESSENCE_OF_AFTERLIFE, SlimefunItems.ENDER_LUMP_2, null, SlimefunItems.ENDER_LUMP_2}) .register(plugin);