Да, именно так.Liahim написал(а):Неужто я через рецепт всем вёдрам воды это присвоил?
Своими словами я не хотел сказать ничего плохо. Под фразой "вздохнули с облегчением" я имел в виду облегчение не из-за отсутствия твоего мода, а что ведра не теряются.Liahim написал(а):Ой, и правда... Протестил на ведре с молоком...
Тогда повторю вопрос №5 из этой темы При крафте возвращалось пустое ведро.
Как иным способом заставить ведро воды исчезнуть?
[merge_posts_bbcode]Добавлено: 21.02.2016 20:29:56[/merge_posts_bbcode]
ipv2007, как знаешь
Рад, что все вздохнули с облегчением )
А на счёт фикса, всё-таки как?
public class MilkBucketRecipe implements IRecipe {
private final ItemStack recipeOutput;
public final ArrayList recipeItems = new ArrayList();;
public MilkBucketRecipe()
{
this.recipeOutput = new ItemStack(Items.milk_bucket);
this.recipeItems.add(new ItemStack(Items.water_bucket));
this.recipeItems.add(new ItemStack(ModItems.powderedMilk));
}
@Override
public boolean matches(InventoryCrafting inv, World world) {
ArrayList arraylist = new ArrayList(this.recipeItems);
for (int i = 0; i < 3; ++i)
{
for (int j = 0; j < 3; ++j)
{
ItemStack itemstack = inv.getStackInRowAndColumn(j, i);
if (itemstack != null)
{
boolean flag = false;
Iterator iterator = arraylist.iterator();
while (iterator.hasNext())
{
ItemStack itemstack1 = (ItemStack)iterator.next();
if (itemstack.getItem() == itemstack1.getItem())
{
flag = true;
arraylist.remove(itemstack1);
break;
}
}
if (!flag)
{
return false;
}
}
}
}
return arraylist.isEmpty();
}
@Override
public ItemStack getCraftingResult(InventoryCrafting inv)
{
return this.recipeOutput.copy();
}
@Override
public int getRecipeSize()
{
return this.recipeItems.size();
}
@Override
public ItemStack getRecipeOutput()
{
return null;
}
}
public ItemStack[] getRemainingItems(InventoryCrafting ic) {
return new ItemStack[ic.getSizeInventory()];
}
Ха-ха! Вот вам и замкнутый круг )))ipv2007 написал(а):... и таким образом вышел на мод SaltyMod.