Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package puppy.hanii.minecraft.forge.haniitags.registry;
- import java.util.Collection;
- import java.util.Map;
- import net.minecraft.item.ItemStack;
- import puppy.hanii.library.minecraft.misc.IdDataValue;
- public class HaniiTagRegistry
- {
- public HaniiTagRegistry()
- {}
- Map<IdDataValue, HaniiTag> idBasedTags;
- Map<String, HaniiTag> oreDictBasedTags;
- Map<NBTTagChecker<?>, HaniiTag> nbtBasedTags;
- Collection<HaniiTagEvaluator> evaluators;
- String idBasedTagsFilePath;
- String oreDictBasedTagsFilePath;
- String nbtBasedTagsFilePath;
- protected void addDefaultTags()
- {}
- public void loadTags()
- {}
- public void saveTags()
- {}
- public boolean registerIDBasedTag(IdDataValue id, HaniiTag haniiTag)
- {}
- public boolean registerIDBasedTag(String id, HaniiTag haniiTag)
- {}
- public boolean registerIDBasedTag(String id, int dataValue, HaniiTag haniiTag)
- {}
- public boolean registerOreDictBasedTag(String oreDictEntry, HaniiTag haniiTag)
- {}
- public <T> boolean registerNBTBasedTag(NBTTagChecker<T> checker, HaniiTag haniiTag)
- {}
- public boolean registerNBTBasedTag(String nbtTagName, HaniiTag haniiTag)
- {}
- public <T> boolean registerNBTBasedTag(String nbtTagName, T nbtTagValue, HaniiTag haniiTag)
- {}
- public boolean registerEvaluator(HaniiTagEvaluator evaluator)
- {}
- public HaniiTag[] getTags(ItemStack itemStack)
- {}
- }
- ------------------------------------------------------------------------------------------------------
- package puppy.hanii.minecraft.forge.haniitags.registry;
- import java.util.Collection;
- import java.util.Map;
- public class HaniiTag
- {
- public HaniiTag(String name)
- {}
- public HaniiTag(String name, String[] stringValues)
- {}
- public HaniiTag(String name, Double[] stringValues)
- {}
- public HaniiTag(String name, String[] stringValues, Double[] numericValues)
- {}
- public HaniiTag(String name, Double[] numericValues, String[] stringValues)
- {}
- public HaniiTag(HaniiTag haniiTag)
- {}
- public static HaniiTag fromString(String stringEncodedHaniiTag)
- {}
- final String name;
- Map<String, String> stringValues;
- Map<String, Double> numericValues;
- // Collection of values automatically added and thus non-overridable
- Collection<String> autogennedValueNames;
- public String getName()
- {}
- public Map<String, String> getStringValues()
- {}
- public Map<String, Double> getNumericValues()
- {}
- public String getStringValue(String name)
- {}
- public double getNumericValue(String name)
- {}
- public String setStringValue(String name)
- {}
- public double setNumericValue(String name)
- {}
- @Override
- public String toString()
- {}
- @Override
- public boolean equals(Object obj)
- {}
- @Override
- public int hashCode()
- {}
- }
- ------------------------------------------------------------------------------------------------------
- package puppy.hanii.minecraft.forge.haniitags.registry;
- import net.minecraft.item.ItemStack;
- public class NBTTagChecker<T>
- {
- // Makes it check for the existence of an NBT tag by a certain name.
- public NBTTagChecker(String tagName)
- {}
- // Makes it check for the existence of an NBT tag by a certain name and that the value matches the passed value.
- public NBTTagChecker(String tagName, T tagValue)
- {}
- public NBTTagChecker(String itemIdToRestrictTo, String tagName, T tagValue)
- {}
- String itemIdToRestrictTo;
- final String NBTTagName;
- final T tagCheckingFor;
- public String restrictTo(String itemID)
- {}
- public String isRestrictedTo()
- {}
- public boolean matches(ItemStack itemStack)
- {}
- @Override
- public boolean equals(Object obj)
- {}
- @Override
- public int hashCode()
- {}
- }
- ------------------------------------------------------------------------------------------------------
- package puppy.hanii.minecraft.forge.haniitags.registry;
- import net.minecraft.item.ItemStack;
- public abstract class HaniiTagEvaluator
- {
- public HaniiTagEvaluator()
- {}
- public HaniiTagEvaluator(String itemIdToRestrictTo)
- {}
- String itemIdToRestrictTo;
- public String restrictTo(String itemId)
- {}
- public String isRestrictedTo()
- {}
- public abstract HaniiTag[] getTagsFor(ItemStack itemStack);
- @Override
- public boolean equals(Object obj)
- {}
- @Override
- public int hashCode()
- {}
- }
- ------------------------------------------------------------------------------------------------------
- Library class used, though not specifically for the system:
- package puppy.hanii.library.minecraft.misc;
- public class IdDataValue
- {
- public IdDataValue(String ID)
- {
- itemID = ID;
- dataValue = 0;
- }
- public IdDataValue(String ID, int dataValue)
- {
- itemID = ID;
- this.dataValue = dataValue;
- }
- final String itemID;
- final int dataValue;
- public String getID()
- { return itemID; }
- public int getDataValue()
- { return dataValue; }
- @Override
- public boolean equals(Object obj)
- {
- if(obj == null)
- return false;
- if(getClass() != obj.getClass())
- return false;
- final IdDataValue other = (IdDataValue) obj;
- if((this.itemID == null) ? (other.itemID != null) : !this.itemID.equals(other.itemID))
- return false;
- if(this.dataValue != other.dataValue)
- return false;
- return true;
- }
- @Override
- public int hashCode()
- {
- int hash = 5;
- hash = 97 * hash + (this.itemID != null ? this.itemID.hashCode() : 0);
- hash = 97 * hash + this.dataValue;
- return hash;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment