mirror of
https://github.com/GTNewHorizons/Postea.git
synced 2026-11-24 05:54:31 +00:00
Rename to gtnewhorizons
This commit is contained in:
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);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user