Initial 1.11-pre1 update

This commit is contained in:
cpw committed 2016-11-13 17:09:55 -05:00
1 parent c177219ff3
commit 4e6a774075
294 files changed
+3099 -2846

No files matched your search

@@ -21,6 +21,7 @@ package net.minecraftforge.event.brewing;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntityBrewingStand;
import net.minecraft.util.NonNullList;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.fml.common.eventhandler.Cancelable;
import net.minecraftforge.fml.common.eventhandler.Event;
@@ -29,30 +30,30 @@ import net.minecraftforge.fml.common.eventhandler.Event.HasResult;
public class PotionBrewEvent extends Event
{
private ItemStack[] stacks;
private NonNullList<ItemStack> stacks;
protected PotionBrewEvent(ItemStack[] stacks)
protected PotionBrewEvent(NonNullList<ItemStack> stacks)
{
this.stacks = stacks;
}
public ItemStack getItem(int index)
{
if (index >= stacks.length) return null;
return stacks[index];
if (index >= stacks.size()) return null;
return stacks.get(index);
}
public void setItem(int index, ItemStack stack)
{
if (index < stacks.length)
if (index < stacks.size())
{
stacks[index] = stack;
stacks.set(index, stack);
}
}
public int getLength()
{
return stacks.length;
return stacks.size();
}
/**
@@ -75,7 +76,7 @@ public class PotionBrewEvent extends Event
@Cancelable
public static class Pre extends PotionBrewEvent
{
public Pre(ItemStack[] stacks)
public Pre(NonNullList<ItemStack> stacks)
{
super(stacks);
}
@@ -96,7 +97,7 @@ public class PotionBrewEvent extends Event
**/
public static class Post extends PotionBrewEvent
{
public Post(ItemStack[] stacks)
public Post(NonNullList<ItemStack> stacks)
{
super(stacks);
}