Skip to content

Commit 219e639

Browse files
committed
fixed spears and swords not being unders weapons
1 parent a034d8b commit 219e639

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/main/java/meteordevelopment/meteorclient/gui/screens/settings/ItemListSettingScreen.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
import meteordevelopment.meteorclient.utils.render.DisplayItemUtils;
2121
import net.minecraft.core.component.DataComponents;
2222
import net.minecraft.core.registries.BuiltInRegistries;
23+
import net.minecraft.tags.ItemTags;
2324
import net.minecraft.util.Tuple;
2425
import net.minecraft.world.item.*;
2526

@@ -348,6 +349,7 @@ private static ItemCategory getCategory(Item item) {
348349
if (item instanceof SpawnEggItem) return ItemCategory.SPAWN_EGGS;
349350

350351
try {
352+
if (item.getDefaultInstance().is(ItemTags.SWORDS) || item.getDefaultInstance().is(ItemTags.SPEARS)) return ItemCategory.WEAPONS;
351353
if (item.components().has(DataComponents.EQUIPPABLE)) return ItemCategory.ARMOR;
352354
if (item.components().has(DataComponents.TOOL)) return ItemCategory.TOOLS;
353355
if (Utils.isFood(item)) return ItemCategory.FOOD;

0 commit comments

Comments
 (0)