Skip to content

api bug? #387

@Smartin-b

Description

@Smartin-b

im calling this

    @Override
    public Map<CommonSlotReference, ItemStack> getItems(LivingEntity wearer) {
        Map<CommonSlotReference, ItemStack> map = new HashMap<>();
        EntitySlotLoader.getEntitySlots(wearer).forEach((id, slot) -> {
            SlotReference slotReference = SlotReference.of(wearer, slot.name(), slot.amount());
            ItemStack stack = slotReference.getStack();
            if (stack != null && !stack.isEmpty()) {
                map.put(convert(slotReference), slotReference.getStack());
            }
        });
        return map;
    }

as part of an abstraction including accessories.
the problem on neoforge this resulted in

[21März2026 07:59:22.979] [Render thread/INFO] [MoBends-Mixin/]: [MoBends DEBUG] Mixin interceptRender: isHumanoidModel=true, shouldRenderCustom=true
[21März2026 07:59:23.006] [Server thread/ERROR] [net.minecraft.server.MinecraftServer/]: Encountered an unexpected exception
java.lang.NoClassDefFoundError: net/fabricmc/loader/api/FabricLoader
	at TRANSFORMER/accessories@1.1.0-beta.53+1.21.1/io.wispforest.accessories.impl.ExpandedSimpleContainer.validIndex(ExpandedSimpleContainer.java:185) ~[accessories-neoforge-1.1.0-beta.53+1.21.1.jar%23207!/:?]
	at TRANSFORMER/accessories@1.1.0-beta.53+1.21.1/io.wispforest.accessories.impl.ExpandedSimpleContainer.getItem(ExpandedSimpleContainer.java:111) ~[accessories-neoforge-1.1.0-beta.53+1.21.1.jar%23207!/:?]
	at TRANSFORMER/accessories@1.1.0-beta.53+1.21.1/io.wispforest.accessories.api.slot.SlotReference.getStack(SlotReference.java:87) ~[accessories-neoforge-1.1.0-beta.53+1.21.1.jar%23207!/:?]
	at TRANSFORMER/nucleus_trinket@1.0.5/com.redpxnda.nucleus.trinket.accessories.AccessoriesApiMirror.lambda$getTrinketList$2(AccessoriesApiMirror.java:54) ~[nucleus-trinket-forge-1.21+1.0.5.jar%23248!/:?]
	at java.base/java.util.LinkedHashMap.forEach(Unknown Source) ~[?:?]
	at TRANSFORMER/nucleus_trinket@1.0.5/com.redpxnda.nucleus.trinket.accessories.AccessoriesApiMirror.getTrinketList(AccessoriesApiMirror.java:52) ~[nucleus-trinket-forge-1.21+1.0.5.jar%23248!/:?]
	at TRANSFORMER/nucleus_trinket@1.0.5/com.redpxnda.nucleus.trinket.NucleusTrinket.lambda$getTrinketList$4(NucleusTrinket.java:73) ~[nucleus-trinket-forge-1.21+1.0.5.jar%23248!/:?]
	at java.base/java.util.ArrayList.forEach(Unknown Source) ~[?:?]

2026-03-21-6.log

should i use other api methods to get all worn accessories with slot references of an entity?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions