planks = getPlanks(log);
@@ -61,10 +67,29 @@ public class TableSaw extends MultiBlockMachine {
}
}
+ /**
+ * This method returns the corresponding plank {@link Material} for a given wood {@link Material}.
+ * The result is wrapped by an {@link Optional}.
+ *
+ * {@literal Material.OAK_LOG} for example will return {@literal Material.OAK_PLANKS}.
+ *
+ * @param log
+ * The log type.
+ *
+ * @return An {@link Optional} containing the corresponding plank type (or an empty {@link Optional})
+ */
private @Nonnull Optional getPlanks(@Nonnull Material log) {
String materialName = log.name().replace("STRIPPED_", "");
- materialName = materialName.substring(0, materialName.lastIndexOf('_')) + "_PLANKS";
- return Optional.ofNullable(Material.getMaterial(materialName));
+ int endIndex = materialName.lastIndexOf('_');
+
+ if (endIndex > 0) {
+ materialName = materialName.substring(0, endIndex) + "_PLANKS";
+ return Optional.ofNullable(Material.getMaterial(materialName));
+ } else {
+ // Fixed #3651 - Do not panic because of one weird wood type.
+ warn("Could not find a corresponding plank for wood type: '" + log.name() + "'");
+ return Optional.empty();
+ }
}
@Override
diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/multiblocks/miner/MiningTask.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/multiblocks/miner/MiningTask.java
index 10ee6dee0..c9710e7f4 100644
--- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/multiblocks/miner/MiningTask.java
+++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/multiblocks/miner/MiningTask.java
@@ -29,7 +29,6 @@ import io.github.bakedlibs.dough.items.ItemUtils;
import io.github.bakedlibs.dough.protection.Interaction;
import io.github.bakedlibs.dough.scheduling.TaskQueue;
import io.github.thebusybiscuit.slimefun4.implementation.Slimefun;
-import io.github.thebusybiscuit.slimefun4.utils.WorldUtils;
import io.papermc.lib.PaperLib;
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.abstractItems.MachineFuel;
@@ -190,7 +189,7 @@ class MiningTask implements Runnable {
furnace.getWorld().playEffect(furnace.getLocation(), Effect.STEP_SOUND, Material.STONE);
World world = start.getWorld();
- for (int y = height; y > WorldUtils.getMinHeight(world); y--) {
+ for (int y = height; y > world.getMinHeight(); y--) {
Block b = world.getBlockAt(x, y, z);
if (!Slimefun.getProtectionManager().hasPermission(Bukkit.getOfflinePlayer(owner), b, Interaction.BREAK_BLOCK)) {
diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/multiblocks/miner/OreDictionary.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/multiblocks/miner/OreDictionary.java
index 39b6b3477..21fb55756 100644
--- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/multiblocks/miner/OreDictionary.java
+++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/multiblocks/miner/OreDictionary.java
@@ -26,12 +26,9 @@ interface OreDictionary {
if (version.isAtLeast(MinecraftVersion.MINECRAFT_1_17)) {
// MC 1.17 - 1.18
return new OreDictionary17();
- } else if (version.isAtLeast(MinecraftVersion.MINECRAFT_1_16)) {
+ } else {
// MC 1.16
return new OreDictionary16();
- } else {
- // MC 1.14 - 1.15
- return new OreDictionary14();
}
}
}
diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/multiblocks/miner/OreDictionary14.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/multiblocks/miner/OreDictionary14.java
deleted file mode 100644
index bf3946253..000000000
--- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/multiblocks/miner/OreDictionary14.java
+++ /dev/null
@@ -1,35 +0,0 @@
-package io.github.thebusybiscuit.slimefun4.implementation.items.multiblocks.miner;
-
-import java.util.Random;
-
-import javax.annotation.Nonnull;
-import javax.annotation.ParametersAreNonnullByDefault;
-
-import org.bukkit.Material;
-import org.bukkit.inventory.ItemStack;
-
-/**
- * Our {@link OreDictionary} implementation for MC 1.14 or higher.
- *
- * @author TheBusyBiscuit
- *
- */
-class OreDictionary14 implements OreDictionary {
-
- @Override
- @ParametersAreNonnullByDefault
- public @Nonnull ItemStack getDrops(Material material, Random random) {
- return switch (material) {
- case COAL_ORE -> new ItemStack(Material.COAL);
- case DIAMOND_ORE -> new ItemStack(Material.DIAMOND);
- case EMERALD_ORE -> new ItemStack(Material.EMERALD);
- case REDSTONE_ORE -> new ItemStack(Material.REDSTONE, 4 + random.nextInt(2));
- case LAPIS_ORE -> new ItemStack(Material.LAPIS_LAZULI, 4 + random.nextInt(4));
- case NETHER_QUARTZ_ORE -> new ItemStack(Material.QUARTZ);
- case IRON_ORE -> new ItemStack(Material.IRON_ORE);
- case GOLD_ORE -> new ItemStack(Material.GOLD_ORE);
- default -> new ItemStack(material);
- };
- }
-
-}
diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/multiblocks/miner/OreDictionary16.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/multiblocks/miner/OreDictionary16.java
index 8a78b5195..f69ebc46d 100644
--- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/multiblocks/miner/OreDictionary16.java
+++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/multiblocks/miner/OreDictionary16.java
@@ -14,16 +14,23 @@ import org.bukkit.inventory.ItemStack;
* @author TheBusyBiscuit
*
*/
-class OreDictionary16 extends OreDictionary14 {
+class OreDictionary16 implements OreDictionary {
@Override
@ParametersAreNonnullByDefault
public @Nonnull ItemStack getDrops(Material material, Random random) {
return switch (material) {
- // In 1.16, breaking nether gold ores should get gold nuggets
+ case COAL_ORE -> new ItemStack(Material.COAL);
+ case DIAMOND_ORE -> new ItemStack(Material.DIAMOND);
+ case EMERALD_ORE -> new ItemStack(Material.EMERALD);
+ case REDSTONE_ORE -> new ItemStack(Material.REDSTONE, 4 + random.nextInt(2));
+ case LAPIS_ORE -> new ItemStack(Material.LAPIS_LAZULI, 4 + random.nextInt(4));
+ case NETHER_QUARTZ_ORE -> new ItemStack(Material.QUARTZ);
+ case IRON_ORE -> new ItemStack(Material.IRON_ORE);
+ case GOLD_ORE -> new ItemStack(Material.GOLD_ORE);
case NETHER_GOLD_ORE -> new ItemStack(Material.GOLD_NUGGET, 2 + random.nextInt(4));
case ANCIENT_DEBRIS -> new ItemStack(Material.ANCIENT_DEBRIS);
- default -> super.getDrops(material, random);
+ default -> new ItemStack(material);
};
}
diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/tools/ClimbingPick.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/tools/ClimbingPick.java
index 17b7b5934..43f022523 100644
--- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/tools/ClimbingPick.java
+++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/tools/ClimbingPick.java
@@ -254,12 +254,10 @@ public class ClimbingPick extends SimpleSlimefunItem implements
if (version != MinecraftVersion.UNIT_TEST) {
p.getWorld().playEffect(b.getLocation(), Effect.STEP_SOUND, b.getType());
- if (version.isAtLeast(MinecraftVersion.MINECRAFT_1_15)) {
- if (hand == EquipmentSlot.HAND) {
- p.swingMainHand();
- } else {
- p.swingOffHand();
- }
+ if (hand == EquipmentSlot.HAND) {
+ p.swingMainHand();
+ } else {
+ p.swingOffHand();
}
}
}
diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/tools/HerculesPickaxe.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/tools/HerculesPickaxe.java
deleted file mode 100644
index ddada272a..000000000
--- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/tools/HerculesPickaxe.java
+++ /dev/null
@@ -1,71 +0,0 @@
-package io.github.thebusybiscuit.slimefun4.implementation.items.tools;
-
-import javax.annotation.Nonnull;
-import javax.annotation.ParametersAreNonnullByDefault;
-
-import org.bukkit.Material;
-import org.bukkit.inventory.ItemStack;
-
-import io.github.bakedlibs.dough.items.CustomItemStack;
-import io.github.thebusybiscuit.slimefun4.api.MinecraftVersion;
-import io.github.thebusybiscuit.slimefun4.api.items.ItemGroup;
-import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItemStack;
-import io.github.thebusybiscuit.slimefun4.api.recipes.RecipeType;
-import io.github.thebusybiscuit.slimefun4.core.handlers.ToolUseHandler;
-import io.github.thebusybiscuit.slimefun4.implementation.Slimefun;
-import io.github.thebusybiscuit.slimefun4.implementation.SlimefunItems;
-import io.github.thebusybiscuit.slimefun4.implementation.items.SimpleSlimefunItem;
-import io.github.thebusybiscuit.slimefun4.utils.tags.SlimefunTag;
-
-@Deprecated
-public class HerculesPickaxe extends SimpleSlimefunItem {
-
- @ParametersAreNonnullByDefault
- public HerculesPickaxe(ItemGroup itemGroup, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe) {
- super(itemGroup, item, recipeType, recipe);
- }
-
- @Override
- public @Nonnull ToolUseHandler getItemHandler() {
- return (e, tool, fortune, drops) -> {
-
- sendDeprecationWarning(e.getPlayer());
-
- Material mat = e.getBlock().getType();
-
- if (SlimefunTag.ORES.isTagged(mat)) {
- if (Slimefun.getMinecraftVersion().isAtLeast(MinecraftVersion.MINECRAFT_1_17)) {
- switch (mat) {
- case DEEPSLATE_IRON_ORE:
- drops.add(new CustomItemStack(SlimefunItems.IRON_DUST, 2));
- break;
- case DEEPSLATE_GOLD_ORE:
- drops.add(new CustomItemStack(SlimefunItems.GOLD_DUST, 2));
- break;
- case COPPER_ORE:
- case DEEPSLATE_COPPER_ORE:
- drops.add(new CustomItemStack(SlimefunItems.COPPER_DUST, 2));
- break;
- default:
- break;
- }
- }
-
- switch (mat) {
- case IRON_ORE:
- drops.add(new CustomItemStack(SlimefunItems.IRON_DUST, 2));
- break;
- case GOLD_ORE:
- drops.add(new CustomItemStack(SlimefunItems.GOLD_DUST, 2));
- break;
- default:
- for (ItemStack drop : e.getBlock().getDrops(tool)) {
- drops.add(new CustomItemStack(drop, drop.getAmount() * 2));
- }
- break;
- }
- }
- };
- }
-
-}
diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/weapons/SeismicAxe.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/weapons/SeismicAxe.java
index 80df25764..93d9095c0 100644
--- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/weapons/SeismicAxe.java
+++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/weapons/SeismicAxe.java
@@ -33,7 +33,6 @@ import io.github.thebusybiscuit.slimefun4.core.attributes.NotPlaceable;
import io.github.thebusybiscuit.slimefun4.core.handlers.ItemUseHandler;
import io.github.thebusybiscuit.slimefun4.implementation.Slimefun;
import io.github.thebusybiscuit.slimefun4.implementation.items.SimpleSlimefunItem;
-import io.github.thebusybiscuit.slimefun4.utils.WorldUtils;
/**
* The {@link SeismicAxe} is an interesting weapon. It spawns ghostly block entities in a straight line
@@ -151,7 +150,7 @@ public class SeismicAxe extends SimpleSlimefunItem implements No
private @Nonnull Block findGround(@Nonnull Block b) {
if (b.getType() == Material.AIR) {
- int minHeight = WorldUtils.getMinHeight(b.getWorld());
+ int minHeight = b.getWorld().getMinHeight();
for (int y = 0; b.getY() - y > minHeight; y++) {
Block block = b.getRelative(0, -y, 0);
diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/listeners/AncientAltarListener.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/listeners/AncientAltarListener.java
index 30071db6f..035303b30 100644
--- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/listeners/AncientAltarListener.java
+++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/listeners/AncientAltarListener.java
@@ -141,7 +141,7 @@ public class AncientAltarListener implements Listener {
// Check if the Item in hand is valid
if (p.getInventory().getItemInMainHand().getType() != Material.AIR) {
// Check for pedestal obstructions
- if (pedestal.getRelative(0, 1, 0).getType() != Material.AIR) {
+ if (!pedestal.getRelative(0, 1, 0).getType().isAir()) {
Slimefun.getLocalization().sendMessage(p, "machines.ANCIENT_PEDESTAL.obstructed", true);
return;
}
diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/listeners/BackpackListener.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/listeners/BackpackListener.java
index 796f6917b..1650b0b42 100644
--- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/listeners/BackpackListener.java
+++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/listeners/BackpackListener.java
@@ -96,6 +96,7 @@ public class BackpackListener implements Listener {
if (backpack instanceof SlimefunBackpack slimefunBackpack) {
if (e.getClick() == ClickType.NUMBER_KEY) {
+ // Prevent disallowed items from being moved using number keys.
if (e.getClickedInventory().getType() != InventoryType.PLAYER) {
ItemStack hotbarItem = e.getWhoClicked().getInventory().getItem(e.getHotbarButton());
@@ -103,12 +104,19 @@ public class BackpackListener implements Listener {
e.setCancelled(true);
}
}
- } else if (e.getClick() == ClickType.SWAP_OFFHAND && e.getClickedInventory().getType() != InventoryType.PLAYER) {
- // Fixes #3265
- ItemStack offHandItem = e.getWhoClicked().getInventory().getItemInOffHand();
+ } else if (e.getClick() == ClickType.SWAP_OFFHAND) {
+ if (e.getClickedInventory().getType() != InventoryType.PLAYER) {
+ // Fixes #3265 - Don't move disallowed items using the off hand.
+ ItemStack offHandItem = e.getWhoClicked().getInventory().getItemInOffHand();
- if (!isAllowed(slimefunBackpack, offHandItem)) {
- e.setCancelled(true);
+ if (!isAllowed(slimefunBackpack, offHandItem)) {
+ e.setCancelled(true);
+ }
+ } else {
+ // Fixes #3664 - Do not swap the backpack to your off hand.
+ if (e.getCurrentItem() != null && e.getCurrentItem().isSimilar(item)) {
+ e.setCancelled(true);
+ }
}
} else if (!isAllowed(slimefunBackpack, e.getCurrentItem())) {
e.setCancelled(true);
diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/listeners/EnhancedFurnaceListener.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/listeners/EnhancedFurnaceListener.java
index 323be5c55..e779bdb34 100644
--- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/listeners/EnhancedFurnaceListener.java
+++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/listeners/EnhancedFurnaceListener.java
@@ -70,6 +70,11 @@ public class EnhancedFurnaceListener implements Listener {
if (state instanceof Furnace furnace) {
FurnaceInventory inventory = furnace.getInventory();
+ // This if statement fixes #3741
+ if (inventory.getSmelting() == null) {
+ return;
+ }
+
boolean multiplier = SlimefunTag.ENHANCED_FURNACE_LUCK_MATERIALS.isTagged(inventory.getSmelting().getType());
int amount = multiplier ? enhancedFurnace.getRandomOutputAmount() : 1;
Optional result = Slimefun.getMinecraftRecipeService().getFurnaceOutput(inventory.getSmelting());
diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/resources/NetherIceResource.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/resources/NetherIceResource.java
index e7d6f06a2..b77ec6d30 100644
--- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/resources/NetherIceResource.java
+++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/resources/NetherIceResource.java
@@ -3,9 +3,7 @@ package io.github.thebusybiscuit.slimefun4.implementation.resources;
import org.bukkit.World.Environment;
import org.bukkit.block.Biome;
-import io.github.thebusybiscuit.slimefun4.api.MinecraftVersion;
import io.github.thebusybiscuit.slimefun4.api.geo.GEOResource;
-import io.github.thebusybiscuit.slimefun4.implementation.Slimefun;
import io.github.thebusybiscuit.slimefun4.implementation.SlimefunItems;
import io.github.thebusybiscuit.slimefun4.utils.biomes.BiomeMap;
@@ -25,12 +23,7 @@ class NetherIceResource extends AbstractResource {
NetherIceResource() {
super("nether_ice", "Nether Ice", SlimefunItems.NETHER_ICE, 6, true);
- if (Slimefun.getMinecraftVersion().isAtLeast(MinecraftVersion.MINECRAFT_1_16)) {
- // 1.16+ introduced Nether biomes
- biomes = getBiomeMap(this, "/biome-maps/nether_ice_v1.16.json");
- } else {
- biomes = getBiomeMap(this, "/biome-maps/nether_ice_v1.14.json");
- }
+ biomes = getBiomeMap(this, "/biome-maps/nether_ice_v1.16.json");
}
@Override
diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/resources/OilResource.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/resources/OilResource.java
index d3bd48c00..55e5bbd11 100644
--- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/resources/OilResource.java
+++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/resources/OilResource.java
@@ -36,7 +36,7 @@ class OilResource extends AbstractResource {
// 1.18+ renamed most biomes
biomes = getBiomeMap(this, "/biome-maps/oil_v1.18.json");
} else {
- biomes = getBiomeMap(this, "/biome-maps/oil_v1.14.json");
+ biomes = getBiomeMap(this, "/biome-maps/oil_v1.16.json");
}
}
diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/resources/SaltResource.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/resources/SaltResource.java
index 23afa77e8..0d6f1630a 100644
--- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/resources/SaltResource.java
+++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/resources/SaltResource.java
@@ -30,7 +30,7 @@ class SaltResource extends AbstractResource {
// 1.18+ renamed most biomes
biomes = getBiomeMap(this, "/biome-maps/salt_v1.18.json");
} else {
- biomes = getBiomeMap(this, "/biome-maps/salt_v1.14.json");
+ biomes = getBiomeMap(this, "/biome-maps/salt_v1.16.json");
}
}
diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/resources/UraniumResource.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/resources/UraniumResource.java
index 8eeca8dfa..ef4ffba76 100644
--- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/resources/UraniumResource.java
+++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/resources/UraniumResource.java
@@ -32,11 +32,8 @@ class UraniumResource extends AbstractResource {
} else if (version.isAtLeast(MinecraftVersion.MINECRAFT_1_17)) {
// 1.17+ introduced cave biomes
biomes = getBiomeMap(this, "/biome-maps/uranium_v1.17.json");
- } else if (version.isAtLeast(MinecraftVersion.MINECRAFT_1_16)) {
- // 1.16+ introduced Nether biomes
- biomes = getBiomeMap(this, "/biome-maps/uranium_v1.16.json");
} else {
- biomes = getBiomeMap(this, "/biome-maps/uranium_v1.14.json");
+ biomes = getBiomeMap(this, "/biome-maps/uranium_v1.16.json");
}
}
diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/setup/ResearchSetup.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/setup/ResearchSetup.java
index 4635c1b4d..7d28e044b 100644
--- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/setup/ResearchSetup.java
+++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/setup/ResearchSetup.java
@@ -113,7 +113,6 @@ public final class ResearchSetup {
register("gold_armor", 87, "Shiny Armor", 13, SlimefunItems.GOLDEN_HELMET_12K, SlimefunItems.GOLDEN_CHESTPLATE_12K, SlimefunItems.GOLDEN_LEGGINGS_12K, SlimefunItems.GOLDEN_BOOTS_12K);
register("night_vision_googles", 89, "Night Vision Goggles", 10, SlimefunItems.NIGHT_VISION_GOGGLES);
register("pickaxe_of_containment", 90, "Pickaxe of Containment", 14, SlimefunItems.PICKAXE_OF_CONTAINMENT, SlimefunItems.BROKEN_SPAWNER);
- register("hercules_pickaxe", 91, "Hercules Pickaxe", 28, SlimefunItems.HERCULES_PICKAXE);
register("table_saw", 92, "Table Saw", 4, SlimefunItems.TABLE_SAW);
register("slime_steel_armor", 93, "Slimy Steel Armor", 27, SlimefunItems.SLIME_HELMET_STEEL, SlimefunItems.SLIME_CHESTPLATE_STEEL, SlimefunItems.SLIME_LEGGINGS_STEEL, SlimefunItems.SLIME_BOOTS_STEEL);
register("blade_of_vampires", 94, "Blade of Vampires", 26, SlimefunItems.BLADE_OF_VAMPIRES);
@@ -144,7 +143,7 @@ public final class ResearchSetup {
register("bound_weapons", 125, "Soulbound Weapons", 29, SlimefunItems.SOULBOUND_SWORD, SlimefunItems.SOULBOUND_BOW, SlimefunItems.SOULBOUND_TRIDENT);
register("bound_tools", 126, "Soulbound Tools", 29, SlimefunItems.SOULBOUND_PICKAXE, SlimefunItems.SOULBOUND_AXE, SlimefunItems.SOULBOUND_SHOVEL, SlimefunItems.SOULBOUND_HOE);
register("bound_armor", 127, "Soulbound Armor", 29, SlimefunItems.SOULBOUND_HELMET, SlimefunItems.SOULBOUND_CHESTPLATE, SlimefunItems.SOULBOUND_LEGGINGS, SlimefunItems.SOULBOUND_BOOTS);
- register("juicer", 129, "Delicious Drinks", 29, SlimefunItems.JUICER, SlimefunItems.APPLE_JUICE, SlimefunItems.MELON_JUICE, SlimefunItems.CARROT_JUICE, SlimefunItems.PUMPKIN_JUICE, SlimefunItems.SWEET_BERRY_JUICE);
+ register("juicer", 129, "Delicious Drinks", 29, SlimefunItems.JUICER, SlimefunItems.APPLE_JUICE, SlimefunItems.MELON_JUICE, SlimefunItems.CARROT_JUICE, SlimefunItems.PUMPKIN_JUICE, SlimefunItems.SWEET_BERRY_JUICE, SlimefunItems.GLOW_BERRY_JUICE);
register("repaired_spawner", 130, "Repairing Spawners", 15, SlimefunItems.REPAIRED_SPAWNER);
register("enhanced_furnace", 132, "Enhanced Furnace", 7, SlimefunItems.ENHANCED_FURNACE, SlimefunItems.ENHANCED_FURNACE_2);
register("more_enhanced_furnaces", 133, "Better Furnaces", 18, SlimefunItems.ENHANCED_FURNACE_3, SlimefunItems.ENHANCED_FURNACE_4, SlimefunItems.ENHANCED_FURNACE_5, SlimefunItems.ENHANCED_FURNACE_6, SlimefunItems.ENHANCED_FURNACE_7);
@@ -221,7 +220,7 @@ public final class ResearchSetup {
register("better_food_fabricator", 211, "Upgraded Food Fabrication", 28, SlimefunItems.FOOD_FABRICATOR_2, SlimefunItems.FOOD_COMPOSTER_2);
register("reactor_access_port", 212, "Reactor Interaction", 18, SlimefunItems.REACTOR_ACCESS_PORT);
register("fluid_pump", 213, "Fluid Pump", 28, SlimefunItems.FLUID_PUMP);
- register("better_freezer", 214, "Upgraded Freezer", 29, SlimefunItems.FREEZER_2);
+ register("better_freezer", 214, "Upgraded Freezer", 29, SlimefunItems.FREEZER_2, SlimefunItems.FREEZER_3);
register("boosted_uranium", 215, "Never-Ending Circle", 30, SlimefunItems.BOOSTED_URANIUM);
register("trash_can", 216, "Trash", 8, SlimefunItems.TRASH_CAN);
register("advanced_output_node", 217, "Advanced Output Node", 24, SlimefunItems.CARGO_OUTPUT_NODE_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 d64323ef9..f4c8fffc3 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
@@ -26,6 +26,7 @@ import io.github.thebusybiscuit.slimefun4.core.attributes.Radioactivity;
import io.github.thebusybiscuit.slimefun4.core.handlers.RainbowTickHandler;
import io.github.thebusybiscuit.slimefun4.implementation.Slimefun;
import io.github.thebusybiscuit.slimefun4.implementation.SlimefunItems;
+import io.github.thebusybiscuit.slimefun4.implementation.items.HiddenItem;
import io.github.thebusybiscuit.slimefun4.implementation.items.RadioactiveItem;
import io.github.thebusybiscuit.slimefun4.implementation.items.VanillaItem;
import io.github.thebusybiscuit.slimefun4.implementation.items.altar.AncientAltar;
@@ -195,7 +196,6 @@ import io.github.thebusybiscuit.slimefun4.implementation.items.tools.ExplosivePi
import io.github.thebusybiscuit.slimefun4.implementation.items.tools.ExplosiveShovel;
import io.github.thebusybiscuit.slimefun4.implementation.items.tools.GoldPan;
import io.github.thebusybiscuit.slimefun4.implementation.items.tools.GrapplingHook;
-import io.github.thebusybiscuit.slimefun4.implementation.items.tools.HerculesPickaxe;
import io.github.thebusybiscuit.slimefun4.implementation.items.tools.LumberAxe;
import io.github.thebusybiscuit.slimefun4.implementation.items.tools.NetherGoldPan;
import io.github.thebusybiscuit.slimefun4.implementation.items.tools.PickaxeOfContainment;
@@ -532,11 +532,11 @@ public final class SlimefunItemSetup {
new ItemStack[] {SlimefunItems.SIFTED_ORE, null, null, null, null, null, null, null, null})
.register(plugin);
- new SlimefunItem(itemGroups.resources, SlimefunItems.LEAD_DUST, RecipeType.ORE_WASHER,
+ new SlimefunItem(itemGroups.resources, SlimefunItems.SILVER_DUST, RecipeType.ORE_WASHER,
new ItemStack[] {SlimefunItems.SIFTED_ORE, null, null, null, null, null, null, null, null})
.register(plugin);
- new SlimefunItem(itemGroups.resources, SlimefunItems.SILVER_DUST, RecipeType.ORE_WASHER,
+ new SlimefunItem(itemGroups.resources, SlimefunItems.LEAD_DUST, RecipeType.ORE_WASHER,
new ItemStack[] {SlimefunItems.SIFTED_ORE, null, null, null, null, null, null, null, null})
.register(plugin);
@@ -1031,10 +1031,6 @@ public final class SlimefunItemSetup {
new PickaxeOfContainment(itemGroups.tools, SlimefunItems.PICKAXE_OF_CONTAINMENT, RecipeType.MAGIC_WORKBENCH,
new ItemStack[] {SlimefunItems.FERROSILICON, SlimefunItems.FERROSILICON, SlimefunItems.FERROSILICON, null, SlimefunItems.GILDED_IRON, null, null, SlimefunItems.GILDED_IRON, null})
.register(plugin);
-
- new HerculesPickaxe(itemGroups.tools, SlimefunItems.HERCULES_PICKAXE, RecipeType.MAGIC_WORKBENCH,
- new ItemStack[] {SlimefunItems.HARDENED_METAL_INGOT, SlimefunItems.HARDENED_METAL_INGOT, SlimefunItems.HARDENED_METAL_INGOT, null, SlimefunItems.FERROSILICON, null, null, SlimefunItems.FERROSILICON, null})
- .register(plugin);
new TableSaw(itemGroups.basicMachines, SlimefunItems.TABLE_SAW).register(plugin);
@@ -1376,6 +1372,10 @@ public final class SlimefunItemSetup {
new SlimefunItemStack(SlimefunItems.FLASK_OF_KNOWLEDGE, 8))
.register(plugin);
+ new HiddenItem(itemGroups.magicalGadgets, SlimefunItems.FILLED_FLASK_OF_KNOWLEDGE, RecipeType.INTERACT,
+ new ItemStack[] {SlimefunItems.FLASK_OF_KNOWLEDGE, null, null, null, null, null, null, null, null})
+ .register(plugin);
+
new BirthdayCake(itemGroups.birthday, new SlimefunItemStack("BIRTHDAY_CAKE", Material.CAKE, "&bBirthday Cake"), RecipeType.ENHANCED_CRAFTING_TABLE,
new ItemStack[] {null, new ItemStack(Material.TORCH), null, new ItemStack(Material.SUGAR), new ItemStack(Material.CAKE), new ItemStack(Material.SUGAR), null, null, null})
.register(plugin);
@@ -2444,6 +2444,13 @@ public final class SlimefunItemSetup {
.setProcessingSpeed(2)
.register(plugin);
+ new Freezer(itemGroups.electricity, SlimefunItems.FREEZER_3, RecipeType.ENHANCED_CRAFTING_TABLE,
+ new ItemStack[] {SlimefunItems.REINFORCED_ALLOY_INGOT, SlimefunItems.REINFORCED_ALLOY_INGOT, SlimefunItems.REINFORCED_ALLOY_INGOT, SlimefunItems.ELECTRO_MAGNET, SlimefunItems.FREEZER_2, SlimefunItems.ELECTRO_MAGNET, SlimefunItems.COOLING_UNIT, SlimefunItems.COOLING_UNIT, SlimefunItems.COOLING_UNIT})
+ .setCapacity(256)
+ .setEnergyConsumption(21)
+ .setProcessingSpeed(3)
+ .register(plugin);
+
new CoolantCell(itemGroups.technicalComponents, SlimefunItems.REACTOR_COOLANT_CELL, RecipeType.FREEZER,
new ItemStack[] {new ItemStack(Material.BLUE_ICE), null, null, null, null, null, null, null, null})
.register(plugin);
@@ -2584,33 +2591,35 @@ public final class SlimefunItemSetup {
MinecraftVersion minecraftVersion = Slimefun.getMinecraftVersion();
- if (minecraftVersion.isAtLeast(MinecraftVersion.MINECRAFT_1_15)) {
- new SlimefunItem(itemGroups.magicalArmor, SlimefunItems.BEE_HELMET, RecipeType.ARMOR_FORGE,
- new ItemStack[] {SlimefunItems.GOLD_8K, new ItemStack(Material.HONEY_BLOCK), SlimefunItems.GOLD_8K, new ItemStack(Material.HONEYCOMB_BLOCK), null, new ItemStack(Material.HONEYCOMB_BLOCK), null, null, null})
- .register(plugin);
+ new SlimefunItem(itemGroups.magicalArmor, SlimefunItems.BEE_HELMET, RecipeType.ARMOR_FORGE,
+ new ItemStack[] {SlimefunItems.GOLD_8K, new ItemStack(Material.HONEY_BLOCK), SlimefunItems.GOLD_8K, new ItemStack(Material.HONEYCOMB_BLOCK), null, new ItemStack(Material.HONEYCOMB_BLOCK), null, null, null})
+ .register(plugin);
- new BeeWings(itemGroups.magicalArmor, SlimefunItems.BEE_WINGS, RecipeType.ARMOR_FORGE,
- new ItemStack[] {SlimefunItems.GOLD_8K, null, SlimefunItems.GOLD_8K, new ItemStack(Material.HONEYCOMB_BLOCK), new ItemStack(Material.ELYTRA), new ItemStack(Material.HONEYCOMB_BLOCK), new ItemStack(Material.HONEY_BLOCK), SlimefunItems.GOLD_8K, new ItemStack(Material.HONEY_BLOCK)})
- .register(plugin);
+ new BeeWings(itemGroups.magicalArmor, SlimefunItems.BEE_WINGS, RecipeType.ARMOR_FORGE,
+ new ItemStack[] {SlimefunItems.GOLD_8K, null, SlimefunItems.GOLD_8K, new ItemStack(Material.HONEYCOMB_BLOCK), new ItemStack(Material.ELYTRA), new ItemStack(Material.HONEYCOMB_BLOCK), new ItemStack(Material.HONEY_BLOCK), SlimefunItems.GOLD_8K, new ItemStack(Material.HONEY_BLOCK)})
+ .register(plugin);
- new SlimefunItem(itemGroups.magicalArmor, SlimefunItems.BEE_LEGGINGS, RecipeType.ARMOR_FORGE,
- new ItemStack[] {SlimefunItems.GOLD_8K, new ItemStack(Material.HONEY_BLOCK), SlimefunItems.GOLD_8K, new ItemStack(Material.HONEYCOMB_BLOCK), null, new ItemStack(Material.HONEYCOMB_BLOCK), new ItemStack(Material.HONEYCOMB_BLOCK), null, new ItemStack(Material.HONEYCOMB_BLOCK)})
- .register(plugin);
+ new SlimefunItem(itemGroups.magicalArmor, SlimefunItems.BEE_LEGGINGS, RecipeType.ARMOR_FORGE,
+ new ItemStack[] {SlimefunItems.GOLD_8K, new ItemStack(Material.HONEY_BLOCK), SlimefunItems.GOLD_8K, new ItemStack(Material.HONEYCOMB_BLOCK), null, new ItemStack(Material.HONEYCOMB_BLOCK), new ItemStack(Material.HONEYCOMB_BLOCK), null, new ItemStack(Material.HONEYCOMB_BLOCK)})
+ .register(plugin);
- new LongFallBoots(itemGroups.magicalArmor, SlimefunItems.BEE_BOOTS, RecipeType.ARMOR_FORGE,
- new ItemStack[] {null, null, null, SlimefunItems.GOLD_8K, null, SlimefunItems.GOLD_8K, new ItemStack(Material.HONEY_BLOCK), null, new ItemStack(Material.HONEY_BLOCK)},
- new PotionEffect[] {new PotionEffect(PotionEffectType.JUMP, 300, 2)})
- .register(plugin);
- }
+ new LongFallBoots(itemGroups.magicalArmor, SlimefunItems.BEE_BOOTS, RecipeType.ARMOR_FORGE,
+ new ItemStack[] {null, null, null, SlimefunItems.GOLD_8K, null, SlimefunItems.GOLD_8K, new ItemStack(Material.HONEY_BLOCK), null, new ItemStack(Material.HONEY_BLOCK)},
+ new PotionEffect[] {new PotionEffect(PotionEffectType.JUMP, 300, 2)})
+ .register(plugin);
- if (minecraftVersion.isAtLeast(MinecraftVersion.MINECRAFT_1_16)) {
- new VillagerRune(itemGroups.magicalResources, SlimefunItems.VILLAGER_RUNE, RecipeType.ANCIENT_ALTAR,
- new ItemStack[] {SlimefunItems.MAGIC_LUMP_3, SlimefunItems.MAGICAL_GLASS, new ItemStack(Material.CRYING_OBSIDIAN), SlimefunItems.STRANGE_NETHER_GOO, SlimefunItems.FIRE_RUNE, SlimefunItems.STRANGE_NETHER_GOO, new ItemStack(Material.CRYING_OBSIDIAN), SlimefunItems.MAGICAL_GLASS, SlimefunItems.MAGIC_LUMP_3},
- new SlimefunItemStack(SlimefunItems.VILLAGER_RUNE, 3))
- .register(plugin);
+ new VillagerRune(itemGroups.magicalResources, SlimefunItems.VILLAGER_RUNE, RecipeType.ANCIENT_ALTAR,
+ new ItemStack[] {SlimefunItems.MAGIC_LUMP_3, SlimefunItems.MAGICAL_GLASS, new ItemStack(Material.CRYING_OBSIDIAN), SlimefunItems.STRANGE_NETHER_GOO, SlimefunItems.FIRE_RUNE, SlimefunItems.STRANGE_NETHER_GOO, new ItemStack(Material.CRYING_OBSIDIAN), SlimefunItems.MAGICAL_GLASS, SlimefunItems.MAGIC_LUMP_3},
+ new SlimefunItemStack(SlimefunItems.VILLAGER_RUNE, 3))
+ .register(plugin);
- new StrangeNetherGoo(itemGroups.magicalResources, SlimefunItems.STRANGE_NETHER_GOO, RecipeType.BARTER_DROP,
- new ItemStack[] {null, null, null, null, new CustomItemStack(HeadTexture.PIGLIN_HEAD.getAsItemStack(), "&fPiglin"), null, null, null, null})
+ new StrangeNetherGoo(itemGroups.magicalResources, SlimefunItems.STRANGE_NETHER_GOO, RecipeType.BARTER_DROP,
+ new ItemStack[] {null, null, null, null, new CustomItemStack(HeadTexture.PIGLIN_HEAD.getAsItemStack(), "&fPiglin"), null, null, null, null})
+ .register(plugin);
+
+ if (minecraftVersion.isAtLeast(MinecraftVersion.MINECRAFT_1_17)) {
+ new Juice(itemGroups.food, SlimefunItems.GLOW_BERRY_JUICE, RecipeType.JUICER,
+ new ItemStack[] {new ItemStack(Material.GLOW_BERRIES), null, null, null, null, null, null, null, null})
.register(plugin);
}
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 d5fbc59b8..ae0c31735 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
@@ -100,14 +100,7 @@ public class TickerTask implements Runnable {
}
// Fixes #2576 - Remove any deleted instances of BlockStorage
- Iterator worlds = Slimefun.getRegistry().getWorlds().values().iterator();
- while (worlds.hasNext()) {
- BlockStorage storage = worlds.next();
-
- if (storage.isMarkedForRemoval()) {
- worlds.remove();
- }
- }
+ Slimefun.getRegistry().getWorlds().values().removeIf(BlockStorage::isMarkedForRemoval);
// Run our ticker code
if (!halted) {
diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/utils/NumberUtils.java b/src/main/java/io/github/thebusybiscuit/slimefun4/utils/NumberUtils.java
index 274361710..0b85e6e68 100644
--- a/src/main/java/io/github/thebusybiscuit/slimefun4/utils/NumberUtils.java
+++ b/src/main/java/io/github/thebusybiscuit/slimefun4/utils/NumberUtils.java
@@ -281,4 +281,38 @@ public final class NumberUtils {
return 0;
}
}
+
+ /**
+ * This detects if 2 integers will overflow/underflow and if they will, returns the corresponding value
+ * @param a the first integer
+ * @param b the second integer
+ * @return {@link Integer#MAX_VALUE} if overflow detected, {@link Integer#MIN_VALUE} if underflow detected, otherwise the sum of a and b
+ */
+ public static int flowSafeAddition(int a, int b) {
+ return limitedAddition(a, b, Integer.MIN_VALUE, Integer.MAX_VALUE);
+ }
+
+ /**
+ * This detects if 2 integers will overflow/underflow past a maximum or minimum value and if they will, returns the corresponding value
+ * @param a the first integer
+ * @param b the second integer
+ * @param min the minimum value for the operation
+ * @param max the maximum value for the operation
+ * @return max if overflow detected, min if underflow detected, otherwise the sum of a and b
+ */
+ public static int limitedAddition(int a, int b, int min, int max) {
+ boolean willOverflow = (a == max && b > 0 || b == max && a > 0) || a > 0 && b > max - a;
+
+ if (willOverflow) {
+ return max;
+ }
+
+ boolean willUnderflow = (a == min && b < 0 || b == min && a < 0) || a < 0 && b < min - a;
+
+ if (willUnderflow) {
+ return min;
+ } else {
+ return a + b;
+ }
+ }
}
diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/utils/SlimefunUtils.java b/src/main/java/io/github/thebusybiscuit/slimefun4/utils/SlimefunUtils.java
index 429ba8232..eeff4b463 100644
--- a/src/main/java/io/github/thebusybiscuit/slimefun4/utils/SlimefunUtils.java
+++ b/src/main/java/io/github/thebusybiscuit/slimefun4/utils/SlimefunUtils.java
@@ -519,27 +519,4 @@ public final class SlimefunUtils {
public static @Nullable Item spawnItem(Location loc, ItemStack item, ItemSpawnReason reason) {
return spawnItem(loc, item, reason, false);
}
-
- /**
- * Helper method to check if an Inventory is empty (has no items in "storage").
- * If the MC version is 1.16 or above
- * this will call {@link Inventory#isEmpty()} (Which calls MC code resulting in a faster method).
- *
- * @param inventory
- * The {@link Inventory} to check.
- *
- * @return True if the inventory is empty and false otherwise
- */
- public static boolean isInventoryEmpty(@Nonnull Inventory inventory) {
- if (Slimefun.getMinecraftVersion().isAtLeast(MinecraftVersion.MINECRAFT_1_16)) {
- return inventory.isEmpty();
- } else {
- for (ItemStack is : inventory.getStorageContents()) {
- if (is != null && !is.getType().isAir()) {
- return false;
- }
- }
- return true;
- }
- }
}
diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/utils/WorldUtils.java b/src/main/java/io/github/thebusybiscuit/slimefun4/utils/WorldUtils.java
deleted file mode 100644
index 094600bd4..000000000
--- a/src/main/java/io/github/thebusybiscuit/slimefun4/utils/WorldUtils.java
+++ /dev/null
@@ -1,40 +0,0 @@
-package io.github.thebusybiscuit.slimefun4.utils;
-
-import javax.annotation.Nonnull;
-
-import org.apache.commons.lang.Validate;
-import org.bukkit.World;
-
-import io.github.thebusybiscuit.slimefun4.api.MinecraftVersion;
-import io.github.thebusybiscuit.slimefun4.implementation.Slimefun;
-
-/**
- * This class holds utilities for {@link World}. This will become especially useful with the changes
- * in the "Cliffs and Caves" update.
- *
- * @author Walshy
- */
-public final class WorldUtils {
-
- private WorldUtils() {}
-
- /**
- * Get the minimum Y of the given {@link World}. This is a feature introduced in Minecraft 1.17
- * and introduced into the Bukkit API in Minecraft 1.16.
- *
- * @param world
- * The world of which to get minimum Y in.
- *
- * @return The minimum Y of the given world.
- */
- public static int getMinHeight(@Nonnull World world) {
- Validate.notNull(world, "World cannot be null!");
-
- if (Slimefun.getMinecraftVersion().isAtLeast(MinecraftVersion.MINECRAFT_1_16)) {
- return world.getMinHeight();
- } else {
- // Default to zero for pre-1.16 worlds
- return 0;
- }
- }
-}
diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/utils/itemstack/ColoredFireworkStar.java b/src/main/java/io/github/thebusybiscuit/slimefun4/utils/itemstack/ColoredFireworkStar.java
index 48ad6d793..17a62c352 100644
--- a/src/main/java/io/github/thebusybiscuit/slimefun4/utils/itemstack/ColoredFireworkStar.java
+++ b/src/main/java/io/github/thebusybiscuit/slimefun4/utils/itemstack/ColoredFireworkStar.java
@@ -9,6 +9,7 @@ import org.bukkit.Color;
import org.bukkit.FireworkEffect;
import org.bukkit.FireworkEffect.Type;
import org.bukkit.Material;
+import org.bukkit.inventory.ItemFlag;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.FireworkEffectMeta;
@@ -42,6 +43,8 @@ public class ColoredFireworkStar extends CustomItemStack {
im.setLore(lines);
}
+
+ im.addItemFlags(ItemFlag.HIDE_POTION_EFFECTS);
});
}
diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/utils/tags/SlimefunTag.java b/src/main/java/io/github/thebusybiscuit/slimefun4/utils/tags/SlimefunTag.java
index 2b0112130..7962c7b02 100644
--- a/src/main/java/io/github/thebusybiscuit/slimefun4/utils/tags/SlimefunTag.java
+++ b/src/main/java/io/github/thebusybiscuit/slimefun4/utils/tags/SlimefunTag.java
@@ -12,6 +12,7 @@ import java.util.stream.Stream;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
+import io.github.thebusybiscuit.slimefun4.implementation.items.autocrafters.AbstractAutoCrafter;
import org.apache.commons.lang.Validate;
import org.bukkit.Material;
import org.bukkit.NamespacedKey;
@@ -143,6 +144,12 @@ public enum SlimefunTag implements Tag {
*/
FUNGUS_SOIL,
+ /**
+ * All block types for mangrove to grow on.
+ * This includes all dirt variants, mud and clay.
+ */
+ MANGROVE_BASE_BLOCKS,
+
/**
* All variants of concrete powder.
* Can you believe there is no tag for this already?
@@ -254,9 +261,24 @@ public enum SlimefunTag implements Tag {
GRAVITY_AFFECTED_BLOCKS,
/**
- * All wool carpets
+ * All wool carpets.
*/
- WOOL_CARPETS;
+ WOOL_CARPETS,
+
+ /**
+ * All supported storage blocks for the {@link AbstractAutoCrafter}
+ */
+ AUTO_CRAFTER_SUPPORTED_STORAGE_BLOCKS,
+
+ /**
+ * All supported storage blocks for cargo.
+ */
+ CARGO_SUPPORTED_STORAGE_BLOCKS,
+
+ /**
+ * All tile entities.
+ */
+ TILE_ENTITIES;
/**
* Lookup table for tag names.
diff --git a/src/main/resources/biome-maps/nether_ice_v1.14.json b/src/main/resources/biome-maps/nether_ice_v1.14.json
deleted file mode 100644
index 45fa5b193..000000000
--- a/src/main/resources/biome-maps/nether_ice_v1.14.json
+++ /dev/null
@@ -1,8 +0,0 @@
-[
- {
- "value" : 32,
- "biomes" : [
- "minecraft:nether"
- ]
- }
-]
diff --git a/src/main/resources/biome-maps/oil_v1.14.json b/src/main/resources/biome-maps/oil_v1.16.json
similarity index 100%
rename from src/main/resources/biome-maps/oil_v1.14.json
rename to src/main/resources/biome-maps/oil_v1.16.json
diff --git a/src/main/resources/biome-maps/salt_v1.14.json b/src/main/resources/biome-maps/salt_v1.16.json
similarity index 100%
rename from src/main/resources/biome-maps/salt_v1.14.json
rename to src/main/resources/biome-maps/salt_v1.16.json
diff --git a/src/main/resources/biome-maps/uranium_v1.14.json b/src/main/resources/biome-maps/uranium_v1.14.json
deleted file mode 100644
index a072891e5..000000000
--- a/src/main/resources/biome-maps/uranium_v1.14.json
+++ /dev/null
@@ -1,41 +0,0 @@
-[
- {
- "value" : 5,
- "biomes" : [
- "minecraft:desert",
- "minecraft:beach",
- "minecraft:stone_shore"
- ]
- },
- {
- "value" : 8,
- "biomes" : [
- "minecraft:mountains",
- "minecraft:wooded_mountains",
- "minecraft:desert_hills",
- "minecraft:wooded_hills",
- "minecraft:taiga_hills",
- "minecraft:mountain_edge",
- "minecraft:jungle_hills",
- "minecraft:gravelly_mountains",
- "minecraft:taiga_mountains",
- "minecraft:tall_birch_hills",
- "minecraft:dark_forest_hills",
- "minecraft:snowy_taiga_mountains",
- "minecraft:giant_spruce_taiga_hills",
- "minecraft:modified_gravelly_mountains",
- "minecraft:bamboo_jungle_hills"
- ]
- },
- {
- "value" : 12,
- "biomes" : [
- "minecraft:badlands",
- "minecraft:wooded_badlands_plateau",
- "minecraft:modified_wooded_badlands_plateau",
- "minecraft:modified_badlands_plateau",
- "minecraft:eroded_badlands",
- "minecraft:badlands_plateau"
- ]
- }
-]
diff --git a/src/main/resources/languages/fa/messages.yml b/src/main/resources/languages/fa/messages.yml
index 806159a96..1daccfc6f 100644
--- a/src/main/resources/languages/fa/messages.yml
+++ b/src/main/resources/languages/fa/messages.yml
@@ -1,5 +1,18 @@
---
commands:
+ help: اين صفحه ي کمک را نشان بده
+ cheat: به شما اجازه ي تقلب آيتم مي دهد
+ teleporter: محل تلپورت پلير ديگر را ببينيد
+ versions: همه ي افزونه های نصب شده را به صورت يک ليست به شما نشان ميدهد
+ search: دنبال کلمه داده شده در کتاب راهنما می گردد
+ research:
+ description: تحقیقات یک پلیر را باز یا ریست میکند
+ reset-target: '&cدانش شما بازنشانی شده است'
+ backpack:
+ description: يک کپي از کوله پشتي موجود را بازیابي کنید
+ charge:
+ charge-success: وسیله شما شارژ شد!
+ not-rechargeable: اين وسیله قابل شارژ نيست!
debug:
description: 'ثبت اشکال زدایی را برای توسعه دهندگان اجرا کنید'
disabled: '&7حالت اشکال زدایی غیرفعال شد.'
@@ -8,6 +21,10 @@ placeholderapi:
guide:
locked: 'قفل شده است'
work-in-progress: 'اين قابليت هنوز کامل نشده!'
+ locked-itemgroup:
+ - 'براي باز کردن اين گروه شما بايد'
+ - 'نیاز به باز کردن قفل همه موارد از'
+ - 'دسته های زیر'
search:
message: '&bدوست دارید دنبال چه چیزی بگردید?'
name: '&7جست و جو...'
@@ -16,6 +33,9 @@ guide:
tooltips:
open-itemgroup: 'براي باز کردن کليک کنيد'
versions-notice: 'این موارد هنگام گزارش باگ بسیار مهم هستند!'
+ wiki: 'این آیتم را در ویکی رسمی Slimefun مشاهده کنید'
+ recipes:
+ generator: 'نوع هاي موجود سوخت'
pages:
previous: 'صفحه ي قبل'
next: 'صفحه ی بعد'
@@ -23,25 +43,61 @@ guide:
title: 'برگشت'
settings: 'به صفحه تنظیمات بازگرد'
languages:
+ selected-language: 'در حال حاضر انتخاب شده:'
+ select: 'برای انتخاب این زبان کلیک کنید'
+ select-default: 'برای انتخاب زبان پیش فرض کلیک کنید'
+ change: 'برای انتخاب زبان جدید کلیک کنید'
+ description:
+ - '&7اکنون این گزینه را دارید که تغییر دهید'
+ - '&7زبان در Slimefun'
+ - '&7به شما ارائه خواهد شد. آیتم ها'
+ - '&7فعلا قابل ترجمه نیست.'
translations:
+ name: '&aچیزی فراموش شده است?'
lore: 'برای افزودن ترجمه خود کلیک کنید'
title:
main: 'راهنمای Slimefun'
settings: 'تنظیمات و اطلاعات'
+ credits: 'مشارکت کنندگان Slimefun4'
+ wiki: 'ویکی Slimefun4'
+ addons: 'افزون ها برای Slimefun4'
bugs: 'گزارش اشکال ها'
source: 'کد منبع'
+ versions: 'نسخه های نصب شده'
credits:
+ profile-link: 'برای دیدن نمایه آنها در GitHub کلیک کنید'
+ open: 'برای دیدن مشارکت کنندگان ما کلیک کنید'
roles:
+ developer: '&6توسعه دهندگان'
wiki: '&3ویرایش کننده ویکی'
+ resourcepack: '&cهنرمند بسته منابع'
translator: '&9مترجم'
messages:
+ hungry: '&cشما برای انجام این کار زیادی گرسنه هستید! برای انجام آن نوار گرسنگی خود را پر کنید!'
disabled-in-world: '&4&lاين آيتم در این جهان غير فعال شده است'
+ auto-crafting:
+ select: 'این دستور غذا را انتخاب کنید'
+ soulbound-rune:
+ fail: '&cشما نمی توانید چند وسیله را به طور همزمان به روح خود متصل کنید.'
+ success: '&aشما با موفقیت این مورد را به روح خود متصل کردید! در صورت مردن شما این وسیله را از دست نمی دهید.'
+ tape-measure:
+ distance: '&7اندازه گیری انجام شده. &eفاصله: %distance%'
no-pvp: '&cشما نمی توانید در اینجا مبارزه کنید!'
link-prompt: '&eاینجا کلیک کنید:'
machines:
+ HOLOGRAM_PROJECTOR:
+ inventory-title: 'ویرایشگر هولوگرام'
+ ELEVATOR:
+ no-destinations: '&4مقصدی پیدا نشد'
TELEPORTER:
teleporting: '&3درحال جا به جایی...'
teleported: '&3جا به جا شدی!'
+ gui:
+ title: 'نقاط راه شما'
+ tooltip: 'کلیک برای جا به جایی'
+ time: 'زمان تخمین زده شده'
+ GPS_CONTROL_PANEL:
+ waypoints: 'نمای کلی نقطه راه'
CARGO_NODES:
connected: '&2وصل است!'
not-connected: '&4وصل نیست!'
@@ -50,6 +106,7 @@ gps:
status-offline: 'آفلاین'
android:
scripts:
+ editor: 'ویرایش برنامه'
uploaded:
- '&bدرحال آپلود...'
- '&aSuccessfully uploaded your script!'
@@ -60,10 +117,18 @@ languages:
fr: 'فرانسوی'
it: 'ایتالیایی'
es: 'اسپانیایی'
+ pl: 'لهستانی'
nl: 'هلندی'
+ cs: 'کشور چک'
hu: 'مجارستانی'
ru: 'روسی'
+ zh-TW: 'چینی (تایوان)'
+ vi: 'ویتنامی'
+ id: 'اندونزیایی'
el: 'یونانی'
+ he: 'عبری'
+ pt: 'پرتغالی (پرتغال)'
+ pt-BR: 'پرتغالی (برزیل)'
ar: 'عربی'
da: 'دانمارکی'
fi: 'فنلاندی'
@@ -72,3 +137,14 @@ languages:
'no': 'نروژی'
ja: 'ژاپنی'
fa: 'فارسی'
+ th: 'تایلندی'
+ tl: 'تاگالوگی'
+ ro: 'رومانیایی'
+ bg: 'بلغاری'
+ ko: 'کره ای'
+ tr: 'ترکی'
+ hr: 'کرواتی'
+ mk: 'مقدونی'
+ sr: 'صربی'
+ si-LK: 'سینهالی'
+ lt: 'لیتوانیایی'
diff --git a/src/main/resources/languages/fa/researches.yml b/src/main/resources/languages/fa/researches.yml
index 9a9a636ac..f83ffd2bb 100644
--- a/src/main/resources/languages/fa/researches.yml
+++ b/src/main/resources/languages/fa/researches.yml
@@ -18,7 +18,9 @@ slimefun:
solar_panel_and_helmet: نیروی خورشیدی
cactus_armor: کت و شلوار کاکتوس
slimefun_metals: فلزات جدید
+ magic_workbench: میز کار جادویی
gold_carats: طلای خالص
+ lava_crystal: موقعیت آتشین
gilded_iron: آهن براق
synthetic_emerald: جواهر تقلبی
hazmat_suit: لباس ضد آتش
@@ -28,6 +30,7 @@ slimefun:
24k_gold_block: شهر طلایی
backpacks: کوله پشتی ها
juicer: نوشیدنی های خوشمزه
+ more_enhanced_furnaces: کوره های بهتر
carbonado_furnace: کوره لبه دار کربونادو
block_placer: بلوک گذار
scroll_of_dimensional_teleposition: چرخاندن چیزها
@@ -44,12 +47,20 @@ slimefun:
oil: نفت
fuel: سوخت
hologram_projector: هولوگرام ها
+ solar_generators: نیروگاه خورشیدی
+ electric_furnaces: کوره برقی
electric_ore_grinding: خرد کردن و آسیاب کردن
+ bio_reactor: راکتور زیستی
elevator: آسانسورها
+ nuclear_reactor: نیروگاه هسته ای
trash_can: اشغال
elytra: بال
special_elytras: بال مخصوص
trident: نیزه سه شاخه
+ lava_generator: مولد گدازه
auto_drier: یک روز خشک
+ diet_cookie: کوکی رژیمی
+ tree_growth_accelerator: درختان سریعتر
lead_clothing: لباس سرب
tape_measure: نوار اندازه گیری
+ bee_armor: زره زنبوری
diff --git a/src/main/resources/languages/he/messages.yml b/src/main/resources/languages/he/messages.yml
index b659a3f56..a6294cdf1 100644
--- a/src/main/resources/languages/he/messages.yml
+++ b/src/main/resources/languages/he/messages.yml
@@ -146,6 +146,8 @@ messages:
multimeter: '&bאחסון אנרגיה: &3%stored% &b/ &3%capacity%'
piglin-barter: 'אתה לא יכול לסחור עם חזירונים באמצעות חפצי סליים פאן'
bee-suit-slow-fall: '&eכנפי הדבורה שלך יעזרו לך להגיע לקרקע בצורה איטית ובטוחה'
+ deprecated-item: '&4פריט זה מיושן ויוסר מסליים פאן בקרוב.'
+ researching-is-disabled: '&cמחקר לא פעיל בשרת זה. לפי ברירת מחדל הכול פתוח!'
multi-tool:
mode-change: '&b%device% &9: המצב השתנה ל: %mode%'
not-shears: '&c מולטי טול לא יכול לשמש כמזמרה!'
@@ -256,6 +258,9 @@ machines:
pick-a-floor: '&3- בחר קומה -'
current-floor: '&e אתה נמצא כרגע על קומה:'
click-to-teleport: '&eלחץ &7 כדי להשתגר לקומה:'
+ enter-name: '&7אנא הכנס את שם הרצפה הרצוי לצ''אט שלך. &f(קודי צבע נתמכים!)'
+ named: '&2 בהצלחה נקבע שם קומה זאת: &f%floor%'
+ editor-title: 'הגדר מעלית זו'
TELEPORTER:
teleporting: '&3משתגר....'
teleported: '&3שוגר!'
@@ -271,6 +276,8 @@ machines:
waypoints: 'סקירת נקודות דרך'
CARGO_NODES:
must-be-placed: '&4חייב להיות מונח על תיבה או מכונה!'
+ connected: '&2מחובר!'
+ not-connected: '&4לא מחובר!'
INDUSTRIAL_MINER:
no-fuel: 'לכורה התעשייתית שלך אזל הדלק! שים את הדלק שלך בתיבה מעל.'
piston-facing: '&cהכורה התעשייתי שלך דורש בוכנות מופנות כלפי מעלה!'
@@ -300,6 +307,8 @@ cauldron:
no-discoloring: '&4אתה לא יכול לשנות את הצבע של שריון סליים פאן'
gps:
deathpoint: "&4נקודת מוות\n&7%date%"
+ status-online: 'מקוון'
+ status-offline: 'לא מקוון'
waypoint:
new: '&eהקלד שם לנקודת הדרך החדשה שלך בצ''אט. (קודי צבע נתמכים!)'
added: '&a נוסף בהצלחה נקודת דרך חדשה'
@@ -399,3 +408,5 @@ languages:
mk: 'מקדונית'
sr: 'סרבית'
be: 'בלארוסית'
+ si-LK: 'סינהאלית'
+ lt: 'ליטאית'
diff --git a/src/main/resources/languages/id/messages.yml b/src/main/resources/languages/id/messages.yml
index 07b17b5aa..cc5c9157f 100644
--- a/src/main/resources/languages/id/messages.yml
+++ b/src/main/resources/languages/id/messages.yml
@@ -25,6 +25,7 @@ placeholderapi:
profile-loading: 'Memuat...'
guide:
locked: 'TERKUNCI'
+ work-in-progress: 'Fitur ini belum sepenuhnya selesai!'
locked-itemgroup:
- 'Untuk membuka kategori ini anda'
- 'harus membuka semua barang dari'
@@ -57,6 +58,7 @@ guide:
selected-language: 'Yang sedang dipilih:'
select: 'Klik untuk memilih bahasa ini'
select-default: 'Klik untuk menggunakan bahasa standar server'
+ change: 'Klik untuk memilih sebuah bahasa baru'
translations:
name: '&aAda yang kurang?'
lore: 'Klik untuk menambahkan terjemahan anda'
@@ -84,6 +86,7 @@ guide:
addons: 'Addons untuk Slimefun4'
bugs: 'Laporkan masalah'
source: 'Kode sumber'
+ versions: 'Versi Terinstal'
credits:
commit: 'Melakukan'
profile-link: 'Klik untuk mengunjungi profil mereka di GitHub'
@@ -196,6 +199,8 @@ machines:
waypoints: 'Gambaran titik jalan'
CARGO_NODES:
must-be-placed: '&4Harus diletakan di dalam peti atau mesin!'
+ connected: '&2Terhubung!'
+ not-connected: '&4Tidak Terhubung!'
INDUSTRIAL_MINER:
no-fuel: '&c Penambang Industri Anda kehabisan bahan bakar! Masuklah bahan bakar Anda ke peti di atas.'
piston-facing: '& c Penambang Industri Anda membutuhkan piston untuk menghadap ke atas!'
@@ -311,4 +316,8 @@ languages:
ko: 'Korea'
tr: 'Turki'
hr: 'Croation'
+ mk: 'Makedonia'
+ sr: 'Serbian'
be: 'Belarusian'
+ si-LK: 'Sinhala'
+ lt: 'Lithuanian'
diff --git a/src/main/resources/languages/ja/messages.yml b/src/main/resources/languages/ja/messages.yml
index 93c5cacf2..43a343ae1 100644
--- a/src/main/resources/languages/ja/messages.yml
+++ b/src/main/resources/languages/ja/messages.yml
@@ -147,6 +147,7 @@ messages:
piglin-barter: '&4Slimefunアイテムはピグリンとの物々交換に使用できません'
bee-suit-slow-fall: '&e蜂の羽が着地を安全でゆっくりにした'
deprecated-item: '&4このアイテムは廃止予定です。近日中にSlimefunから削除されます。'
+ researching-is-disabled: '%cこのサーバーではリサーチが無効化されていました。すべてがデフォルトでアンロックされました!'
multi-tool:
mode-change: '&b%device% モード変更: &9%mode%'
not-shears: '&cMulti Toolはハサミとして利用できません!'
@@ -257,6 +258,7 @@ machines:
pick-a-floor: '&3- 行先の選択 -'
current-floor: '&e現在の階:'
click-to-teleport: '&eクリック&7でこの階に移動:'
+ editor-title: 'エレベーターの設定'
TELEPORTER:
teleporting: '&3テレポート中…'
teleported: '&3テレポート完了!'
@@ -272,6 +274,7 @@ machines:
waypoints: 'ウェイポイント一覧'
CARGO_NODES:
must-be-placed: '&4チェストや機械に対して設置してください!'
+ not-connected: '&4接続されていません!'
INDUSTRIAL_MINER:
no-fuel: '&cIndustrial Minerは燃料切れです!上のチェストに燃料を補充してください。'
piston-facing: '&cIndustrial Minerのピストンは上向きに設置してください!'
@@ -301,6 +304,8 @@ cauldron:
no-discoloring: '&4Slimefunアイテムの脱色はできません'
gps:
deathpoint: '&4死亡地点 &7%date%'
+ status-online: 'オンライン'
+ status-offline: 'オフライン'
waypoint:
new: '&eウェイポイント名をチャットで入力してください&7(カラーコード対応)'
added: '&a新しいウェイポイントを登録しました'
diff --git a/src/main/resources/languages/ja/researches.yml b/src/main/resources/languages/ja/researches.yml
index 54fd472da..00b4bc8e7 100644
--- a/src/main/resources/languages/ja/researches.yml
+++ b/src/main/resources/languages/ja/researches.yml
@@ -153,10 +153,10 @@ slimefun:
electric_ore_grinding: 粉砕粉砕
heated_pressure_chamber: 加熱圧力室Ⅰ
coal_generator: 火力発電所
- bio_reactor: バイオマス発電所
+ bio_reactor: バイオリアクター
auto_enchanting: エンチャント操作術
- auto_anvil: 電動修理術
- multimeter: マルチメーター
+ auto_anvil: 自動金床
+ multimeter: 電力計測
gps_setup: GPS時代の夜明け
gps_emergency_transmitter: 緊急戦線復帰
programmable_androids: アンドロイド
@@ -250,7 +250,7 @@ slimefun:
iron_golem_assembler: 人造アイアンゴーレム
villager_rune: 村人の初期化
elytra_cap: 衝撃緩和装備
- bee_armor: 蜂アーマー
+ bee_armor: 養蜂用防護服
book_binder: エンチャントの本の製本
auto_crafting: 自動クラフト
produce_collector: 自動搾乳
diff --git a/src/main/resources/languages/pt/messages.yml b/src/main/resources/languages/pt/messages.yml
index db241b5fe..773cfd368 100644
--- a/src/main/resources/languages/pt/messages.yml
+++ b/src/main/resources/languages/pt/messages.yml
@@ -2,15 +2,56 @@
commands:
help: Mostra este ecrã de ajuda
cheat: Deixa-te fazer batota
+ give: Dá itens de Slimefun a alguém
+ guide: Dá-te um guia de Slimefun
+ teleporter: Vê os Waypoints de outros
versions: Lista os Addons Instalados
+ open_guide: Abre o guia de slimefun sem utilizar o livro
+ stats: Mostra estatísticas de um jogador
+ research:
+ description: Desbloqueia/Apaga pesquisas de um jogador
+ reset: '&cTu apagaste a sabedoria do %player%'
+ reset-target: '&cA tua sabedoria foi apagada'
+ backpack:
+ description: Recuperar uma cópia de uma mochila existente
+ invalid-id: '&4O id deve ser um número não-negativo!'
+ player-never-joined: '&4Nenhum jogador com este nome foi encontrado!'
+ backpack-does-not-exist: 'A mochila especificada não existe!'
+ restored-backpack-given: '&aA sua mochila foi restaurada e adicionada ao seu inventário!'
+ charge:
+ description: Carrega o item que estás a segurar
+ charge-success: O item foi carregado!
+ not-rechargeable: Este item não pode ser carregado!
+ timings:
+ description: Timings de Slimefun e addons
+ please-wait: '&ePor favor, espere um segundo... Os resultados estão a chegar!'
+ verbose-player: '&4A flag verbose não pode ser utilizada por um jogador!'
+ unknown-flag: '&4Flag desconhecida: &c%flag%'
+ debug:
+ disabled: '&7Modo de debug desabilitado.'
placeholderapi:
profile-loading: 'A carregar...'
guide:
locked: 'BLOQUEADO'
+ work-in-progress: 'Isto ainda não está totalmente concluído!'
+ locked-itemgroup:
+ - 'Para desbloquear esta categoria tu vais ter de'
+ - 'precisas de desbloquear todos os itens das'
+ - 'categorias seguintes'
search:
+ message: '&bO que gostarias de procurar?'
name: '&7Pesquisar...'
+ tooltip: '&bClica para procurar um item'
+ inventory: 'À procura de: %item%'
tooltips:
open-itemgroup: 'Clique para abrir'
+ versions-notice: 'Estes são muito importantes para dar report a bugs!'
+ wiki: 'Veja este item na Wiki oficial do Slimefun'
+ recipes:
+ machine: 'Itens feitos nesta máquina'
+ miner: 'Recursos que podes obter com este Miner'
+ generator: 'Tipos de combustível disponíveis'
+ gold-pan: 'Recursos que podes obter'
pages:
previous: 'Página anterior'
next: 'Página seguinte'
@@ -24,6 +65,11 @@ guide:
select: 'Clique para selecionar esta linguagem'
select-default: 'Clique para selecionar a linguagem padrão'
change: 'Cliqua para selecionar uma linguagem nova'
+ description:
+ - '&7Agora tens a opção de alterar'
+ - '&7o idioma em que Slimefun'
+ - '&7lhe irá ser apresentado. Itens'
+ - '&7não podem ser traduzido por agora.'
translations:
name: '&aFalta alguma coisa?'
lore: 'Cliqua para adicionar a tua própria tradução'
@@ -64,6 +110,9 @@ guide:
resourcepack: '&cArtista de Resourcepack'
translator: '&9Tradutor'
messages:
+ only-players: '&4Este comando é apenas para Jogadores'
+ unknown-player: '&4Jogador Desconhecido: &c%player%'
+ no-permission: '&4Não tens as permissões necessárias para fazer isto'
usage: '&4Utilização: &c%usage%'
not-online: '&4%player% &cnão está online!'
invalid-item: '&4%item% &cnão é um item válido!'
@@ -71,20 +120,49 @@ messages:
hungry: '&cEstás com demasiada fome para fazer isso!'
disabled-in-world: '&4&lEsse item foi desativado neste mundo'
disabled-item: '&4&lEsse item foi desativado! Como é que o conseguiste?'
+ piglin-barter: '&4Não podes trocar com piglins utilizando itens de Slimefun'
+ auto-crafting:
+ tooltips:
+ disabled:
+ - '&cEsta receita está desativada no momento'
+ - ''
+ - '&eLeft Click &7to re-enable this recipe'
+ - '&eRight Click &7to remove this recipe'
+ no-pvp: '&cNão podes fazer pvp aqui!'
+ opening-guide: '&bA abrir o guia, isto pode demorar alguns segundos...'
+ opening-backpack: '&bA abrir a mochila, isto pode demorar alguns segundos...'
link-prompt: '&eClique aqui:'
machines:
full-inventory: '&eDesculpa, o meu inventário está cheio!'
HOLOGRAM_PROJECTOR:
inventory-title: 'Editor de Holograma'
ELEVATOR:
+ no-destinations: '&4Não foram encontrados destinos'
pick-a-floor: '&3- Escolha um piso -'
TELEPORTER:
teleporting: '&3A teletransportar...'
teleported: '&3Teletransportado!'
cancelled: '&4Teletransporte cancelado!'
gui:
+ title: 'Os teus waypoints'
tooltip: 'Clica para te teletransportares'
time: 'Tempo estimado'
+ GPS_CONTROL_PANEL:
+ transmitters: 'Transmissores'
+ waypoints: 'Waypoints'
+anvil:
+ not-working: '&4Não podes usar itens de Slimefun em uma bigorna!'
+ mcmmo-salvaging: '&4Não podes destruir itens do Slimefun!'
+brewing_stand:
+ not-working: '&4Não podes usar itens do Slimefun em um suporte de poções!'
+cartography_table:
+ not-working: '&4Não podes usar itens do Slimefun em uma mesa de cartografia!'
+smithing_table:
+ not-working: '&4Você não pode usar um item do Slimefun como um material de ferreiro!'
+villagers:
+ no-trading: '&4Não podes trocar itens de Slimefun com Villagers!'
+backpack:
+ already-open: '&cEsta mochila está aberta em outro lugar!'
inventory:
no-access: '&4Não tens permissão para aceder este bloco'
android:
@@ -134,6 +212,7 @@ languages:
fr: 'Francês'
it: 'Italiano'
es: 'Espanhol'
+ pl: 'Polaco'
sv: 'Sueco'
nl: 'Holandês'
cs: 'Checo'
diff --git a/src/main/resources/languages/pt/researches.yml b/src/main/resources/languages/pt/researches.yml
index ed97d539c..e590cf417 100644
--- a/src/main/resources/languages/pt/researches.yml
+++ b/src/main/resources/languages/pt/researches.yml
@@ -1 +1,21 @@
---
+slimefun:
+ fortune_cookie: Bolinho da sorte
+ portable_dustbin: Caixote do Lixo Portátil
+ meat_jerky: Jerky de Carne
+ magic_sugar: Açúcar Mágico
+ monster_jerky: Jerky de Monstro
+ slime_armor: Armadura de Slime
+ sword_of_beheading: Espada da Decapitação
+ parachute: Pára-quedas
+ grappling_hook: Gancho-arpão
+ jetpacks: Jetpack
+ slimefun_metals: Metais Novos
+ carbonado: Diamantes Negros
+ synthetic_emerald: Jóia Falsa
+ chainmail_armor: Armadura de Malha
+ uranium: Radioativo
+ crushed_ore: Purificação de Minérios
+ first_aid: Primeiros socorros
+ gold_armor: Armadura Brilhante
+ backpacks: Mochilas
diff --git a/src/main/resources/languages/ro/categories.yml b/src/main/resources/languages/ro/categories.yml
index ed97d539c..2333e476e 100644
--- a/src/main/resources/languages/ro/categories.yml
+++ b/src/main/resources/languages/ro/categories.yml
@@ -1 +1,23 @@
---
+slimefun:
+ weapons: 'Arme'
+ food: 'Mâncare'
+ basic_machines: 'Maşinarii de bază'
+ electricity: 'Energie şi electricitate'
+ androids: 'Androizi programabili'
+ gps: 'Mașinarii GPS'
+ armor: 'Armură'
+ magical_items: 'Obiecte Magice'
+ magical_gadgets: 'Gadget-uri Magice'
+ misc: 'Obiecte Diverse'
+ technical_gadgets: 'Gadget-uri Tehnice'
+ resources: 'Resurse'
+ tech_misc: 'Componente Tehnice'
+ magical_armor: 'Armură Magică'
+ talismans: 'Talismane (nivelul I)'
+ ender_talismans: 'Talismane Ender (nivelul II)'
+ christmas: 'Crăciun (decembrie)'
+ valentines_day: 'Ziua Îndrăgostiților (14 februarie)'
+ easter: 'Paște (Aprilie)'
+ birthday: 'Ziua de naștere a lui TheBusyBiscuit (26 octombrie)'
+ halloween: 'Halloween (31 octombrie)'
diff --git a/src/main/resources/languages/ro/messages.yml b/src/main/resources/languages/ro/messages.yml
index 421d00e64..2990fecf4 100644
--- a/src/main/resources/languages/ro/messages.yml
+++ b/src/main/resources/languages/ro/messages.yml
@@ -1,4 +1,7 @@
---
+commands:
+ timings:
+ please-wait: '&eTe rugam sa astepti o secunda... Rezultatele se incarca!'
placeholderapi:
profile-loading: 'Se încarcă...'
guide:
@@ -8,38 +11,90 @@ guide:
name: '&7Cauta...'
tooltip: '&bClick pentru a căuta un obiect'
inventory: 'Caută pentru: %item%'
+ tooltips:
+ versions-notice: 'Acestea sunt foarte importante atunci când raportezi problemele!'
+ wiki: 'Vezi acest articol pe Wiki-ul Slimefun Oficial'
pages:
previous: 'Pagina anterioară'
next: 'Pagina următoare'
back:
guide: 'Inapoi la Ghidul Slimefun'
languages:
+ selected-language: 'Selectare actuală:'
+ select: 'Click pentru a selecta această limbă'
+ select-default: 'Click pentru a selecta limba implicita'
+ change: 'Click pentru a selecta o nouă limbă'
translations:
name: '&aLipseste ceva?'
+ lore: 'Click pentru a adăuga propria ta traducere'
title:
main: 'Ghid Slimefun'
settings: 'Setări și informații'
+ languages: 'Selectați limba preferată'
+ credits: 'Contribuitori Slimefun4'
+ wiki: 'Wiki Slimefun4'
+ addons: 'Addons pentru Slimefun4'
bugs: 'Raportare Buguri'
+ source: 'Cod sursă'
versions: 'Versiuni instalate'
+ credits:
+ commit: 'Commit'
+ commits: 'Commit-uri'
+ profile-link: 'Faceți clic pentru a le vizita profilul pe GitHub'
+ open: 'Click pentru a vedea contribuitorii noștri'
+ roles:
+ developer: '&6Dezvoltator'
+ wiki: '&3Editor Wiki'
+ resourcepack: '&cArtist Resurse'
+ translator: '&9Traducator'
messages:
+ not-researched: '&4Nu ai suficiente cunostinte pentru a intelege acest obiect. &cVa trebui sa deblochezi &f"%item%&f"'
+ not-enough-xp: '&4Nu ai suficient XP pentru a debloca acest obiect'
+ unlocked: '&bAi deblocat &7"%research%"'
+ only-players: '&4Aceasta comanda este doar pentru jucatori'
link-prompt: '&eClick aici:'
+machines:
+ TELEPORTER:
+ teleporting: '&3Teleportare...'
+ teleported: '&3Teleportat!'
+ cancelled: '&4Teleportare anulata!'
+ invulnerability: '&b&lAi primit 30 de secunde de Invulnerabilitate!'
+ gui:
+ title: 'Punctele tale de referinta'
+ tooltip: 'Click pentru teleportare'
+ time: 'Timp estimat'
languages:
en: 'Engleză'
de: 'Germană'
fr: 'Franceză'
it: 'Italiană'
es: 'Spaniolă'
+ pl: 'Poloneză'
sv: 'Suedeză'
nl: 'Olandeză'
cs: 'Cehă'
hu: 'Maghiară'
+ lv: 'Letonă'
ru: 'Rusă'
sk: 'Slovacă'
+ zh-CN: 'Chineză (China)'
+ zh-TW: 'Chineză (Taiwan)'
vi: 'Vietnameză'
id: 'Indoneziană'
el: 'Greacă'
he: 'Ebraică'
+ pt: 'Portugheză (Portugalia)'
ar: 'Arabă'
fi: 'Finlandeză'
uk: 'Ucraineană'
+ ja: 'Japoneză'
+ fa: 'Persiană'
+ th: 'Tailandeza'
+ tl: 'Tagalog'
+ ro: 'Română'
+ bg: 'Bulgară'
+ ko: 'Coreeană'
+ hr: 'Croată'
+ mk: 'Macedoneană'
+ sr: 'Sârbă'
be: 'Belarusă'
diff --git a/src/main/resources/languages/ro/researches.yml b/src/main/resources/languages/ro/researches.yml
index ed97d539c..c285f2f0c 100644
--- a/src/main/resources/languages/ro/researches.yml
+++ b/src/main/resources/languages/ro/researches.yml
@@ -1 +1,7 @@
---
+slimefun:
+ walking_sticks: Baston
+ portable_crafter: Masă de fabricare portabilă
+ portable_dustbin: Dustbin portabil
+ meat_jerky: Bucati de carne uscata
+ armor_forge: Masa de fabricare Armuri
diff --git a/src/main/resources/languages/sk/researches.yml b/src/main/resources/languages/sk/researches.yml
index d2eb91478..a26260815 100644
--- a/src/main/resources/languages/sk/researches.yml
+++ b/src/main/resources/languages/sk/researches.yml
@@ -1,7 +1,7 @@
---
slimefun:
walking_sticks: Vychádzkové paličky
- portable_crafter: Prenosný crafter
+ portable_crafter: Prenosný pracovný stôl
fortune_cookie: Koláčik šťastia
portable_dustbin: Prenosný kôš
meat_jerky: Sušené mäso
@@ -13,14 +13,14 @@ slimefun:
magic_eye_of_ender: Magiké Oko Endu
magic_sugar: Magický cukor
monster_jerky: Sušené mäso z monštier
- slime_armor: Slime brnenie
+ slime_armor: Slizové brnenie
sword_of_beheading: Meč popráv
basic_circuit_board: Základná obvodová doska
advanced_circuit_board: Pokročilá obvodová doska
smeltery: Taviareň
steel: Vek ocele
misc_power_items: Dôležité veci súvisiace s energiou
- battery: Tvoja prvá baterka
+ battery: Tvoja prvá batéria
steel_plate: Oceľové pokovovanie
steel_thruster: Oceľová tryska
parachute: Padák
diff --git a/src/main/resources/languages/translators.json b/src/main/resources/languages/translators.json
index 99825f674..eca5421a1 100644
--- a/src/main/resources/languages/translators.json
+++ b/src/main/resources/languages/translators.json
@@ -174,5 +174,11 @@
"Day-OS",
"ooicram",
"Sxigames"
+ ],
+ "fa" : [
+ "mohammadamin22",
+ "AmirYaKuZa",
+ "amooking",
+ "taha2hosseini1"
]
}
diff --git a/src/main/resources/languages/zh-CN/messages.yml b/src/main/resources/languages/zh-CN/messages.yml
index 306072f4c..ea7d7da10 100644
--- a/src/main/resources/languages/zh-CN/messages.yml
+++ b/src/main/resources/languages/zh-CN/messages.yml
@@ -93,7 +93,7 @@ guide:
click: '&e单击禁用解锁研究动画'
disabled:
text:
- - '&b解锁动画: &a禁用'
+ - '&b解锁动画: &4禁用'
- ''
- '&7现在你可以选择是否'
- '&7跳过解锁物品研究'
diff --git a/src/main/resources/languages/zh-CN/recipes.yml b/src/main/resources/languages/zh-CN/recipes.yml
index 57fe31d18..778c63d36 100644
--- a/src/main/resources/languages/zh-CN/recipes.yml
+++ b/src/main/resources/languages/zh-CN/recipes.yml
@@ -22,10 +22,10 @@ slimefun:
- '如合成表所示'
- '使用磨石制作'
smeltery:
- name: '冶炼机 (Smeltery)'
+ name: '冶炼炉 (Smeltery)'
lore:
- '如合成表所示'
- - '用冶炼机合成'
+ - '用冶炼炉合成'
ore_crusher:
name: '矿石粉碎机 (Ore Crusher)'
lore:
diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml
index 1215c7454..5e5a3adbe 100644
--- a/src/main/resources/plugin.yml
+++ b/src/main/resources/plugin.yml
@@ -9,7 +9,7 @@ description: Slimefun basically turns your entire Server into a FTB modpack with
# Technical settings
main: io.github.thebusybiscuit.slimefun4.implementation.Slimefun
-api-version: '1.14'
+api-version: '1.16'
# (Soft) dependencies of Slimefun, we hook into these plugins.
softdepend:
diff --git a/src/main/resources/tags/auto_crafter_supported_storage_blocks.json b/src/main/resources/tags/auto_crafter_supported_storage_blocks.json
new file mode 100644
index 000000000..c71debd74
--- /dev/null
+++ b/src/main/resources/tags/auto_crafter_supported_storage_blocks.json
@@ -0,0 +1,8 @@
+{
+ "values" : [
+ "#slimefun:shulker_boxes",
+ "minecraft:chest",
+ "minecraft:trapped_chest",
+ "minecraft:barrel"
+ ]
+}
\ No newline at end of file
diff --git a/src/main/resources/tags/cargo_supported_storage_blocks.json b/src/main/resources/tags/cargo_supported_storage_blocks.json
new file mode 100644
index 000000000..eb960c5e4
--- /dev/null
+++ b/src/main/resources/tags/cargo_supported_storage_blocks.json
@@ -0,0 +1,15 @@
+{
+ "values" : [
+ "#slimefun:shulker_boxes",
+ "minecraft:chest",
+ "minecraft:trapped_chest",
+ "minecraft:barrel",
+ "minecraft:furnace",
+ "minecraft:dispenser",
+ "minecraft:dropper",
+ "minecraft:hopper",
+ "minecraft:brewing_stand",
+ "minecraft:blast_furnace",
+ "minecraft:smoker"
+ ]
+}
\ No newline at end of file
diff --git a/src/main/resources/tags/climbing_pick_strong_surfaces.json b/src/main/resources/tags/climbing_pick_strong_surfaces.json
index ca798a9bd..148f66f4b 100644
--- a/src/main/resources/tags/climbing_pick_strong_surfaces.json
+++ b/src/main/resources/tags/climbing_pick_strong_surfaces.json
@@ -11,6 +11,26 @@
{
"id" : "minecraft:basalt",
"required" : false
- }
+ },
+ {
+ "id" : "minecraft:calcite",
+ "required" : false
+ },
+ {
+ "id" : "minecraft:deepslate",
+ "required" : false
+ },
+ {
+ "id" : "minecraft:dripstone_block",
+ "required" : false
+ },
+ {
+ "id" : "minecraft:smooth_basalt",
+ "required" : false
+ },
+ {
+ "id" : "minecraft:tuff",
+ "required" : false
+ }
]
}
diff --git a/src/main/resources/tags/climbing_pick_weak_surfaces.json b/src/main/resources/tags/climbing_pick_weak_surfaces.json
index 902bfac23..f737e2841 100644
--- a/src/main/resources/tags/climbing_pick_weak_surfaces.json
+++ b/src/main/resources/tags/climbing_pick_weak_surfaces.json
@@ -2,6 +2,11 @@
"values" : [
"#slimefun:concrete_powders",
"#minecraft:sand",
- "minecraft:gravel"
+ "minecraft:gravel",
+ "minecraft:clay",
+ {
+ "id" : "minecraft:skulk",
+ "required" : false
+ }
]
}
diff --git a/src/main/resources/tags/mangrove_base_blocks.json b/src/main/resources/tags/mangrove_base_blocks.json
new file mode 100644
index 000000000..640b0da6f
--- /dev/null
+++ b/src/main/resources/tags/mangrove_base_blocks.json
@@ -0,0 +1,10 @@
+{
+ "values" : [
+ "#slimefun:dirt_variants",
+ "minecraft:clay",
+ {
+ "id" : "minecraft:mud",
+ "required" : false
+ }
+ ]
+}
diff --git a/src/main/resources/tags/tile_entities.json b/src/main/resources/tags/tile_entities.json
new file mode 100644
index 000000000..bcbafbd5e
--- /dev/null
+++ b/src/main/resources/tags/tile_entities.json
@@ -0,0 +1,42 @@
+{
+ "values" : [
+ "#slimefun:shulker_boxes",
+ "#minecraft:signs",
+ "#minecraft:banners",
+ "#minecraft:beds",
+ "minecraft:chest",
+ "minecraft:trapped_chest",
+ "minecraft:barrel",
+ "minecraft:furnace",
+ "minecraft:dispenser",
+ "minecraft:dropper",
+ "minecraft:hopper",
+ "minecraft:brewing_stand",
+ "minecraft:blast_furnace",
+ "minecraft:smoker",
+ "minecraft:beacon",
+ "minecraft:spawner",
+ "minecraft:note_block",
+ "minecraft:jukebox",
+ "minecraft:enchanting_table",
+ "minecraft:end_portal",
+ "minecraft:ender_chest",
+ "minecraft:command_block",
+ "minecraft:structure_block",
+ "minecraft:end_gateway",
+ "minecraft:comparator",
+ "minecraft:conduit",
+ "minecraft:bell",
+ "minecraft:daylight_detector",
+ "minecraft:player_head",
+ "minecraft:player_wall_head",
+ {
+ "id" : "minecraft:soul_campfire",
+ "required" : false
+ },
+ {
+ "id" : "minecraft:lectern",
+ "required" : false
+ }
+ ]
+}
\ No newline at end of file
diff --git a/src/main/resources/wiki.json b/src/main/resources/wiki.json
index bf199037f..012e4615e 100644
--- a/src/main/resources/wiki.json
+++ b/src/main/resources/wiki.json
@@ -215,6 +215,7 @@
"GILDED_IRON_CHESTPLATE" : "Armor",
"GILDED_IRON_HELMET" : "Armor",
"GILDED_IRON_LEGGINGS" : "Armor",
+ "GLOW_BERRY_JUICE" : "Juices",
"GLOWSTONE_BOOTS" : "Magical-Armor",
"GLOWSTONE_CHESTPLATE" : "Magical-Armor",
"GLOWSTONE_HELMET" : "Magical-Armor",
diff --git a/src/test/java/io/github/thebusybiscuit/slimefun4/utils/TestMinecraftVersion.java b/src/test/java/io/github/thebusybiscuit/slimefun4/utils/TestMinecraftVersion.java
index 5412b3f0d..72beee009 100644
--- a/src/test/java/io/github/thebusybiscuit/slimefun4/utils/TestMinecraftVersion.java
+++ b/src/test/java/io/github/thebusybiscuit/slimefun4/utils/TestMinecraftVersion.java
@@ -11,57 +11,57 @@ class TestMinecraftVersion {
@Test
@DisplayName("Test if Minecraft versions match themselves")
void testMatches() {
- Assertions.assertTrue(MinecraftVersion.MINECRAFT_1_14.isMinecraftVersion(14));
- Assertions.assertTrue(MinecraftVersion.MINECRAFT_1_15.isMinecraftVersion(15));
+ Assertions.assertTrue(MinecraftVersion.MINECRAFT_1_16.isMinecraftVersion(16));
+ Assertions.assertTrue(MinecraftVersion.MINECRAFT_1_17.isMinecraftVersion(17));
- Assertions.assertFalse(MinecraftVersion.MINECRAFT_1_15.isMinecraftVersion(14));
- Assertions.assertFalse(MinecraftVersion.MINECRAFT_1_14.isMinecraftVersion(0));
+ Assertions.assertFalse(MinecraftVersion.MINECRAFT_1_17.isMinecraftVersion(16));
+ Assertions.assertFalse(MinecraftVersion.MINECRAFT_1_16.isMinecraftVersion(0));
}
@Test
@DisplayName("Test if Minecraft versions are ordered correctly (#atLeast)")
void testAtLeast() {
- Assertions.assertTrue(MinecraftVersion.MINECRAFT_1_16.isAtLeast(MinecraftVersion.MINECRAFT_1_14));
- Assertions.assertTrue(MinecraftVersion.MINECRAFT_1_15.isAtLeast(MinecraftVersion.MINECRAFT_1_14));
- Assertions.assertTrue(MinecraftVersion.MINECRAFT_1_15.isAtLeast(MinecraftVersion.MINECRAFT_1_15));
+ Assertions.assertTrue(MinecraftVersion.MINECRAFT_1_18.isAtLeast(MinecraftVersion.MINECRAFT_1_16));
+ Assertions.assertTrue(MinecraftVersion.MINECRAFT_1_17.isAtLeast(MinecraftVersion.MINECRAFT_1_16));
+ Assertions.assertTrue(MinecraftVersion.MINECRAFT_1_17.isAtLeast(MinecraftVersion.MINECRAFT_1_17));
- Assertions.assertFalse(MinecraftVersion.MINECRAFT_1_15.isAtLeast(MinecraftVersion.MINECRAFT_1_16));
+ Assertions.assertFalse(MinecraftVersion.MINECRAFT_1_17.isAtLeast(MinecraftVersion.MINECRAFT_1_18));
}
@Test
@DisplayName("Test correct behaviour for MinecraftVersion.UNKNOWN.isAtleast(...)")
void testAtLeastUnknown() {
// Unknown should always fall back to false
- Assertions.assertFalse(MinecraftVersion.UNKNOWN.isAtLeast(MinecraftVersion.MINECRAFT_1_14));
- Assertions.assertFalse(MinecraftVersion.UNKNOWN.isAtLeast(MinecraftVersion.MINECRAFT_1_15));
+ Assertions.assertFalse(MinecraftVersion.UNKNOWN.isAtLeast(MinecraftVersion.MINECRAFT_1_16));
+ Assertions.assertFalse(MinecraftVersion.UNKNOWN.isAtLeast(MinecraftVersion.MINECRAFT_1_17));
- Assertions.assertThrows(IllegalArgumentException.class, () -> MinecraftVersion.MINECRAFT_1_14.isAtLeast(null));
+ Assertions.assertThrows(IllegalArgumentException.class, () -> MinecraftVersion.MINECRAFT_1_16.isAtLeast(null));
}
@Test
@DisplayName("Test if Minecraft versions are ordered correctly (#isBefore)")
void testIsBefore() {
- Assertions.assertTrue(MinecraftVersion.MINECRAFT_1_14.isBefore(MinecraftVersion.MINECRAFT_1_15));
- Assertions.assertTrue(MinecraftVersion.MINECRAFT_1_14.isBefore(MinecraftVersion.MINECRAFT_1_16));
+ Assertions.assertTrue(MinecraftVersion.MINECRAFT_1_16.isBefore(MinecraftVersion.MINECRAFT_1_17));
+ Assertions.assertTrue(MinecraftVersion.MINECRAFT_1_16.isBefore(MinecraftVersion.MINECRAFT_1_18));
- Assertions.assertFalse(MinecraftVersion.MINECRAFT_1_15.isBefore(MinecraftVersion.MINECRAFT_1_15));
- Assertions.assertFalse(MinecraftVersion.MINECRAFT_1_15.isBefore(MinecraftVersion.MINECRAFT_1_14));
+ Assertions.assertFalse(MinecraftVersion.MINECRAFT_1_17.isBefore(MinecraftVersion.MINECRAFT_1_17));
+ Assertions.assertFalse(MinecraftVersion.MINECRAFT_1_17.isBefore(MinecraftVersion.MINECRAFT_1_16));
}
@Test
@DisplayName("Test correct behaviour for MinecraftVersion.UNKNOWN.isBefore(...)")
void testIsBeforeUnknown() {
// Unknown should always fall back to true
- Assertions.assertTrue(MinecraftVersion.UNKNOWN.isBefore(MinecraftVersion.MINECRAFT_1_14));
- Assertions.assertTrue(MinecraftVersion.UNKNOWN.isBefore(MinecraftVersion.MINECRAFT_1_15));
+ Assertions.assertTrue(MinecraftVersion.UNKNOWN.isBefore(MinecraftVersion.MINECRAFT_1_16));
+ Assertions.assertTrue(MinecraftVersion.UNKNOWN.isBefore(MinecraftVersion.MINECRAFT_1_17));
- Assertions.assertThrows(IllegalArgumentException.class, () -> MinecraftVersion.MINECRAFT_1_14.isBefore(null));
+ Assertions.assertThrows(IllegalArgumentException.class, () -> MinecraftVersion.MINECRAFT_1_16.isBefore(null));
}
@Test
@DisplayName("Test warning system for lowest supported version checks")
void testLowestSupportedVersion() {
- Assertions.assertThrows(IllegalArgumentException.class, () -> MinecraftVersion.UNIT_TEST.isAtLeast(MinecraftVersion.MINECRAFT_1_14));
+ Assertions.assertThrows(IllegalArgumentException.class, () -> MinecraftVersion.UNIT_TEST.isAtLeast(MinecraftVersion.MINECRAFT_1_16));
}
}
diff --git a/src/test/java/io/github/thebusybiscuit/slimefun4/utils/TestNumberUtils.java b/src/test/java/io/github/thebusybiscuit/slimefun4/utils/TestNumberUtils.java
index e5eca34a1..cb6d40a23 100644
--- a/src/test/java/io/github/thebusybiscuit/slimefun4/utils/TestNumberUtils.java
+++ b/src/test/java/io/github/thebusybiscuit/slimefun4/utils/TestNumberUtils.java
@@ -91,4 +91,29 @@ class TestNumberUtils {
Assertions.assertEquals("-2Q", NumberUtils.getCompactDouble(-2000000000000000.0));
}
+ @Test
+ @DisplayName("Test flow safe addition")
+ void testFlowSafeAddition() {
+ Assertions.assertEquals(Integer.MAX_VALUE, NumberUtils.flowSafeAddition(Integer.MAX_VALUE, 1));
+ Assertions.assertEquals(Integer.MAX_VALUE, NumberUtils.flowSafeAddition(1, Integer.MAX_VALUE));
+ Assertions.assertEquals(Integer.MAX_VALUE, NumberUtils.flowSafeAddition(Integer.MAX_VALUE - 1, 2));
+ Assertions.assertEquals(Integer.MAX_VALUE, NumberUtils.flowSafeAddition(2, Integer.MAX_VALUE - 1));
+ Assertions.assertEquals(Integer.MIN_VALUE, NumberUtils.flowSafeAddition(Integer.MIN_VALUE, -1));
+ Assertions.assertEquals(Integer.MIN_VALUE, NumberUtils.flowSafeAddition(-1, Integer.MIN_VALUE));
+ Assertions.assertEquals(Integer.MIN_VALUE, NumberUtils.flowSafeAddition(Integer.MIN_VALUE + 1, -2));
+ Assertions.assertEquals(Integer.MIN_VALUE, NumberUtils.flowSafeAddition(-2, Integer.MIN_VALUE + 1));
+ }
+
+ @Test
+ @DisplayName("Test limited addition")
+ void testLimitedAddition() {
+ Assertions.assertEquals(1000, NumberUtils.limitedAddition(1000, 1, -1000, 1000));
+ Assertions.assertEquals(1000, NumberUtils.limitedAddition(1, 1000, -1000, 1000));
+ Assertions.assertEquals(1000, NumberUtils.limitedAddition(999, 2, -1000, 1000));
+ Assertions.assertEquals(1000, NumberUtils.limitedAddition(2, 999, -1000, 1000));
+ Assertions.assertEquals(-1000, NumberUtils.limitedAddition(-1000, -1, -1000, 1000));
+ Assertions.assertEquals(-1000, NumberUtils.limitedAddition(-1, -1000, -1000, 1000));
+ Assertions.assertEquals(-1000, NumberUtils.limitedAddition(-999, -2, -1000, 1000));
+ Assertions.assertEquals(-1000, NumberUtils.limitedAddition(-2, -999, -1000, 1000));
+ }
}
diff --git a/src/test/java/io/github/thebusybiscuit/slimefun4/utils/biomes/TestBiomeMapCompatibility.java b/src/test/java/io/github/thebusybiscuit/slimefun4/utils/biomes/TestBiomeMapCompatibility.java
index bec5087a8..416651d02 100644
--- a/src/test/java/io/github/thebusybiscuit/slimefun4/utils/biomes/TestBiomeMapCompatibility.java
+++ b/src/test/java/io/github/thebusybiscuit/slimefun4/utils/biomes/TestBiomeMapCompatibility.java
@@ -98,11 +98,6 @@ class TestBiomeMapCompatibility {
Map testCases = new HashMap<>();
// @formatter:off
- testCases.put("nether_ice_v1.14", new MinecraftVersion[] {
- MinecraftVersion.MINECRAFT_1_14,
- MinecraftVersion.MINECRAFT_1_15
- });
-
testCases.put("nether_ice_v1.16", new MinecraftVersion[] {
MinecraftVersion.MINECRAFT_1_16,
MinecraftVersion.MINECRAFT_1_17,
@@ -110,9 +105,7 @@ class TestBiomeMapCompatibility {
MinecraftVersion.MINECRAFT_1_19
});
- testCases.put("oil_v1.14", new MinecraftVersion[] {
- MinecraftVersion.MINECRAFT_1_14,
- MinecraftVersion.MINECRAFT_1_15,
+ testCases.put("oil_v1.16", new MinecraftVersion[] {
MinecraftVersion.MINECRAFT_1_16,
MinecraftVersion.MINECRAFT_1_17
});
@@ -122,9 +115,7 @@ class TestBiomeMapCompatibility {
MinecraftVersion.MINECRAFT_1_19
});
- testCases.put("salt_v1.14", new MinecraftVersion[] {
- MinecraftVersion.MINECRAFT_1_14,
- MinecraftVersion.MINECRAFT_1_15,
+ testCases.put("salt_v1.16", new MinecraftVersion[] {
MinecraftVersion.MINECRAFT_1_16,
MinecraftVersion.MINECRAFT_1_17
});
@@ -134,11 +125,6 @@ class TestBiomeMapCompatibility {
MinecraftVersion.MINECRAFT_1_19
});
- testCases.put("uranium_v1.14", new MinecraftVersion[] {
- MinecraftVersion.MINECRAFT_1_14,
- MinecraftVersion.MINECRAFT_1_15
- });
-
testCases.put("uranium_v1.16", new MinecraftVersion[] {
MinecraftVersion.MINECRAFT_1_16
});