mirror of
https://github.com/GTNewHorizons/Postea.git
synced 2026-10-26 14:24:19 +00:00
add stack handlers for item -> item+meta
This commit is contained in:
1 parent
1f5a792ceb
commit
bd30015bbd
1 file changed
+26
@@ -127,6 +127,32 @@ public class ItemStackReplacementManager {
|
||||
addItemReplacement(originalId, OreDictionary.WILDCARD_VALUE, item, newMeta, skipBlockRemap);
|
||||
}
|
||||
|
||||
// item -> stack
|
||||
|
||||
/**
|
||||
* Adds a mapping to remap stacks of a given item to another item with a given damage/meta value. This also adds a
|
||||
* matching block replacement if this item happens to be an ItemBlock.
|
||||
*
|
||||
* @param originalId The id of the item to remap.
|
||||
* @param stack The item to remap to.
|
||||
*/
|
||||
@SuppressWarnings("unused")
|
||||
public static void addItemReplacement(@Nonnull String originalId, @Nonnull ItemStack stack) {
|
||||
addItemReplacement(originalId, OreDictionary.WILDCARD_VALUE, stack.getItem(), Items.feather.getDamage(stack), false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a mapping to remap stacks of a given item to another item with a given damage/meta value.
|
||||
*
|
||||
* @param originalId The id of the item to remap.
|
||||
* @param stack A stack of the item to replace to.
|
||||
* @param skipBlockRemap Set to true to skip auto-adding a block remapper if the item happens to be an ItemBlock.
|
||||
*/
|
||||
@SuppressWarnings("unused")
|
||||
public static void addItemReplacement(@Nonnull String originalId, @Nonnull ItemStack stack, boolean skipBlockRemap) {
|
||||
addItemReplacement(originalId, OreDictionary.WILDCARD_VALUE, stack.getItem(), Items.feather.getDamage(stack), skipBlockRemap);
|
||||
}
|
||||
|
||||
// item+meta -> stack
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user