Initial commit (Forge 1291).
This commit is contained in:
59
patches/net/minecraft/tileentity/TileEntityBeacon.java.patch
Normal file
59
patches/net/minecraft/tileentity/TileEntityBeacon.java.patch
Normal file
@ -0,0 +1,59 @@
|
||||
--- ../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_)
|
Reference in New Issue
Block a user