ForgePatch/patches_old/minecraft/net/minecraft/tileentity/TileEntityBeacon.java.patch

46 lines
2.3 KiB
Diff

--- ../src-base/minecraft/net/minecraft/tileentity/TileEntityBeacon.java
+++ ../src-work/minecraft/net/minecraft/tileentity/TileEntityBeacon.java
@@ -130,17 +130,21 @@
{
if (iblockstate.func_177230_c() != Blocks.field_150397_co)
{
- if (iblockstate.func_185891_c() >= 15 && iblockstate.func_177230_c() != Blocks.field_150357_h)
+ if (iblockstate.getLightOpacity(field_145850_b, blockpos$mutableblockpos) >= 15 && iblockstate.func_177230_c() != Blocks.field_150357_h)
{
this.field_146015_k = false;
this.field_174909_f.clear();
break;
}
-
+ float[] customColor = iblockstate.func_177230_c().getBeaconColorMultiplier(iblockstate, this.field_145850_b, blockpos$mutableblockpos, func_174877_v());
+ if (customColor != null)
+ afloat = customColor;
+ else {
tileentitybeacon$beamsegment.func_177262_a();
continue;
+ }
}
-
+ else
afloat = ((EnumDyeColor)iblockstate.func_177229_b(BlockStainedGlassPane.field_176245_a)).func_193349_f();
}
@@ -181,7 +185,7 @@
{
Block block = this.field_145850_b.func_180495_p(new BlockPos(j1, i2, k1)).func_177230_c();
- if (block != Blocks.field_150475_bE && block != Blocks.field_150340_R && block != Blocks.field_150484_ah && block != Blocks.field_150339_S)
+ if (!block.isBeaconBase(this.field_145850_b, new BlockPos(j1, i2, k1), func_174877_v()))
{
flag1 = false;
break;
@@ -395,7 +399,7 @@
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_);
}
public String func_174875_k()