Update MCP mappings to 20170617

This commit is contained in:
mezz 2017-06-17 18:06:04 -07:00
parent 3d322ef925
commit c2845967cc
27 changed files with 95 additions and 88 deletions

View File

@ -29,7 +29,7 @@ apply plugin: "net.minecraftforge.gradle.launch4j"
minecraft.version = "1.12"
minecraft {
mappings = 'snapshot_nodoc_20170611'
mappings = 'snapshot_nodoc_20170617'
workspaceDir = "projects"
versionJson = "jsons/${minecraft.version}-dev.json"
buildUserdev = true

View File

@ -293,7 +293,7 @@
+ * @param side The side to check
+ * @return True if the block is solid on the specified side.
+ */
+ @Deprecated //Use IBlockState.func_193401_d
+ @Deprecated //Use IBlockState.getBlockFaceShape
+ public boolean isSideSolid(IBlockState base_state, IBlockAccess world, BlockPos pos, EnumFacing side)
+ {
+ if (base_state.func_185896_q() && side == EnumFacing.UP) // Short circuit to vanilla function if its true

View File

@ -597,10 +597,10 @@ public class ForgeHooksClient
Class<? extends TileEntity> tileClass = tileItemMap.get(Pair.of(item, metadata));
if (tileClass != null)
{
TileEntitySpecialRenderer<?> r = TileEntityRendererDispatcher.instance.getSpecialRendererByClass(tileClass);
TileEntitySpecialRenderer<?> r = TileEntityRendererDispatcher.instance.getRenderer(tileClass);
if (r != null)
{
r.func_192841_a(null, 0, 0, 0, 0, -1, 0.0F);
r.render(null, 0, 0, 0, 0, -1, 0.0F);
}
}
}

View File

@ -36,7 +36,7 @@ import javax.annotation.Nonnull;
public abstract class FastTESR<T extends TileEntity> extends TileEntitySpecialRenderer<T>
{
@Override
public final void func_192841_a(@Nonnull T te, double x, double y, double z, float partialTicks, int destroyStage, float partial)
public final void render(@Nonnull T te, double x, double y, double z, float partialTicks, int destroyStage, float partial)
{
Tessellator tessellator = Tessellator.getInstance();
BufferBuilder buffer = tessellator.getBuffer();

View File

@ -1,8 +1,10 @@
package net.minecraftforge.common.crafting;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import com.google.common.collect.Lists;
@ -28,29 +30,31 @@ public class CompoundIngredient extends Ingredient
}
@Override
public ItemStack[] func_193365_a()
@Nonnull
public ItemStack[] getMatchingStacks()
{
if (stacks == null)
{
List<ItemStack> tmp = Lists.newArrayList();
for (Ingredient child : children)
for (ItemStack stack : child.func_193365_a())
tmp.add(stack);
Collections.addAll(tmp, child.getMatchingStacks());
stacks = tmp.toArray(new ItemStack[tmp.size()]);
}
return stacks;
}
@Override
@Nonnull
@SideOnly(Side.CLIENT)
public IntList func_194139_b()
public IntList getValidItemStacksPacked()
{
//TODO: Add a child.isInvalid()?
if (this.itemIds == null)
{
this.itemIds = new IntArrayList();
for (Ingredient child : children)
this.itemIds.addAll(child.func_194139_b());
this.itemIds.addAll(child.getValidItemStacksPacked());
this.itemIds.sort(IntComparators.NATURAL_COMPARATOR);
}

View File

@ -114,11 +114,11 @@ public class CraftingHelper {
if (obj instanceof Ingredient)
return (Ingredient)obj;
else if (obj instanceof ItemStack)
return Ingredient.func_193369_a(((ItemStack)obj).copy());
return Ingredient.fromStacks(((ItemStack)obj).copy());
else if (obj instanceof Item)
return Ingredient.func_193367_a((Item)obj);
return Ingredient.fromItem((Item)obj);
else if (obj instanceof Block)
return Ingredient.func_193369_a(new ItemStack((Block)obj, 1, OreDictionary.WILDCARD_VALUE));
return Ingredient.fromStacks(new ItemStack((Block)obj, 1, OreDictionary.WILDCARD_VALUE));
else if (obj instanceof String)
return new OreIngredient((String)obj);
else if (obj instanceof JsonElement)
@ -144,7 +144,7 @@ public class CraftingHelper {
if (ing.getClass() == Ingredient.class) {
//Vanilla, Due to how we read it splits each itemstack, so we pull out to re-merge later
for (ItemStack stack : ing.func_193365_a())
for (ItemStack stack : ing.getMatchingStacks())
vanilla.add(stack);
}
else
@ -156,7 +156,7 @@ public class CraftingHelper {
if (!vanilla.isEmpty())
{
ItemStack[] items = vanilla.toArray(new ItemStack[vanilla.size()]);
ingredients.add(Ingredient.func_193369_a(items));
ingredients.add(Ingredient.fromStacks(items));
}
if (ingredients.size() == 0)
@ -308,7 +308,7 @@ public class CraftingHelper {
}
HashMap<Character, Ingredient> itemMap = Maps.newHashMap();
itemMap.put(' ', Ingredient.field_193370_a);
itemMap.put(' ', Ingredient.EMPTY);
for (; idx < recipe.length; idx += 2)
{
@ -334,7 +334,7 @@ public class CraftingHelper {
}
}
ret.input = NonNullList.withSize(ret.width * ret.height, Ingredient.field_193370_a);
ret.input = NonNullList.withSize(ret.width * ret.height, Ingredient.EMPTY);
Set<Character> keys = Sets.newHashSet(itemMap.keySet());
keys.remove(' ');
@ -448,7 +448,7 @@ public class CraftingHelper {
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");
@ -468,7 +468,7 @@ public class CraftingHelper {
pattern[x] = line;
}
NonNullList<Ingredient> input = NonNullList.withSize(pattern[0].length() * pattern.length, Ingredient.field_193370_a);
NonNullList<Ingredient> input = NonNullList.withSize(pattern[0].length() * pattern.length, Ingredient.EMPTY);
Set<Character> keys = Sets.newHashSet(ingMap.keySet());
keys.remove(' ');
@ -503,15 +503,15 @@ public class CraftingHelper {
if (ings.size() > 9)
throw new JsonParseException("Too many 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 ShapelessRecipes(group, itemstack, ings);
});
registerR("forge:ore_shaped", ShapedOreRecipe::factory);
registerR("forge:ore_shapeless", ShapelessOreRecipe::factory);
registerI("minecraft:item", (context, json) -> Ingredient.func_193369_a(CraftingHelper.getItemStackBasic(json, context)));
registerI("minecraft:empty", (context, json) -> Ingredient.field_193370_a);
registerI("minecraft:item_nbt", (context, json) -> Ingredient.func_193369_a(CraftingHelper.getItemStack(json, context)));
registerI("minecraft:item", (context, json) -> Ingredient.fromStacks(CraftingHelper.getItemStackBasic(json, context)));
registerI("minecraft:empty", (context, json) -> Ingredient.EMPTY);
registerI("minecraft:item_nbt", (context, json) -> Ingredient.fromStacks(CraftingHelper.getItemStack(json, context)));
registerI("forge:ore_dict", (context, json) -> new OreIngredient(JsonUtils.getString(json, "ore")));
}

View File

@ -345,7 +345,7 @@ public abstract class BlockFluidBase extends Block implements IFluidBlock
}
@Override
public boolean blocksMovement(@Nonnull IBlockAccess world, @Nonnull BlockPos pos)
public boolean isPassable(@Nonnull IBlockAccess world, @Nonnull BlockPos pos)
{
return true;
}
@ -731,7 +731,7 @@ public abstract class BlockFluidBase extends Block implements IFluidBlock
private boolean isBlockSolid(IBlockAccess world, BlockPos pos, EnumFacing face)
{
return world.getBlockState(pos).func_193401_d(world, pos, face) == BlockFaceShape.SOLID;
return world.getBlockState(pos).getBlockFaceShape(world, pos, face) == BlockFaceShape.SOLID;
}
/* IFluidBlock */

View File

@ -106,7 +106,7 @@ public class UniversalBucket extends Item
@Override
public void getSubItems(@Nullable CreativeTabs tab, @Nonnull NonNullList<ItemStack> subItems)
{
if (!this.func_194125_a(tab))
if (!this.isInCreativeTab(tab))
return;
for (Fluid fluid : FluidRegistry.getRegisteredFluids().values())
{

View File

@ -123,10 +123,10 @@ public class FMLConfigGuiFactory implements IModGuiFactory
}
@Override
public void func_192634_a(int slotIndex, int x, int y, int listWidth, int slotHeight, int mouseX, int mouseY, boolean isSelected, float partial)
public void drawEntry(int slotIndex, int x, int y, int listWidth, int slotHeight, int mouseX, int mouseY, boolean isSelected, float partial)
{
textFieldValue.setTextColor((int) (Math.random() * 0xFFFFFF));
super.func_192634_a(slotIndex, x, y, listWidth, slotHeight, mouseX, mouseY, isSelected, partial);
super.drawEntry(slotIndex, x, y, listWidth, slotHeight, mouseX, mouseY, isSelected, partial);
}
}

View File

@ -86,7 +86,7 @@ public class GuiErrorBase extends GuiErrorScreen
{
for(GuiButton button : buttonList)
{
button.func_191745_a(this.mc, mouseX, mouseY, partialTicks);
button.drawButton(this.mc, mouseX, mouseY, partialTicks);
}
}
}

View File

@ -61,7 +61,7 @@ public class GuiOldSaveLoadConfirm extends GuiYesNo implements GuiYesNoCallback
for (k = 0; k < this.buttonList.size(); ++k)
{
this.buttonList.get(k).func_191745_a(this.mc, mouseX, mouseY, partialTicks);
this.buttonList.get(k).drawButton(this.mc, mouseX, mouseY, partialTicks);
}
for (k = 0; k < this.labelList.size(); ++k)

View File

@ -48,7 +48,7 @@ public class GuiButtonExt extends GuiButton
* Draws this button to the screen.
*/
@Override
public void func_191745_a(Minecraft mc, int mouseX, int mouseY, float partial)
public void drawButton(Minecraft mc, int mouseX, int mouseY, float partial)
{
if (this.visible)
{

View File

@ -42,7 +42,7 @@ public class GuiCheckBox extends GuiButton
}
@Override
public void func_191745_a(Minecraft mc, int mouseX, int mouseY, float partial)
public void drawButton(Minecraft mc, int mouseX, int mouseY, float partial)
{
if (this.visible)
{

View File

@ -84,7 +84,7 @@ public class GuiConfigEntries extends GuiListExtended
{
super(mc, parent.width, parent.height, parent.titleLine2 != null ? 33 : 23, parent.height - 32, 20);
this.owningScreen = parent;
this.func_193651_b(false);
this.setShowSelectionBox(false);
this.mc = mc;
this.listEntries = new ArrayList<IConfigEntry>();
@ -562,10 +562,10 @@ public class GuiConfigEntries extends GuiListExtended
}
@Override
public void func_192634_a(int slotIndex, int x, int y, int listWidth, int slotHeight, int mouseX, int mouseY, boolean isSelected, float partial)
public void drawEntry(int slotIndex, int x, int y, int listWidth, int slotHeight, int mouseX, int mouseY, boolean isSelected, float partial)
{
this.btnValue.packedFGColour = GuiUtils.getColorCode(this.configElement.getValidValues()[currentIndex].charAt(0), true);
super.func_192634_a(slotIndex, x, y, listWidth, slotHeight, mouseX, mouseY, isSelected, partial);
super.drawEntry(slotIndex, x, y, listWidth, slotHeight, mouseX, mouseY, isSelected, partial);
}
@Override
@ -910,14 +910,14 @@ public class GuiConfigEntries extends GuiListExtended
public abstract void valueButtonPressed(int slotIndex);
@Override
public void func_192634_a(int slotIndex, int x, int y, int listWidth, int slotHeight, int mouseX, int mouseY, boolean isSelected, float partial)
public void drawEntry(int slotIndex, int x, int y, int listWidth, int slotHeight, int mouseX, int mouseY, boolean isSelected, float partial)
{
super.func_192634_a(slotIndex, x, y, listWidth, slotHeight, mouseX, mouseY, isSelected, partial);
super.drawEntry(slotIndex, x, y, listWidth, slotHeight, mouseX, mouseY, isSelected, partial);
this.btnValue.width = this.owningEntryList.controlWidth;
this.btnValue.x = this.owningScreen.entryList.controlX;
this.btnValue.y = y;
this.btnValue.enabled = enabled();
this.btnValue.func_191745_a(this.mc, mouseX, mouseY, partial);
this.btnValue.drawButton(this.mc, mouseX, mouseY, partial);
}
/**
@ -1190,9 +1190,9 @@ public class GuiConfigEntries extends GuiListExtended
}
@Override
public void func_192634_a(int slotIndex, int x, int y, int listWidth, int slotHeight, int mouseX, int mouseY, boolean isSelected, float partial)
public void drawEntry(int slotIndex, int x, int y, int listWidth, int slotHeight, int mouseX, int mouseY, boolean isSelected, float partial)
{
super.func_192634_a(slotIndex, x, y, listWidth, slotHeight, mouseX, mouseY, isSelected, partial);
super.drawEntry(slotIndex, x, y, listWidth, slotHeight, mouseX, mouseY, isSelected, partial);
this.textFieldValue.x = this.owningEntryList.controlX + 2;
this.textFieldValue.y = y + 1;
this.textFieldValue.width = this.owningEntryList.controlWidth - 4;
@ -1326,14 +1326,14 @@ public class GuiConfigEntries extends GuiListExtended
}
@Override
public void func_192634_a(int slotIndex, int x, int y, int listWidth, int slotHeight, int mouseX, int mouseY, boolean isSelected, float partial)
public void drawEntry(int slotIndex, int x, int y, int listWidth, int slotHeight, int mouseX, int mouseY, boolean isSelected, float partial)
{
this.btnSelectCategory.x = listWidth / 2 - 150;
this.btnSelectCategory.y = y;
this.btnSelectCategory.enabled = enabled();
this.btnSelectCategory.func_191745_a(this.mc, mouseX, mouseY, partial);
this.btnSelectCategory.drawButton(this.mc, mouseX, mouseY, partial);
super.func_192634_a(slotIndex, x, y, listWidth, slotHeight, mouseX, mouseY, isSelected, partial);
super.drawEntry(slotIndex, x, y, listWidth, slotHeight, mouseX, mouseY, isSelected, partial);
}
@Override
@ -1526,7 +1526,7 @@ public class GuiConfigEntries extends GuiListExtended
}
@Override
public void func_192634_a(int slotIndex, int x, int y, int listWidth, int slotHeight, int mouseX, int mouseY, boolean isSelected, float partial)
public void drawEntry(int slotIndex, int x, int y, int listWidth, int slotHeight, int mouseX, int mouseY, boolean isSelected, float partial)
{
boolean isChanged = isChanged();
@ -1545,12 +1545,12 @@ public class GuiConfigEntries extends GuiListExtended
this.btnUndoChanges.x = this.owningEntryList.scrollBarX - 44;
this.btnUndoChanges.y = y;
this.btnUndoChanges.enabled = enabled() && isChanged;
this.btnUndoChanges.func_191745_a(this.mc, mouseX, mouseY, partial);
this.btnUndoChanges.drawButton(this.mc, mouseX, mouseY, partial);
this.btnDefault.x = this.owningEntryList.scrollBarX - 22;
this.btnDefault.y = y;
this.btnDefault.enabled = enabled() && !isDefault();
this.btnDefault.func_191745_a(this.mc, mouseX, mouseY, partial);
this.btnDefault.drawButton(this.mc, mouseX, mouseY, partial);
if (this.tooltipHoverChecker == null)
this.tooltipHoverChecker = new HoverChecker(y, y + slotHeight, x, this.owningScreen.entryList.controlX - 8, 800);

View File

@ -60,7 +60,7 @@ public class GuiEditArrayEntries extends GuiListExtended
this.configElement = configElement;
this.beforeValues = beforeValues;
this.currentValues = currentValues;
this.func_193651_b(false);
this.setShowSelectionBox(false);
this.isChanged = !Arrays.deepEquals(beforeValues, currentValues);
this.isDefault = Arrays.deepEquals(currentValues, configElement.getDefaults());
this.canAddMoreEntries = !configElement.isListLengthFixed() && (configElement.getMaxListLength() == -1 || currentValues.length < configElement.getMaxListLength());
@ -450,9 +450,9 @@ public class GuiEditArrayEntries extends GuiListExtended
}
@Override
public void func_192634_a(int slotIndex, int x, int y, int listWidth, int slotHeight, int mouseX, int mouseY, boolean isSelected, float partial)
public void drawEntry(int slotIndex, int x, int y, int listWidth, int slotHeight, int mouseX, int mouseY, boolean isSelected, float partial)
{
super.func_192634_a(slotIndex, x, y, listWidth, slotHeight, mouseX, mouseY, isSelected, partial);
super.drawEntry(slotIndex, x, y, listWidth, slotHeight, mouseX, mouseY, isSelected, partial);
if (configElement.isListLengthFixed() || slotIndex != owningEntryList.listEntries.size() - 1)
{
this.textFieldValue.setVisible(true);
@ -516,9 +516,9 @@ public class GuiEditArrayEntries extends GuiListExtended
}
@Override
public void func_192634_a(int slotIndex, int x, int y, int listWidth, int slotHeight, int mouseX, int mouseY, boolean isSelected, float partial)
public void drawEntry(int slotIndex, int x, int y, int listWidth, int slotHeight, int mouseX, int mouseY, boolean isSelected, float partial)
{
super.func_192634_a(slotIndex, x, y, listWidth, slotHeight, mouseX, mouseY, isSelected, partial);
super.drawEntry(slotIndex, x, y, listWidth, slotHeight, mouseX, mouseY, isSelected, partial);
this.btnValue.x = listWidth / 4;
this.btnValue.y = y;
@ -529,7 +529,7 @@ public class GuiEditArrayEntries extends GuiListExtended
this.btnValue.displayString = String.valueOf(value);
btnValue.packedFGColour = value ? GuiUtils.getColorCode('2', true) : GuiUtils.getColorCode('4', true);
this.btnValue.func_191745_a(owningEntryList.getMC(), mouseX, mouseY, partial);
this.btnValue.drawButton(owningEntryList.getMC(), mouseX, mouseY, partial);
}
@Override
@ -593,7 +593,7 @@ public class GuiEditArrayEntries extends GuiListExtended
}
@Override
public void func_192634_a(int slotIndex, int x, int y, int listWidth, int slotHeight, int mouseX, int mouseY, boolean isSelected, float partial)
public void drawEntry(int slotIndex, int x, int y, int listWidth, int slotHeight, int mouseX, int mouseY, boolean isSelected, float partial)
{
if (this.getValue() != null && this.isValidated)
owningEntryList.getMC().fontRenderer.drawString(
@ -608,7 +608,7 @@ public class GuiEditArrayEntries extends GuiListExtended
this.btnAddNewEntryAbove.visible = true;
this.btnAddNewEntryAbove.x = half + ((half / 2) - 44);
this.btnAddNewEntryAbove.y = y;
this.btnAddNewEntryAbove.func_191745_a(owningEntryList.getMC(), mouseX, mouseY, partial);
this.btnAddNewEntryAbove.drawButton(owningEntryList.getMC(), mouseX, mouseY, partial);
}
else
this.btnAddNewEntryAbove.visible = false;
@ -618,7 +618,7 @@ public class GuiEditArrayEntries extends GuiListExtended
this.btnRemoveEntry.visible = true;
this.btnRemoveEntry.x = half + ((half / 2) - 22);
this.btnRemoveEntry.y = y;
this.btnRemoveEntry.func_191745_a(owningEntryList.getMC(), mouseX, mouseY, partial);
this.btnRemoveEntry.drawButton(owningEntryList.getMC(), mouseX, mouseY, partial);
}
else
this.btnRemoveEntry.visible = false;

View File

@ -54,7 +54,7 @@ public class GuiSelectStringEntries extends GuiListExtended
this.mc = mc;
this.configElement = configElement;
this.selectableValues = selectableValues;
this.func_193651_b(true);
this.setShowSelectionBox(true);
listEntries = new ArrayList<IGuiSelectStringListEntry>();
@ -173,7 +173,7 @@ public class GuiSelectStringEntries extends GuiListExtended
}
@Override
public void func_192634_a(int slotIndex, int x, int y, int listWidth, int slotHeight, int mouseX, int mouseY, boolean isSelected, float partial)
public void drawEntry(int slotIndex, int x, int y, int listWidth, int slotHeight, int mouseX, int mouseY, boolean isSelected, float partial)
{
owningList.mc.fontRenderer.drawString(value.getValue(), x + 1, y, slotIndex == owningList.selectedIndex ? 16777215 : 14737632);
}

View File

@ -41,7 +41,7 @@ public class GuiUnicodeGlyphButton extends GuiButtonExt
}
@Override
public void func_191745_a(Minecraft mc, int mouseX, int mouseY, float partial)
public void drawButton(Minecraft mc, int mouseX, int mouseY, float partial)
{
if (this.visible)
{

View File

@ -53,7 +53,7 @@ public class ClientRegistry
public static <T extends TileEntity> void bindTileEntitySpecialRenderer(Class<T> tileEntityClass, TileEntitySpecialRenderer<? super T> specialRenderer)
{
TileEntityRendererDispatcher.instance.mapSpecialRenderers.put(tileEntityClass, specialRenderer);
TileEntityRendererDispatcher.instance.renderers.put(tileEntityClass, specialRenderer);
specialRenderer.setRendererDispatcher(TileEntityRendererDispatcher.instance);
}

View File

@ -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;

View File

@ -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);

View File

@ -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!
}
}

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(' ');

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);
}
}

View File

@ -238,7 +238,7 @@ public class DynBucketTest
@Override
public void getSubItems(CreativeTabs tab, NonNullList<ItemStack> subItems)
{
if (!this.func_194125_a(tab))
if (!this.isInCreativeTab(tab))
return;
for (int i = 0; i < 4; i++)
{

View File

@ -94,15 +94,10 @@ public class FluidPlacementTest
ModelLoader.setBucketModelDefinition(FluidContainer.instance);
// no need to pass the locations here, since they'll be loaded by the block model logic.
ModelBakery.registerItemVariants(fluid);
ModelLoader.setCustomMeshDefinition(fluid, new ItemMeshDefinition()
{
public ModelResourceLocation getModelLocation(@Nonnull ItemStack stack)
{
return fluidLocation;
}
});
ModelLoader.setCustomMeshDefinition(fluid, stack -> fluidLocation);
ModelLoader.setCustomStateMapper(FiniteFluidBlock.instance, new StateMapperBase()
{
@Override
protected ModelResourceLocation getModelResourceLocation(IBlockState state)
{
return fluidLocation;
@ -249,7 +244,7 @@ public class FluidPlacementTest
@Override
public void getSubItems(@Nullable CreativeTabs tab, @Nonnull NonNullList<ItemStack> subItems)
{
if (!this.func_194125_a(tab))
if (!this.isInCreativeTab(tab))
return;
Fluid[] fluids = new Fluid[]{FluidRegistry.WATER, FluidRegistry.LAVA, FiniteFluid.instance, ModelFluidDebug.TestFluid.instance};
// add 16 variable fillings

View File

@ -113,7 +113,7 @@ public class ItemTileDebug
}
@Override
public void func_192841_a(CustomTileEntity p_180535_1_, double x, double y, double z, float p_180535_8_, int p_180535_9_, float partial)
public void render(CustomTileEntity p_180535_1_, double x, double y, double z, float p_180535_8_, int p_180535_9_, float partial)
{
glPushMatrix();
glTranslated(x, y, z);

View File

@ -63,7 +63,7 @@ public class NBTShareTagItemTest
@Override
public void getSubItems(CreativeTabs tab, NonNullList<ItemStack> subItems)
{
if (!this.func_194125_a(tab))
if (!this.isInCreativeTab(tab))
return;
ItemStack creativeMenuItem = new ItemStack(this);
NBTTagCompound creativeMenuNBT = new NBTTagCompound();