diff --git a/pom.xml b/pom.xml
index 5bc0d0d651..93d9bca624 100644
--- a/pom.xml
+++ b/pom.xml
@@ -14,7 +14,7 @@
jar
- Slimefun is a Spigot/Paper plugin that simulates a modpack-like atmosphere by adding over 500 new items and recipes to your Minecraft Server.
+ Slimefun is a Paper plugin that simulates a modpack-like atmosphere by adding over 500 new items and recipes to your Minecraft Server.
https://github.com/Slimefun/Slimefun4
@@ -29,8 +29,8 @@
21
- 1.20.6
- https://hub.spigotmc.org/javadocs/spigot/
+ 1.21.1
+ https://hub.spigotmc.org/javadocs/spigot/
Slimefun_Slimefun4
@@ -367,6 +367,13 @@
compile
+
+
+ io.papermc.paper
+ paper-api
+ 1.21.1-R0.1-SNAPSHOT
+
+
org.junit.jupiter
@@ -389,7 +396,7 @@
com.github.MockBukkit
MockBukkit
- c7cc678834
+ v3.130.2
test
@@ -401,13 +408,6 @@
-
-
- io.papermc.paper
- paper-api
- 1.20.6-R0.1-SNAPSHOT
- test
-
@@ -515,12 +515,6 @@
2.6
compile
-
- org.spigotmc
- spigot-api
- ${spigot.version}-R0.1-SNAPSHOT
- provided
-
com.mojang
authlib
diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/api/items/SlimefunItemStack.java b/src/main/java/io/github/thebusybiscuit/slimefun4/api/items/SlimefunItemStack.java
index 611e85df6d..8ae4a86baa 100644
--- a/src/main/java/io/github/thebusybiscuit/slimefun4/api/items/SlimefunItemStack.java
+++ b/src/main/java/io/github/thebusybiscuit/slimefun4/api/items/SlimefunItemStack.java
@@ -307,7 +307,7 @@ public void lock() {
@Override
public ItemStack clone() {
- return new SlimefunItemStack(id, this);
+ return new SlimefunItemStack(id, super.clone());
}
@Override
diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/magical/runes/EnchantmentRune.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/magical/runes/EnchantmentRune.java
index 33e54e7544..420d78a778 100644
--- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/magical/runes/EnchantmentRune.java
+++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/magical/runes/EnchantmentRune.java
@@ -50,7 +50,8 @@ public EnchantmentRune(ItemGroup itemGroup, SlimefunItemStack item, RecipeType r
super(itemGroup, item, recipeType, recipe);
for (Material mat : Material.values()) {
- if (Slimefun.instance().isUnitTest() && mat.isLegacy()) continue;
+ // TODO: FIgure out behaviour here - we fail on WATER because it isn't an item
+ if (Slimefun.instance().isUnitTest() && (mat.isLegacy() || !mat.isItem())) continue;
List enchantments = new ArrayList<>();
diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/tools/ExplosiveTool.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/tools/ExplosiveTool.java
index 6fe1174e4f..f755034e45 100644
--- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/tools/ExplosiveTool.java
+++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/tools/ExplosiveTool.java
@@ -9,6 +9,7 @@
import dev.lone.itemsadder.api.CustomBlock;
import org.bukkit.Bukkit;
import org.bukkit.Effect;
+import org.bukkit.ExplosionResult;
import org.bukkit.Material;
import org.bukkit.block.Block;
import org.bukkit.entity.Player;
@@ -78,7 +79,7 @@ private void breakBlocks(BlockBreakEvent e, Player p, ItemStack item, Block b, L
List blocksToDestroy = new ArrayList<>();
if (callExplosionEvent.getValue()) {
- BlockExplodeEvent blockExplodeEvent = new BlockExplodeEvent(b, blocks, 0);
+ BlockExplodeEvent blockExplodeEvent = createNewBlockExplodeEvent(b, blocks, 0);
Bukkit.getServer().getPluginManager().callEvent(blockExplodeEvent);
if (!blockExplodeEvent.isCancelled()) {
@@ -186,4 +187,12 @@ private void breakBlock(BlockBreakEvent e, Player p, ItemStack item, Block b, Li
damageItem(p, item);
}
+ private BlockExplodeEvent createNewBlockExplodeEvent(
+ Block block,
+ List blocks,
+ float yield
+ ) {
+ // TODO: Support older vers
+ return new BlockExplodeEvent(block, block.getState(), blocks, yield, ExplosionResult.DESTROY);
+ }
}
diff --git a/src/test/java/io/github/thebusybiscuit/slimefun4/implementation/items/TestSlimefunItem.java b/src/test/java/io/github/thebusybiscuit/slimefun4/implementation/items/TestSlimefunItem.java
index 1bd21a0d3f..c2f07b5b99 100644
--- a/src/test/java/io/github/thebusybiscuit/slimefun4/implementation/items/TestSlimefunItem.java
+++ b/src/test/java/io/github/thebusybiscuit/slimefun4/implementation/items/TestSlimefunItem.java
@@ -9,8 +9,6 @@
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
-import org.junit.jupiter.params.ParameterizedTest;
-import org.junit.jupiter.params.provider.ValueSource;
import io.github.bakedlibs.dough.items.CustomItemStack;
import io.github.thebusybiscuit.slimefun4.api.exceptions.UnregisteredItemException;
@@ -110,7 +108,7 @@ void testRecipeType() {
void testIsItem() {
ItemStack item = new CustomItemStack(Material.BEACON, "&cItem Test");
String id = "IS_ITEM_TEST";
- SlimefunItem sfItem = TestUtilities.mockSlimefunItem(plugin, id, item);
+ SlimefunItem sfItem = TestUtilities.mockSlimefunItem(plugin, id, new CustomItemStack(Material.BEACON, "&cItem Test"));
sfItem.register(plugin);
Assertions.assertTrue(sfItem.isItem(sfItem.getItem()));