How i get mods items


Hi, how do I get mod mekanism items?
I tried mekanism:MachineBlock but all machines use this id, how i get other machines?

My code:

  public static Map<String, String> getMap(){
        Map<String, String> map = new HashMap<>();
        map.put("mekanism:MachineBlock", "10");
        return map;

public static void addItems(Map<String, String> map, Inventory inventory){
    List<ItemStack> itemList = new ArrayList<>();
    for(String key : map.keySet()){
        ItemStack i = ItemStack.of(Sponge.getRegistry().getType(ItemType.class, key).get(), Integer.valueOf(map.get(key)));
    for(ItemStack item : itemList){


This could be wrong, because I don’t know much about Mekanism. But I’m pretty sure this will work.

BlockState state = Sponge.getRegistry().getType(BlockState.class, "mekanism:MachineBlock2[type=QuantumEntangloporter]").get();
ItemStack stack = ItemStack.builder().fromBlockState(state).quantity(10).build();


It doesn’t work.


Didn’t work how? What did you expect to happen, what happened instead, where exactly did the two diverge?