mirror of
https://github.com/GeyserMC/Geyser.git
synced 2024-12-29 15:49:09 +01:00
Test fix
This commit is contained in:
parent
c4f0b0225d
commit
a315d04b35
1 changed files with 7 additions and 2 deletions
|
@ -36,6 +36,9 @@ import org.geysermc.geyser.api.item.custom.CustomItemOptions;
|
|||
import org.geysermc.geyser.api.util.TriState;
|
||||
import org.geysermc.geyser.item.GeyserCustomItemOptions;
|
||||
import org.geysermc.geyser.item.Items;
|
||||
import org.geysermc.geyser.item.components.ToolTier;
|
||||
import org.geysermc.geyser.item.type.Item;
|
||||
import org.geysermc.geyser.item.type.TieredItem;
|
||||
import org.geysermc.geyser.registry.type.ItemMapping;
|
||||
import org.junit.jupiter.api.Assertions;
|
||||
import org.junit.jupiter.api.BeforeAll;
|
||||
|
@ -47,6 +50,8 @@ import java.util.List;
|
|||
import java.util.Map;
|
||||
import java.util.OptionalInt;
|
||||
|
||||
import static org.geysermc.geyser.item.type.Item.builder;
|
||||
|
||||
@TestInstance(TestInstance.Lifecycle.PER_CLASS)
|
||||
public class CustomItemsTest {
|
||||
private ItemMapping testMappingWithDamage;
|
||||
|
@ -118,7 +123,7 @@ public class CustomItemsTest {
|
|||
|
||||
testMappingWithDamage = ItemMapping.builder()
|
||||
.customItemOptions(customItemOptions)
|
||||
.javaItem(Items.WOODEN_PICKAXE)
|
||||
.javaItem(new TieredItem("wooden_pickaxe", ToolTier.WOODEN, builder().stackSize(1).maxDamage(59)))
|
||||
.build();
|
||||
|
||||
// Test differences with items with no max damage
|
||||
|
@ -132,7 +137,7 @@ public class CustomItemsTest {
|
|||
|
||||
testMappingWithNoDamage = ItemMapping.builder()
|
||||
.customItemOptions(customItemOptions)
|
||||
.javaItem(Items.BEDROCK)
|
||||
.javaItem(new Item("bedrock", builder())) // Must be defined manually since registries aren't initialized
|
||||
.build();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue