File tree Expand file tree Collapse file tree
src/main/java/aekeylegacy Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ show_testing_output = false
1515
1616# Mod Information
1717# HIGHLY RECOMMEND complying with SemVer for mod_version: https://semver.org/
18- mod_version = 1.0.2
18+ mod_version = 1.0.3
1919root_package = aekeylegacy
2020mod_id = aekeylegacy
2121mod_name = AEKey Legacy
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1919import net .minecraft .world .World ;
2020import net .minecraftforge .common .capabilities .CapabilityDispatcher ;
2121import net .minecraftforge .fml .common .registry .ForgeRegistries ;
22+ import net .minecraftforge .oredict .OreDictionary ;
2223
2324import org .apache .logging .log4j .Logger ;
2425import org .apache .logging .log4j .LogManager ;
2526
2627import aekeylegacy .AELog ;
27- import aekeylegacy .OreDictUtil ;
2828import aekeylegacy .api .storage .AEKeyFilter ;
2929
3030public final class AEItemKey extends AEKey {
@@ -311,7 +311,20 @@ public boolean getHasSubtypes() {
311311
312312 @ Override
313313 public boolean isTagged (String tag ) {
314- return OreDictUtil .hasTag (item , metadata , tag );
314+ if (!OreDictionary .doesOreNameExist (tag )) {
315+ return false ;
316+ }
317+
318+ int tagId = OreDictionary .getOreID (tag );
319+ var stack = new ItemStack (item , 1 , metadata );
320+ int [] oreIds = OreDictionary .getOreIDs (stack );
321+
322+ for (int id : oreIds ) {
323+ if (id == tagId ) {
324+ return true ;
325+ }
326+ }
327+ return false ;
315328 }
316329
317330 /**
Original file line number Diff line number Diff line change 2424import net .minecraft .nbt .NBTTagCompound ;
2525import net .minecraft .network .PacketBuffer ;
2626import net .minecraft .util .ResourceLocation ;
27-
28- import aekeylegacy .OreDictUtil ;
27+ import net .minecraftforge .oredict .OreDictionary ;
2928
3029final class AEItemKeys extends AEKeyType {
3130 private static final ResourceLocation ID = new ResourceLocation ("ae2" , "i" );
@@ -55,6 +54,6 @@ public boolean supportsFuzzyRangeSearch() {
5554
5655 @ Override
5756 public Stream <String > getTagNames () {
58- return OreDictUtil . getOreNames ();
57+ return Stream . of ( OreDictionary . getOreNames () );
5958 }
6059}
You can’t perform that action at this time.
0 commit comments