mirror of
https://github.com/StarWishsama/Slimefun4.git
synced 2024-09-20 03:35:51 +00:00
Maybe fixed the unit tests?
This commit is contained in:
parent
4df4f6d4c9
commit
2ff105dabe
@ -139,7 +139,7 @@ public class ClimbingPick extends SimpleSlimefunItem<ItemUseHandler> implements
|
||||
double speed = getClimbingSpeed(type);
|
||||
int efficiencyLevel = item.getEnchantmentLevel(Enchantment.DIG_SPEED);
|
||||
|
||||
if (efficiencyLevel > 0) {
|
||||
if (speed > 0 && efficiencyLevel > 0) {
|
||||
speed += efficiencyLevel * EFFICIENCY_MODIFIER;
|
||||
}
|
||||
|
||||
|
@ -55,6 +55,14 @@ class TestClimbingPick implements SlimefunItemTest<ClimbingPick> {
|
||||
|
||||
@Override
|
||||
public ClimbingPick registerSlimefunItem(SlimefunPlugin plugin, String id) {
|
||||
try {
|
||||
SlimefunTag.CLIMBING_PICK_WEAK_SURFACES.reload();
|
||||
SlimefunTag.CLIMBING_PICK_STRONG_SURFACES.reload();
|
||||
}
|
||||
catch (TagMisconfigurationException e) {
|
||||
Assertions.fail(e);
|
||||
}
|
||||
|
||||
SlimefunItemStack item = new SlimefunItemStack(id, Material.IRON_PICKAXE, "&5Test Pick");
|
||||
|
||||
ClimbingPick pick = new ClimbingPick(TestUtilities.getCategory(plugin, "climbing_pick"), item, RecipeType.NULL, new ItemStack[9]) {
|
||||
|
Loading…
Reference in New Issue
Block a user