private static void transferWithModSpecificFilter(ArrayList<ItemStack> filterItems, EntityItemPickupEvent event, ContainerBackpack container){
boolean shouldSave = false;
for (ItemStack filterItem : filterItems) {
if (filterItem != null) {
if ((event.getItem().getEntityItem().getItem()).getRegistryName().getResourceDomain().equals(((filterItem.getItem()).getRegistryName().getResourceDomain()))){
<BUG>container.transferStackInSlot(event.getItem().getEntityItem());
shouldSave = true;
}</BUG>
}
}

private static void transferWithModSpecificFilter(ArrayList<ItemStack> filterItems, EntityItemPickupEvent event, ContainerBackpack container){
boolean shouldSave = false;
for (ItemStack filterItem : filterItems) {
if (filterItem != null) {
if ((event.getItem().getEntityItem().getItem()).getRegistryName().getResourceDomain().equals(((filterItem.getItem()).getRegistryName().getResourceDomain()))){
ItemStack returned = container.transferStackInSlot(event.getItem().getEntityItem()); //custom method to put itemEntity's itemStack into the backpack
if (returned != null) shouldSave = true;
}
}
}
