Update MCP mappings to 20170617

This commit is contained in:
mezz committed 2017-06-17 18:06:04 -07:00
1 parent 3d322ef925
commit c2845967cc
27 files changed
+95 -88

No files matched your search

@@ -114,7 +114,7 @@ public class OreDictionary
registerOre("ingotBrick", Items.BRICK);
registerOre("ingotBrickNether", Items.NETHERBRICK);
registerOre("nuggetGold", Items.GOLD_NUGGET);
registerOre("nuggetIron", Items.field_191525_da);
registerOre("nuggetIron", Items.IRON_NUGGET);
// gems and dusts
registerOre("gemDiamond", Items.DIAMOND);
@@ -351,7 +351,7 @@ public class OreDictionary
int replaced = 0;
// Search vanilla recipes for recipes to replace
for(IRecipe obj : CraftingManager.field_193380_a)
for(IRecipe obj : CraftingManager.REGISTRY)
{
if(obj.getClass() == ShapedRecipes.class || obj.getClass() == ShapelessRecipes.class)
{
@@ -361,11 +361,11 @@ public class OreDictionary
continue;
}
NonNullList<Ingredient> lst = obj.func_192400_c();
NonNullList<Ingredient> lst = obj.getIngredients();
for (int x = 0; x < lst.size(); x++)
{
Ingredient ing = lst.get(x);
ItemStack[] ingredients = ing.func_193365_a();
ItemStack[] ingredients = ing.getMatchingStacks();
String oreName = null;
boolean skip = false;
@@ -18,6 +18,7 @@
*/
package net.minecraftforge.oredict;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import it.unimi.dsi.fastutil.ints.IntArrayList;
@@ -42,13 +43,17 @@ public class OreIngredient extends Ingredient
}
@Override
public ItemStack[] func_193365_a()
@Nonnull
public ItemStack[] getMatchingStacks()
{
return ores.toArray(new ItemStack[ores.size()]);
}
@Override
@Nonnull
@SideOnly(Side.CLIENT)
public IntList func_194139_b()
public IntList getValidItemStacksPacked()
{
if (this.itemIds == null || this.itemIds.size() != ores.size())
{
@@ -56,7 +61,7 @@ public class OreIngredient extends Ingredient
for (ItemStack itemstack : this.ores)
{
this.itemIds.add(RecipeItemHelper.func_194113_b(itemstack));
this.itemIds.add(RecipeItemHelper.pack(itemstack));
}
this.itemIds.sort(IntComparators.NATURAL_COMPARATOR);
@@ -171,8 +171,8 @@ public class RecipeSorter implements Comparator<IRecipe>
}
else
{
if (r2.func_192400_c().size() < r1.func_192400_c().size()) return -1;
if (r2.func_192400_c().size() > r1.func_192400_c().size()) return 1;
if (r2.getIngredients().size() < r1.getIngredients().size()) return -1;
if (r2.getIngredients().size() > r1.getIngredients().size()) return 1;
return getPriority(r2) - getPriority(r1); // high priority value first!
}
}
+7 -5
View File
@@ -143,8 +143,9 @@ public class ShapedOreRecipe extends IForgeRegistryEntry.Impl<IRecipe> implement
return this;
}
@Override
@Nonnull
public NonNullList<Ingredient> func_192400_c()
public NonNullList<Ingredient> getIngredients()
{
return this.input;
}
@@ -168,12 +169,13 @@ public class ShapedOreRecipe extends IForgeRegistryEntry.Impl<IRecipe> implement
@Override
@Nonnull
public String func_193358_e()
public String getGroup()
{
return this.group.toString();
}
public boolean func_194133_a(int p_194133_1_, int p_194133_2_)
@Override
public boolean canFit(int p_194133_1_, int p_194133_2_)
{
return p_194133_1_ >= this.width && p_194133_2_ >= this.height;
}
@@ -195,7 +197,7 @@ public class ShapedOreRecipe extends IForgeRegistryEntry.Impl<IRecipe> implement
ingMap.put(entry.getKey().toCharArray()[0], CraftingHelper.getIngredient(entry.getValue(), context));
}
ingMap.put(' ', Ingredient.field_193370_a);
ingMap.put(' ', Ingredient.EMPTY);
JsonArray patternJ = JsonUtils.getJsonArray(json, "pattern");
@@ -215,7 +217,7 @@ public class ShapedOreRecipe extends IForgeRegistryEntry.Impl<IRecipe> implement
primer.width = pattern[0].length();
primer.height = pattern.length;
primer.mirrored = JsonUtils.getBoolean(json, "mirrored", true);
primer.input = NonNullList.withSize(primer.width * primer.height, Ingredient.field_193370_a);
primer.input = NonNullList.withSize(primer.width * primer.height, Ingredient.EMPTY);
Set<Character> keys = Sets.newHashSet(ingMap.keySet());
keys.remove(' ');
+5 -4
View File
@@ -126,7 +126,7 @@ public class ShapelessOreRecipe extends IForgeRegistryEntry.Impl<IRecipe> implem
@Override
@Nonnull
public NonNullList<Ingredient> func_192400_c()
public NonNullList<Ingredient> getIngredients()
{
return this.input;
}
@@ -140,12 +140,13 @@ public class ShapelessOreRecipe extends IForgeRegistryEntry.Impl<IRecipe> implem
@Override
@Nonnull
public String func_193358_e()
public String getGroup()
{
return this.group == null ? "" : this.group.toString();
}
public boolean func_194133_a(int p_194133_1_, int p_194133_2_)
@Override
public boolean canFit(int p_194133_1_, int p_194133_2_)
{
return p_194133_1_ * p_194133_2_ >= this.input.size();
}
@@ -161,7 +162,7 @@ public class ShapelessOreRecipe extends IForgeRegistryEntry.Impl<IRecipe> implem
if (ings.isEmpty())
throw new JsonParseException("No ingredients for shapeless recipe");
ItemStack itemstack = ShapedRecipes.func_192405_a(JsonUtils.getJsonObject(json, "result"), true);
ItemStack itemstack = ShapedRecipes.deserializeItem(JsonUtils.getJsonObject(json, "result"), true);
return new ShapelessOreRecipe(group.isEmpty() ? null : new ResourceLocation(group), ings, itemstack);
}
}