diff --git a/CHANGELOG.md b/CHANGELOG.md index 069bd8480..716e8db2d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -49,6 +49,7 @@ * Small performance improvements for Tree Growth Accelerators * Small performance improvements for Reactors * Electric machines now show their tier in the Inventory name too +* Removed "Fuel efficiency" attribute for androids, since that was pretty much always at 1.0 anyway... #### Fixes * Fixed Programmable Androids rotating in the wrong direction diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/core/networks/energy/EnergyNet.java b/src/main/java/io/github/thebusybiscuit/slimefun4/core/networks/energy/EnergyNet.java index cb450cabc..98e9b4e58 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/core/networks/energy/EnergyNet.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/core/networks/energy/EnergyNet.java @@ -250,7 +250,7 @@ public class EnergyNet extends Network { } catch (Exception | LinkageError t) { exploded.add(source); - new ErrorReport(t, source, item); + new ErrorReport<>(t, source, item); } long time = SlimefunPlugin.getProfiler().closeEntry(source, item, timestamp); diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/androids/AdvancedFarmerAndroid.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/androids/AdvancedFarmerAndroid.java index 716d21473..87ecbb3f6 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/androids/AdvancedFarmerAndroid.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/androids/AdvancedFarmerAndroid.java @@ -23,10 +23,10 @@ import me.mrCookieSlime.Slimefun.api.inventory.BlockMenu; * @see FarmerAndroid * */ -public abstract class AdvancedFarmerAndroid extends FarmerAndroid { +public class AdvancedFarmerAndroid extends FarmerAndroid { - public AdvancedFarmerAndroid(Category category, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe) { - super(category, item, recipeType, recipe); + public AdvancedFarmerAndroid(Category category, int tier, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe) { + super(category, tier, item, recipeType, recipe); } @Override 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 0c1e8ad0f..51c458d5a 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 @@ -16,12 +16,12 @@ import me.mrCookieSlime.Slimefun.Lists.RecipeType; import me.mrCookieSlime.Slimefun.Objects.Category; import me.mrCookieSlime.Slimefun.api.SlimefunItemStack; -public abstract class ButcherAndroid extends ProgrammableAndroid { +public class ButcherAndroid extends ProgrammableAndroid { private static final String METADATA_KEY = "android_killer"; - public ButcherAndroid(Category category, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe) { - super(category, item, recipeType, recipe); + public ButcherAndroid(Category category, int tier, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe) { + super(category, tier, item, recipeType, recipe); } @Override diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/androids/FarmerAndroid.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/androids/FarmerAndroid.java index 2edd555eb..060bb6b81 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/androids/FarmerAndroid.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/androids/FarmerAndroid.java @@ -17,10 +17,10 @@ import me.mrCookieSlime.Slimefun.Objects.Category; import me.mrCookieSlime.Slimefun.api.SlimefunItemStack; import me.mrCookieSlime.Slimefun.api.inventory.BlockMenu; -public abstract class FarmerAndroid extends ProgrammableAndroid { +public class FarmerAndroid extends ProgrammableAndroid { - public FarmerAndroid(Category category, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe) { - super(category, item, recipeType, recipe); + public FarmerAndroid(Category category, int tier, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe) { + super(category, tier, item, recipeType, recipe); } @Override diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/androids/FisherAndroid.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/androids/FisherAndroid.java index 5bc7adf33..085895521 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/androids/FisherAndroid.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/androids/FisherAndroid.java @@ -17,12 +17,12 @@ import me.mrCookieSlime.Slimefun.Objects.Category; import me.mrCookieSlime.Slimefun.api.SlimefunItemStack; import me.mrCookieSlime.Slimefun.api.inventory.BlockMenu; -public abstract class FisherAndroid extends ProgrammableAndroid { +public class FisherAndroid extends ProgrammableAndroid { private final RandomizedSet fishingLoot = new RandomizedSet<>(); - public FisherAndroid(Category category, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe) { - super(category, item, recipeType, recipe); + public FisherAndroid(Category category, int tier, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe) { + super(category, tier, item, recipeType, recipe); // Fish for (Material fish : MaterialCollections.getAllFishItems()) { diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/androids/MinerAndroid.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/androids/MinerAndroid.java index f475995fe..48b90420b 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/androids/MinerAndroid.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/androids/MinerAndroid.java @@ -22,13 +22,13 @@ import me.mrCookieSlime.Slimefun.api.BlockStorage; import me.mrCookieSlime.Slimefun.api.SlimefunItemStack; import me.mrCookieSlime.Slimefun.api.inventory.BlockMenu; -public abstract class MinerAndroid extends ProgrammableAndroid { +public class MinerAndroid extends ProgrammableAndroid { // Determines the drops a miner android will get private final ItemStack effectivePickaxe = new ItemStack(Material.DIAMOND_PICKAXE); - public MinerAndroid(Category category, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe) { - super(category, item, recipeType, recipe); + public MinerAndroid(Category category, int tier, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe) { + super(category, tier, item, recipeType, recipe); } @Override 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 4bd2b00e5..b341e7789 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 @@ -36,6 +36,7 @@ import io.github.thebusybiscuit.slimefun4.core.handlers.BlockPlaceHandler; import io.github.thebusybiscuit.slimefun4.implementation.SlimefunItems; import io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin; import io.github.thebusybiscuit.slimefun4.utils.ChestMenuUtils; +import io.github.thebusybiscuit.slimefun4.utils.HeadTexture; import io.github.thebusybiscuit.slimefun4.utils.NumberUtils; import io.github.thebusybiscuit.slimefun4.utils.PatternUtils; import io.github.thebusybiscuit.slimefun4.utils.SlimefunUtils; @@ -59,7 +60,7 @@ import me.mrCookieSlime.Slimefun.api.inventory.BlockMenu; import me.mrCookieSlime.Slimefun.api.inventory.BlockMenuPreset; import me.mrCookieSlime.Slimefun.api.item_transport.ItemTransportFlow; -public abstract class ProgrammableAndroid extends SlimefunItem implements InventoryBlock, RecipeDisplayItem { +public class ProgrammableAndroid extends SlimefunItem implements InventoryBlock, RecipeDisplayItem { private static final List POSSIBLE_ROTATIONS = Arrays.asList(BlockFace.NORTH, BlockFace.EAST, BlockFace.SOUTH, BlockFace.WEST); private static final int[] BORDER = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 18, 24, 25, 26, 27, 33, 35, 36, 42, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53 }; @@ -68,10 +69,12 @@ public abstract class ProgrammableAndroid extends SlimefunItem implements Invent protected final List fuelTypes = new ArrayList<>(); protected final String texture; + private final int tier; - public ProgrammableAndroid(Category category, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe) { + public ProgrammableAndroid(Category category, int tier, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe) { super(category, item, recipeType, recipe); + this.tier = tier; texture = item.getSkullTexture().orElse(null); registerDefaultFuelTypes(); @@ -95,7 +98,7 @@ public abstract class ProgrammableAndroid extends SlimefunItem implements Invent @Override public void newInstance(BlockMenu menu, Block b) { - menu.replaceExistingItem(15, new CustomItem(SlimefunUtils.getCustomHead("e01c7b5726178974b3b3a01b42a590e54366026fd43808f2a787648843a7f5a"), "&aStart/Continue")); + menu.replaceExistingItem(15, new CustomItem(HeadTexture.SCRIPT_START.getAsItemStack(), "&aStart/Continue")); menu.addMenuClickHandler(15, (p, slot, item, action) -> { SlimefunPlugin.getLocalization().sendMessage(p, "android.started", true); BlockStorage.addBlockInfo(b, "paused", "false"); @@ -103,14 +106,14 @@ public abstract class ProgrammableAndroid extends SlimefunItem implements Invent return false; }); - menu.replaceExistingItem(17, new CustomItem(SlimefunUtils.getCustomHead("16139fd1c5654e56e9e4e2c8be7eb2bd5b499d633616663feee99b74352ad64"), "&4Pause")); + menu.replaceExistingItem(17, new CustomItem(HeadTexture.SCRIPT_PAUSE.getAsItemStack(), "&4Pause")); menu.addMenuClickHandler(17, (p, slot, item, action) -> { BlockStorage.addBlockInfo(b, "paused", "true"); SlimefunPlugin.getLocalization().sendMessage(p, "android.stopped", true); return false; }); - menu.replaceExistingItem(16, new CustomItem(SlimefunUtils.getCustomHead("d78f2b7e5e75639ea7fb796c35d364c4df28b4243e66b76277aadcd6261337"), "&bMemory Core", "", "&8\u21E8 &7Click to open the Script Editor")); + menu.replaceExistingItem(16, new CustomItem(HeadTexture.ENERGY_REGULATOR.getAsItemStack(), "&bMemory Core", "", "&8\u21E8 &7Click to open the Script Editor")); menu.addMenuClickHandler(16, (p, slot, item, action) -> { BlockStorage.addBlockInfo(b, "paused", "true"); SlimefunPlugin.getLocalization().sendMessage(p, "android.stopped", true); @@ -235,7 +238,7 @@ public abstract class ProgrammableAndroid extends SlimefunItem implements Invent boolean hasFreeSlot = script.length < 54; if (hasFreeSlot) { - menu.addItem(i, new CustomItem(SlimefunUtils.getCustomHead("171d8979c1878a05987a7faf21b56d1b744f9d068c74cffcde1ea1edad5852"), "&7> Add new Command")); + menu.addItem(i, new CustomItem(HeadTexture.SCRIPT_NEW.getAsItemStack(), "&7> Add new Command")); menu.addMenuClickHandler(i, (pl, slot, item, action) -> { editInstruction(pl, b, script, index); return false; @@ -359,7 +362,7 @@ public abstract class ProgrammableAndroid extends SlimefunItem implements Invent return false; }); - menu.addItem(48, new CustomItem(SlimefunUtils.getCustomHead("105a2cab8b68ea57e3af992a36e47c8ff9aa87cc8776281966f8c3cf31a38"), "&eUpload a Script", "", "&6Click &7to upload your Android's Script", "&7to the Server's database")); + menu.addItem(48, new CustomItem(HeadTexture.SCRIPT_UP.getAsItemStack(), "&eUpload a Script", "", "&6Click &7to upload your Android's Script", "&7to the Server's database")); menu.addMenuClickHandler(48, (pl, slot, item, action) -> { uploadScript(pl, b, page); return false; @@ -377,7 +380,7 @@ public abstract class ProgrammableAndroid extends SlimefunItem implements Invent return false; }); - menu.addItem(53, new CustomItem(SlimefunUtils.getCustomHead("a185c97dbb8353de652698d24b64327b793a3f32a98be67b719fbedab35e"), "&6> Back", "", "&7Return to the Android's interface")); + menu.addItem(53, new CustomItem(HeadTexture.SCRIPT_LEFT.getAsItemStack(), "&6> Back", "", "&7Return to the Android's interface")); menu.addMenuClickHandler(53, (pl, slot, item, action) -> { openScriptEditor(pl, b); return false; @@ -457,25 +460,25 @@ public abstract class ProgrammableAndroid extends SlimefunItem implements Invent public void openScriptEditor(Player p, Block b) { ChestMenu menu = new ChestMenu(ChatColor.DARK_AQUA + SlimefunPlugin.getLocalization().getMessage(p, "android.scripts.editor")); - menu.addItem(1, new CustomItem(SlimefunUtils.getCustomHead("d9bf6db4aeda9d8822b9f736538e8c18b9a4844f84eb45504adfbfee87eb"), "&2> Edit Script", "", "&aEdits your current Script")); + menu.addItem(1, new CustomItem(HeadTexture.SCRIPT_FORWARD.getAsItemStack(), "&2> Edit Script", "", "&aEdits your current Script")); menu.addMenuClickHandler(1, (pl, slot, item, action) -> { openScript(pl, b, getScript(b.getLocation())); return false; }); - menu.addItem(3, new CustomItem(SlimefunUtils.getCustomHead("171d8979c1878a05987a7faf21b56d1b744f9d068c74cffcde1ea1edad5852"), "&4> Create new Script", "", "&cDeletes your current Script", "&cand creates a blank one")); + menu.addItem(3, new CustomItem(HeadTexture.SCRIPT_NEW.getAsItemStack(), "&4> Create new Script", "", "&cDeletes your current Script", "&cand creates a blank one")); menu.addMenuClickHandler(3, (pl, slot, item, action) -> { openScript(pl, b, DEFAULT_SCRIPT); return false; }); - menu.addItem(5, new CustomItem(SlimefunUtils.getCustomHead("c01586e39f6ffa63b4fb301b65ca7da8a92f7353aaab89d3886579125dfbaf9"), "&6> Download a Script", "", "&eDownload a Script from the Server", "&eYou can edit or simply use it")); + menu.addItem(5, new CustomItem(HeadTexture.SCRIPT_DOWN.getAsItemStack(), "&6> Download a Script", "", "&eDownload a Script from the Server", "&eYou can edit or simply use it")); menu.addMenuClickHandler(5, (pl, slot, item, action) -> { openScriptDownloader(pl, b, 1); return false; }); - menu.addItem(8, new CustomItem(SlimefunUtils.getCustomHead("a185c97dbb8353de652698d24b64327b793a3f32a98be67b719fbedab35e"), "&6> Back", "", "&7Return to the Android's interface")); + menu.addItem(8, new CustomItem(HeadTexture.SCRIPT_LEFT.getAsItemStack(), "&6> Back", "", "&7Return to the Android's interface")); menu.addMenuClickHandler(8, (pl, slot, item, action) -> { BlockStorage.getInventory(b).open(p); return false; @@ -504,7 +507,7 @@ public abstract class ProgrammableAndroid extends SlimefunItem implements Invent ChestMenu menu = new ChestMenu(ChatColor.DARK_AQUA + SlimefunPlugin.getLocalization().getMessage(p, "android.scripts.editor")); ChestMenuUtils.drawBackground(menu, 0, 1, 2, 3, 4, 5, 6, 7, 8); - menu.addItem(9, new CustomItem(SlimefunUtils.getCustomHead("16139fd1c5654e56e9e4e2c8be7eb2bd5b499d633616663feee99b74352ad64"), "&fDo nothing"), (pl, slot, item, action) -> { + menu.addItem(9, new CustomItem(HeadTexture.SCRIPT_PAUSE.getAsItemStack(), "&fDo nothing"), (pl, slot, item, action) -> { String code = deleteInstruction(script, index); setScript(b.getLocation(), code); openScript(p, b, code); @@ -609,9 +612,9 @@ public abstract class ProgrammableAndroid extends SlimefunItem implements Invent return new int[] { 20, 21, 22, 29, 30, 31 }; } - public abstract float getFuelEfficiency(); - - public abstract int getTier(); + public int getTier() { + return tier; + } protected void tick(Block b, Config data) { if (b.getType() != Material.PLAYER_HEAD) { @@ -774,7 +777,7 @@ public abstract class ProgrammableAndroid extends SlimefunItem implements Invent menu.pushItem(new ItemStack(Material.BUCKET), getOutputSlots()); } - int fuelLevel = (int) (fuel.getTicks() * getFuelEfficiency()); + int fuelLevel = fuel.getTicks(); BlockStorage.addBlockInfo(b, "fuel", String.valueOf(fuelLevel)); break; } diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/androids/WoodcutterAndroid.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/androids/WoodcutterAndroid.java index f0900fa58..39cfa1ff0 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/androids/WoodcutterAndroid.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/androids/WoodcutterAndroid.java @@ -23,12 +23,12 @@ import me.mrCookieSlime.Slimefun.api.BlockStorage; import me.mrCookieSlime.Slimefun.api.SlimefunItemStack; import me.mrCookieSlime.Slimefun.api.inventory.BlockMenu; -public abstract class WoodcutterAndroid extends ProgrammableAndroid { +public class WoodcutterAndroid extends ProgrammableAndroid { private static final int MAX_REACH = 160; - public WoodcutterAndroid(Category category, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe) { - super(category, item, recipeType, recipe); + public WoodcutterAndroid(Category category, int tier, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe) { + super(category, tier, item, recipeType, recipe); } @Override diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/electric/machines/AutoBrewer.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/electric/machines/AutoBrewer.java index ba62e6e2a..ab4d25641 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/electric/machines/AutoBrewer.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/electric/machines/AutoBrewer.java @@ -114,14 +114,14 @@ public abstract class AutoBrewer extends AContainer { else if (potionType == Material.SPLASH_POTION && input == Material.DRAGON_BREATH) { return new ItemStack(Material.LINGERING_POTION); } - else { - return null; - } - } else if (input == Material.FERMENTED_SPIDER_EYE) { - potion.setBasePotionData(new PotionData(fermentations.get(data.getType()), false, false)); - return new ItemStack(potionType); + PotionType fermented = fermentations.get(data.getType()); + + if (fermented != null) { + potion.setBasePotionData(new PotionData(fermented, false, false)); + return new ItemStack(potionType); + } } else if (input == Material.REDSTONE) { potion.setBasePotionData(new PotionData(data.getType(), true, data.isUpgraded())); @@ -131,13 +131,16 @@ public abstract class AutoBrewer extends AContainer { potion.setBasePotionData(new PotionData(data.getType(), data.isExtended(), true)); return new ItemStack(potionType); } - else if (data.getType() == PotionType.AWKWARD && potionRecipes.containsKey(input)) { - potion.setBasePotionData(new PotionData(potionRecipes.get(input), false, false)); - return new ItemStack(potionType); - } - else { - return null; + else if (data.getType() == PotionType.AWKWARD) { + PotionType potionRecipe = potionRecipes.get(input); + + if (potionRecipe != null) { + potion.setBasePotionData(new PotionData(potionRecipe, false, false)); + return new ItemStack(potionType); + } } + + return null; } /** 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 ccbaf67d6..eb55db291 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 @@ -2198,212 +2198,56 @@ public final class SlimefunItemSetup { new ItemStack[] {SlimefunItems.PLASTIC_SHEET, SlimefunItems.STEEL_INGOT, SlimefunItems.PLASTIC_SHEET, new ItemStack(Material.RED_STAINED_GLASS), SlimefunItems.BASIC_CIRCUIT_BOARD, SlimefunItems.STEEL_INGOT, SlimefunItems.PLASTIC_SHEET, SlimefunItems.STEEL_INGOT, SlimefunItems.PLASTIC_SHEET}) .register(plugin); - new ProgrammableAndroid(categories.androids, SlimefunItems.PROGRAMMABLE_ANDROID, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {SlimefunItems.PLASTIC_SHEET, SlimefunItems.ANDROID_MEMORY_CORE, SlimefunItems.PLASTIC_SHEET, SlimefunItems.COAL_GENERATOR, SlimefunItems.ELECTRIC_MOTOR, new ItemStack(Material.CHEST), SlimefunItems.PLASTIC_SHEET, SlimefunItems.PLASTIC_SHEET, SlimefunItems.PLASTIC_SHEET}) { - - @Override - public float getFuelEfficiency() { - return 1; - } - - @Override - public int getTier() { - return 1; - } - - } + new ProgrammableAndroid(categories.androids, 1, SlimefunItems.PROGRAMMABLE_ANDROID, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {SlimefunItems.PLASTIC_SHEET, SlimefunItems.ANDROID_MEMORY_CORE, SlimefunItems.PLASTIC_SHEET, SlimefunItems.COAL_GENERATOR, SlimefunItems.ELECTRIC_MOTOR, new ItemStack(Material.CHEST), SlimefunItems.PLASTIC_SHEET, SlimefunItems.PLASTIC_SHEET, SlimefunItems.PLASTIC_SHEET}) .register(plugin); - new MinerAndroid(categories.androids, SlimefunItems.PROGRAMMABLE_ANDROID_MINER, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {null, null, null, new ItemStack(Material.DIAMOND_PICKAXE), SlimefunItems.PROGRAMMABLE_ANDROID, new ItemStack(Material.DIAMOND_PICKAXE), null, SlimefunItems.ELECTRIC_MOTOR, null}) { - - @Override - public float getFuelEfficiency() { - return 1; - } - - @Override - public int getTier() { - return 1; - } - - } + new MinerAndroid(categories.androids, 1, SlimefunItems.PROGRAMMABLE_ANDROID_MINER, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {null, null, null, new ItemStack(Material.DIAMOND_PICKAXE), SlimefunItems.PROGRAMMABLE_ANDROID, new ItemStack(Material.DIAMOND_PICKAXE), null, SlimefunItems.ELECTRIC_MOTOR, null}) .register(plugin); - new FarmerAndroid(categories.androids, SlimefunItems.PROGRAMMABLE_ANDROID_FARMER, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {null, null, null, new ItemStack(Material.DIAMOND_HOE), SlimefunItems.PROGRAMMABLE_ANDROID, new ItemStack(Material.DIAMOND_HOE), null, SlimefunItems.ELECTRIC_MOTOR, null}) { - - @Override - public float getFuelEfficiency() { - return 1; - } - - @Override - public int getTier() { - return 1; - } - - } + new FarmerAndroid(categories.androids, 1, SlimefunItems.PROGRAMMABLE_ANDROID_FARMER, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {null, null, null, new ItemStack(Material.DIAMOND_HOE), SlimefunItems.PROGRAMMABLE_ANDROID, new ItemStack(Material.DIAMOND_HOE), null, SlimefunItems.ELECTRIC_MOTOR, null}) .register(plugin); - new WoodcutterAndroid(categories.androids, SlimefunItems.PROGRAMMABLE_ANDROID_WOODCUTTER, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {null, null, null, new ItemStack(Material.DIAMOND_AXE), SlimefunItems.PROGRAMMABLE_ANDROID, new ItemStack(Material.DIAMOND_AXE), null, SlimefunItems.ELECTRIC_MOTOR, null}) { - - @Override - public float getFuelEfficiency() { - return 1; - } - - @Override - public int getTier() { - return 1; - } - - } + new WoodcutterAndroid(categories.androids, 1, SlimefunItems.PROGRAMMABLE_ANDROID_WOODCUTTER, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {null, null, null, new ItemStack(Material.DIAMOND_AXE), SlimefunItems.PROGRAMMABLE_ANDROID, new ItemStack(Material.DIAMOND_AXE), null, SlimefunItems.ELECTRIC_MOTOR, null}) .register(plugin); - new FisherAndroid(categories.androids, SlimefunItems.PROGRAMMABLE_ANDROID_FISHERMAN, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {null, null, null, new ItemStack(Material.FISHING_ROD), SlimefunItems.PROGRAMMABLE_ANDROID, new ItemStack(Material.FISHING_ROD), null, SlimefunItems.ELECTRIC_MOTOR, null}) { - - @Override - public float getFuelEfficiency() { - return 1; - } - - @Override - public int getTier() { - return 1; - } - - } + new FisherAndroid(categories.androids, 1, SlimefunItems.PROGRAMMABLE_ANDROID_FISHERMAN, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {null, null, null, new ItemStack(Material.FISHING_ROD), SlimefunItems.PROGRAMMABLE_ANDROID, new ItemStack(Material.FISHING_ROD), null, SlimefunItems.ELECTRIC_MOTOR, null}) .register(plugin); - new ButcherAndroid(categories.androids, SlimefunItems.PROGRAMMABLE_ANDROID_BUTCHER, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {null, SlimefunItems.GPS_TRANSMITTER, null, new ItemStack(Material.DIAMOND_SWORD), SlimefunItems.PROGRAMMABLE_ANDROID, new ItemStack(Material.DIAMOND_SWORD), null, SlimefunItems.ELECTRIC_MOTOR, null}) { - - @Override - public float getFuelEfficiency() { - return 1; - } - - @Override - public int getTier() { - return 1; - } - - } + new ButcherAndroid(categories.androids, 1, SlimefunItems.PROGRAMMABLE_ANDROID_BUTCHER, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {null, SlimefunItems.GPS_TRANSMITTER, null, new ItemStack(Material.DIAMOND_SWORD), SlimefunItems.PROGRAMMABLE_ANDROID, new ItemStack(Material.DIAMOND_SWORD), null, SlimefunItems.ELECTRIC_MOTOR, null}) .register(plugin); - new ProgrammableAndroid(categories.androids, SlimefunItems.PROGRAMMABLE_ANDROID_2, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {SlimefunItems.PLASTIC_SHEET, SlimefunItems.ANDROID_MEMORY_CORE, SlimefunItems.PLASTIC_SHEET, SlimefunItems.COMBUSTION_REACTOR, SlimefunItems.PROGRAMMABLE_ANDROID, new ItemStack(Material.CHEST), SlimefunItems.PLASTIC_SHEET, SlimefunItems.POWER_CRYSTAL, SlimefunItems.PLASTIC_SHEET}) { - - @Override - public float getFuelEfficiency() { - return 1.5F; - } - - @Override - public int getTier() { - return 2; - } - - } + new ProgrammableAndroid(categories.androids, 2, SlimefunItems.PROGRAMMABLE_ANDROID_2, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {SlimefunItems.PLASTIC_SHEET, SlimefunItems.ANDROID_MEMORY_CORE, SlimefunItems.PLASTIC_SHEET, SlimefunItems.COMBUSTION_REACTOR, SlimefunItems.PROGRAMMABLE_ANDROID, new ItemStack(Material.CHEST), SlimefunItems.PLASTIC_SHEET, SlimefunItems.POWER_CRYSTAL, SlimefunItems.PLASTIC_SHEET}) .register(plugin); - new FisherAndroid(categories.androids, SlimefunItems.PROGRAMMABLE_ANDROID_2_FISHERMAN, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {null, null, null, new ItemStack(Material.FISHING_ROD), SlimefunItems.PROGRAMMABLE_ANDROID_2, new ItemStack(Material.FISHING_ROD), null, SlimefunItems.ELECTRIC_MOTOR, null}) { - - @Override - public float getFuelEfficiency() { - return 1.5F; - } - - @Override - public int getTier() { - return 2; - } - - } + new FisherAndroid(categories.androids, 2, SlimefunItems.PROGRAMMABLE_ANDROID_2_FISHERMAN, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {null, null, null, new ItemStack(Material.FISHING_ROD), SlimefunItems.PROGRAMMABLE_ANDROID_2, new ItemStack(Material.FISHING_ROD), null, SlimefunItems.ELECTRIC_MOTOR, null}) .register(plugin); - new ButcherAndroid(categories.androids, SlimefunItems.PROGRAMMABLE_ANDROID_2_BUTCHER, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {null, SlimefunItems.GPS_TRANSMITTER, null, new ItemStack(Material.DIAMOND_SWORD), SlimefunItems.PROGRAMMABLE_ANDROID_2, new ItemStack(Material.DIAMOND_SWORD), null, SlimefunItems.ELECTRIC_MOTOR, null}) { - - @Override - public float getFuelEfficiency() { - return 1.5F; - } - - @Override - public int getTier() { - return 2; - } - - } + new ButcherAndroid(categories.androids, 2, SlimefunItems.PROGRAMMABLE_ANDROID_2_BUTCHER, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {null, SlimefunItems.GPS_TRANSMITTER, null, new ItemStack(Material.DIAMOND_SWORD), SlimefunItems.PROGRAMMABLE_ANDROID_2, new ItemStack(Material.DIAMOND_SWORD), null, SlimefunItems.ELECTRIC_MOTOR, null}) .register(plugin); - new AdvancedFarmerAndroid(categories.androids, SlimefunItems.PROGRAMMABLE_ANDROID_2_FARMER, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {null, SlimefunItems.GPS_TRANSMITTER, null, new ItemStack(Material.DIAMOND_HOE), SlimefunItems.PROGRAMMABLE_ANDROID_2, new ItemStack(Material.DIAMOND_HOE), null, SlimefunItems.ELECTRIC_MOTOR, null}) { - - @Override - public float getFuelEfficiency() { - return 1.5F; - } - - @Override - public int getTier() { - return 2; - } - - } + new AdvancedFarmerAndroid(categories.androids, 2, SlimefunItems.PROGRAMMABLE_ANDROID_2_FARMER, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {null, SlimefunItems.GPS_TRANSMITTER, null, new ItemStack(Material.DIAMOND_HOE), SlimefunItems.PROGRAMMABLE_ANDROID_2, new ItemStack(Material.DIAMOND_HOE), null, SlimefunItems.ELECTRIC_MOTOR, null}) .register(plugin); - new ProgrammableAndroid(categories.androids, SlimefunItems.PROGRAMMABLE_ANDROID_3, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {SlimefunItems.PLASTIC_SHEET, SlimefunItems.ANDROID_MEMORY_CORE, SlimefunItems.PLASTIC_SHEET, SlimefunItems.NUCLEAR_REACTOR, SlimefunItems.PROGRAMMABLE_ANDROID_2, new ItemStack(Material.CHEST), SlimefunItems.BLISTERING_INGOT_3, SlimefunItems.POWER_CRYSTAL, SlimefunItems.BLISTERING_INGOT_3}) { - - @Override - public float getFuelEfficiency() { - return 1F; - } - - @Override - public int getTier() { - return 3; - } - - } + new ProgrammableAndroid(categories.androids, 3, SlimefunItems.PROGRAMMABLE_ANDROID_3, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {SlimefunItems.PLASTIC_SHEET, SlimefunItems.ANDROID_MEMORY_CORE, SlimefunItems.PLASTIC_SHEET, SlimefunItems.NUCLEAR_REACTOR, SlimefunItems.PROGRAMMABLE_ANDROID_2, new ItemStack(Material.CHEST), SlimefunItems.BLISTERING_INGOT_3, SlimefunItems.POWER_CRYSTAL, SlimefunItems.BLISTERING_INGOT_3}) .register(plugin); - new FisherAndroid(categories.androids, SlimefunItems.PROGRAMMABLE_ANDROID_3_FISHERMAN, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {null, null, null, new ItemStack(Material.FISHING_ROD), SlimefunItems.PROGRAMMABLE_ANDROID_3, new ItemStack(Material.FISHING_ROD), null, SlimefunItems.ELECTRIC_MOTOR, null}) { - - @Override - public float getFuelEfficiency() { - return 1F; - } - - @Override - public int getTier() { - return 3; - } - - } + new FisherAndroid(categories.androids, 3, SlimefunItems.PROGRAMMABLE_ANDROID_3_FISHERMAN, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {null, null, null, new ItemStack(Material.FISHING_ROD), SlimefunItems.PROGRAMMABLE_ANDROID_3, new ItemStack(Material.FISHING_ROD), null, SlimefunItems.ELECTRIC_MOTOR, null}) .register(plugin); - new ButcherAndroid(categories.androids, SlimefunItems.PROGRAMMABLE_ANDROID_3_BUTCHER, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {null, SlimefunItems.GPS_TRANSMITTER_3, null, new ItemStack(Material.DIAMOND_SWORD), SlimefunItems.PROGRAMMABLE_ANDROID_3, new ItemStack(Material.DIAMOND_SWORD), null, SlimefunItems.ELECTRIC_MOTOR, null}) { - - @Override - public float getFuelEfficiency() { - return 1F; - } - - @Override - public int getTier() { - return 3; - } - - } + new ButcherAndroid(categories.androids, 3, SlimefunItems.PROGRAMMABLE_ANDROID_3_BUTCHER, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {null, SlimefunItems.GPS_TRANSMITTER_3, null, new ItemStack(Material.DIAMOND_SWORD), SlimefunItems.PROGRAMMABLE_ANDROID_3, new ItemStack(Material.DIAMOND_SWORD), null, SlimefunItems.ELECTRIC_MOTOR, null}) .register(plugin); new SlimefunItem(categories.magicalResources, SlimefunItems.BLANK_RUNE, RecipeType.ANCIENT_ALTAR, diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/tasks/TickerTask.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/tasks/TickerTask.java index f90b0a937..c03afca64 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/tasks/TickerTask.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/tasks/TickerTask.java @@ -144,7 +144,7 @@ public class TickerTask implements Runnable { if (errors == 1) { // Generate a new Error-Report - new ErrorReport(x, l, item); + new ErrorReport<>(x, l, item); bugs.put(position, errors); } else if (errors == 4) { diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/utils/HeadTexture.java b/src/main/java/io/github/thebusybiscuit/slimefun4/utils/HeadTexture.java index 028d7e092..4be9f4f39 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/utils/HeadTexture.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/utils/HeadTexture.java @@ -88,6 +88,8 @@ public enum HeadTexture { SCRIPT_FARM_DOWN("2d4296b333d25319af3f33051797f9e6d821cd19a014fb7137beb86a4e9e96"), SCRIPT_PUSH_ITEMS("90a4dbf6625c42be57a8ba2c330954a76bdf22785540e87a5c9672685238ec"), SCRIPT_PULL_FUEL("2432f5282a50745b912be14deda581bd4a09b977a3c32d7e9578491fee8fa7"), + SCRIPT_NEW("171d8979c1878a05987a7faf21b56d1b744f9d068c74cffcde1ea1edad5852"), + SCRIPT_PAUSE("16139fd1c5654e56e9e4e2c8be7eb2bd5b499d633616663feee99b74352ad64"), GLOBE_OVERWORLD("c9c8881e42915a9d29bb61a16fb26d059913204d265df5b439b3d792acd56"), GLOBE_NETHER("d83571ff589f1a59bb02b80800fc736116e27c3dcf9efebede8cf1fdde"), GLOBE_THE_END("c6cac59b2aae489aa0687b5d802b2555eb14a40bd62b21eb116fa569cdb756"),