This commit is contained in:
modmuss50 2018-07-20 22:31:20 +01:00
parent 389b716880
commit f5c6b59ebd
No known key found for this signature in database
GPG key ID: 773D17BE8BF49C82
79 changed files with 163 additions and 204 deletions

View file

@ -69,12 +69,12 @@ public class RollingMachineRecipe {
public static ResourceLocation getNameForRecipe(ItemStack output) {
ModContainer activeContainer = Loader.instance().activeModContainer();
ResourceLocation baseLoc = new ResourceLocation(activeContainer.getModId(), output.getItem().getRegistryName().getResourcePath());
ResourceLocation baseLoc = new ResourceLocation(activeContainer.getModId(), output.getItem().getRegistryName().getPath());
ResourceLocation recipeLoc = baseLoc;
int index = 0;
while (recipes.containsKey(recipeLoc)) {
index++;
recipeLoc = new ResourceLocation(activeContainer.getModId(), baseLoc.getResourcePath() + "_" + index);
recipeLoc = new ResourceLocation(activeContainer.getModId(), baseLoc.getPath() + "_" + index);
}
return recipeLoc;
}