3
0
KCauldronX/patches/net/minecraft/tileentity/TileEntityBeacon.java.patch

60 lines
1.7 KiB
Diff
Raw Normal View History

2015-03-22 17:38:04 +00:00
--- ../src-base/minecraft/net/minecraft/tileentity/TileEntityBeacon.java
+++ ../src-work/minecraft/net/minecraft/tileentity/TileEntityBeacon.java
@@ -18,6 +18,11 @@
import net.minecraft.stats.AchievementList;
import net.minecraft.util.AxisAlignedBB;
+// CraftBukkit start
+import org.bukkit.craftbukkit.entity.CraftHumanEntity;
+import org.bukkit.entity.HumanEntity;
+// CraftBukkit end
+
public class TileEntityBeacon extends TileEntity implements IInventory
{
public static final Potion[][] effectsList = new Potion[][] {{Potion.moveSpeed, Potion.digSpeed}, {Potion.resistance, Potion.jump}, {Potion.damageBoost}, {Potion.regeneration}};
@@ -31,6 +36,35 @@
private int secondaryEffect;
private ItemStack payment;
private String field_146008_p;
+ // CraftBukkit start
+ public List<HumanEntity> transaction = new java.util.ArrayList<HumanEntity>();
+ private int maxStack = MAX_STACK;
+
+ public ItemStack[] getContents()
+ {
+ return new ItemStack[] { this.payment };
+ }
+
+ public void onOpen(CraftHumanEntity who)
+ {
+ transaction.add(who);
+ }
+
+ public void onClose(CraftHumanEntity who)
+ {
+ transaction.remove(who);
+ }
+
+ public List<HumanEntity> getViewers()
+ {
+ return transaction;
+ }
+
+ public void setMaxStackSize(int size)
+ {
+ maxStack = size;
+ }
+ // CraftBukkit end
private static final String __OBFID = "CL_00000339";
public void updateEntity()
@@ -343,7 +377,7 @@
public int getInventoryStackLimit()
{
- return 1;
+ return maxStack; // CraftBukkit
}
public boolean isUseableByPlayer(EntityPlayer p_70300_1_)