Unified build script (#175)

* Update build script
* Update build script to import fix for shadow in dev and sources artifacts
* Update fixed build script to shadow csv dependency in dev jar as well
* Moved jitpack
* Move new files
This commit is contained in:
Johann Bernhardt authored and GitHub committed 2021-11-22 08:56:35 -08:00
1 parent 43b71b1de6
commit a7ca6c8527
188 files changed
+646 -968

No files matched your search

@@ -0,0 +1,56 @@
package codechicken.nei;
import codechicken.nei.api.ItemFilter;
import net.minecraft.block.Block;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
public class ItemStackSet extends ItemStackMap<ItemStack> implements ItemFilter
{
public ItemStackSet with(ItemStack... items) {
for(ItemStack item : items)
add(item);
return this;
}
public ItemStackSet with(Item... items) {
for(Item item : items)
add(ItemStackMap.wildcard(item));
return this;
}
public ItemStackSet with(Block... blocks) {
for(Block block : blocks)
add(ItemStackMap.wildcard(Item.getItemFromBlock(block)));
return this;
}
public void add(ItemStack item) {
put(item, item);
}
public boolean contains(ItemStack item) {
return get(item) != null;
}
public boolean containsAll(Item item) {
return get(ItemStackMap.wildcard(item)) != null;
}
@Override
public boolean matches(ItemStack item) {
return contains(item);
}
public static ItemStackSet of(Block... blocks) {
return new ItemStackSet().with(blocks);
}
public static ItemStackSet of(Item... items) {
return new ItemStackSet().with(items);
}
public static ItemStackSet of(ItemStack... items) {
return new ItemStackSet().with(items);
}
}