Merge pull request #1390 from diesieben07/beacon-items
Added Item#isBeaconpayment
This commit is contained in:
commit
a7ce64dfbc
3 changed files with 32 additions and 3 deletions
|
@ -0,0 +1,11 @@
|
|||
--- ../src-base/minecraft/net/minecraft/inventory/ContainerBeacon.java
|
||||
+++ ../src-work/minecraft/net/minecraft/inventory/ContainerBeacon.java
|
||||
@@ -156,7 +156,7 @@
|
||||
|
||||
public boolean func_75214_a(ItemStack p_75214_1_)
|
||||
{
|
||||
- return p_75214_1_ == null ? false : p_75214_1_.func_77973_b() == Items.field_151166_bC || p_75214_1_.func_77973_b() == Items.field_151045_i || p_75214_1_.func_77973_b() == Items.field_151043_k || p_75214_1_.func_77973_b() == Items.field_151042_j;
|
||||
+ return p_75214_1_ != null && p_75214_1_.func_77973_b() != null && p_75214_1_.func_77973_b().isBeaconPayment(p_75214_1_);
|
||||
}
|
||||
|
||||
public int func_75219_a()
|
|
@ -104,7 +104,7 @@
|
|||
public Multimap func_111205_h()
|
||||
{
|
||||
return HashMultimap.create();
|
||||
@@ -728,6 +746,581 @@
|
||||
@@ -728,6 +746,591 @@
|
||||
return this.field_111218_cA == null ? "MISSING_ICON_ITEM_" + field_150901_e.func_148757_b(this) + "_" + this.field_77774_bZ : this.field_111218_cA;
|
||||
}
|
||||
|
||||
|
@ -681,12 +681,22 @@
|
|||
+ {
|
||||
+ return func_77619_b();
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Whether this Item can be used as a payment to activate the vanilla beacon.
|
||||
+ * @param stack the ItemStack
|
||||
+ * @return true if this Item can be used
|
||||
+ */
|
||||
+ public boolean isBeaconPayment(ItemStack stack)
|
||||
+ {
|
||||
+ return this == Items.field_151166_bC || this == Items.field_151045_i || this == Items.field_151043_k || this == Items.field_151042_j;
|
||||
+ }
|
||||
+ /* ======================================== FORGE END =====================================*/
|
||||
+
|
||||
public static enum ToolMaterial
|
||||
{
|
||||
WOOD(0, 59, 2.0F, 0.0F, 15),
|
||||
@@ -743,6 +1336,9 @@
|
||||
@@ -743,6 +1346,9 @@
|
||||
|
||||
private static final String __OBFID = "CL_00000042";
|
||||
|
||||
|
@ -696,7 +706,7 @@
|
|||
private ToolMaterial(int p_i1874_3_, int p_i1874_4_, float p_i1874_5_, float p_i1874_6_, int p_i1874_7_)
|
||||
{
|
||||
this.field_78001_f = p_i1874_3_;
|
||||
@@ -779,7 +1375,15 @@
|
||||
@@ -779,7 +1385,15 @@
|
||||
|
||||
public Item func_150995_f()
|
||||
{
|
||||
|
|
|
@ -9,3 +9,11 @@
|
|||
{
|
||||
flag = false;
|
||||
break;
|
||||
@@ -357,6 +357,6 @@
|
||||
|
||||
public boolean func_94041_b(int p_94041_1_, ItemStack p_94041_2_)
|
||||
{
|
||||
- return p_94041_2_.func_77973_b() == Items.field_151166_bC || p_94041_2_.func_77973_b() == Items.field_151045_i || p_94041_2_.func_77973_b() == Items.field_151043_k || p_94041_2_.func_77973_b() == Items.field_151042_j;
|
||||
+ return p_94041_2_.func_77973_b() != null && p_94041_2_.func_77973_b().isBeaconPayment(p_94041_2_);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue