Rename to gtnewhorizons

This commit is contained in:
GTNH-Colen committed 2024-01-15 15:10:18 +00:00
1 parent 99c887e67e
commit 1f6f4605b1
16 files changed
+34 -36

No files matched your search

@@ -0,0 +1,24 @@
package com.gtnewhorizons.postea.api;
import java.util.HashMap;
import java.util.Map;
import java.util.function.Function;
import net.minecraft.nbt.NBTTagCompound;
public class ItemStackReplacementManager {
private static final Map<String, Function<NBTTagCompound, NBTTagCompound>> replacementMap = new HashMap<>();
// Public API for converting ItemStacks.
@SuppressWarnings("unused")
public static void addItemReplacement(String itemName, Function<NBTTagCompound, NBTTagCompound> transformer) {
replacementMap.put(itemName, transformer);
}
@SuppressWarnings("unused")
public static Function<NBTTagCompound, NBTTagCompound> getItemReplacement(String itemNameInternal) {
return replacementMap.get(itemNameInternal);
}
}