Loosen TileEntity's default hasCapability implementation. Modders should specifically opt in.

This commit is contained in:
LexManos 2016-01-25 11:27:08 -08:00
parent 7a0a801740
commit b71b963301

View file

@ -65,7 +65,7 @@
public double func_145835_a(double p_145835_1_, double p_145835_3_, double p_145835_5_)
{
double d0 = (double)this.field_174879_c.func_177958_n() + 0.5D - p_145835_1_;
@@ -279,4 +293,185 @@
@@ -279,4 +293,183 @@
func_145826_a(TileEntityFlowerPot.class, "FlowerPot");
func_145826_a(TileEntityBanner.class, "Banner");
}
@ -229,8 +229,6 @@
+
+ public boolean hasCapability(net.minecraftforge.common.capabilities.Capability<?> capability, net.minecraft.util.EnumFacing facing)
+ {
+ if (getCapability(capability, facing) != null)
+ return true;
+ return capabilities == null ? false : capabilities.hasCapability(capability, facing);
+ }
+