use of net.modificationstation.stationapi.api.tags.TagEntry in project StationAPI by ModificationStation.
the class MainTest method onInitialize.
@EventListener
public void onInitialize(TagRegisterEvent event) {
SLTest.LOGGER.info("==================================================================================================");
Identifier oreDictToTest = Identifier.of("items/tools/pickaxes/");
SLTest.LOGGER.info(oreDictToTest);
Optional<Map<Identifier, List<TagEntry>>> predicates = TagRegistry.INSTANCE.getWithIdentifiers(oreDictToTest);
if (predicates.isPresent()) {
for (Identifier oreDictEntryObject : predicates.get().keySet()) {
SLTest.LOGGER.info(oreDictEntryObject);
}
} else {
throw new RuntimeException("Predicates are empty for " + oreDictToTest);
}
SLTest.LOGGER.info("==================================================================================================");
// block.mineableByTool("pickaxe*", 0);
}
use of net.modificationstation.stationapi.api.tags.TagEntry in project StationAPI by ModificationStation.
the class TagBlockInit method addBlock0Damage.
private static void addBlock0Damage(String oreDictString, BlockBase itemBase) {
ItemInstance itemInstanceToUse = new ItemInstance(itemBase, 1, 0);
TagRegistry.INSTANCE.register(new TagEntry(itemInstanceToUse, itemInstanceToUse::isDamageAndIDIdentical, Identifier.of(oreDictString)));
}
use of net.modificationstation.stationapi.api.tags.TagEntry in project StationAPI by ModificationStation.
the class TagItemInit method addItem.
private static void addItem(String oreDictString, ItemBase itemBase, int damage) {
ItemInstance itemInstanceToUse = new ItemInstance(itemBase, 1, damage);
TagRegistry.INSTANCE.register(new TagEntry(new ItemInstance(itemBase, 1, damage), itemInstanceToUse::isDamageAndIDIdentical, Identifier.of(oreDictString)));
}
use of net.modificationstation.stationapi.api.tags.TagEntry in project StationAPI by ModificationStation.
the class TagItemInit method addItemIgnoreDamage.
private static void addItemIgnoreDamage(String oreDictString, ItemBase itemBase) {
ItemInstance itemInstanceToUse = new ItemInstance(itemBase);
TagRegistry.INSTANCE.register(new TagEntry(new ItemInstance(itemBase), itemInstance -> itemInstanceToUse.itemId == itemInstance.itemId, Identifier.of(oreDictString)));
}
use of net.modificationstation.stationapi.api.tags.TagEntry in project StationAPI by ModificationStation.
the class TagBlockInit method addBlockIgnoreDamage.
private static void addBlockIgnoreDamage(String oreDictString, BlockBase itemBase) {
ItemInstance itemInstanceToUse = new ItemInstance(itemBase);
TagRegistry.INSTANCE.register(new TagEntry(new ItemInstance(itemBase), itemInstance -> itemInstanceToUse.itemId == itemInstance.itemId, Identifier.of(oreDictString)));
}
Aggregations