Clean up capability checking for entities (#4591)
This commit is contained in:
parent
88b49f4a36
commit
eda4fb231b
1 changed files with 2 additions and 4 deletions
|
@ -177,7 +177,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean func_174816_a(Explosion p_174816_1_, World p_174816_2_, BlockPos p_174816_3_, IBlockState p_174816_4_, float p_174816_5_)
|
public boolean func_174816_a(Explosion p_174816_1_, World p_174816_2_, BlockPos p_174816_3_, IBlockState p_174816_4_, float p_174816_5_)
|
||||||
@@ -2901,6 +2929,185 @@
|
@@ -2901,6 +2929,183 @@
|
||||||
EnchantmentHelper.func_151385_b(p_174815_1_, p_174815_2_);
|
EnchantmentHelper.func_151385_b(p_174815_1_, p_174815_2_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -318,9 +318,7 @@
|
||||||
+ @Override
|
+ @Override
|
||||||
+ public boolean hasCapability(net.minecraftforge.common.capabilities.Capability<?> capability, @Nullable net.minecraft.util.EnumFacing facing)
|
+ public boolean hasCapability(net.minecraftforge.common.capabilities.Capability<?> capability, @Nullable net.minecraft.util.EnumFacing facing)
|
||||||
+ {
|
+ {
|
||||||
+ if (getCapability(capability, facing) != null)
|
+ return capabilities != null && capabilities.hasCapability(capability, facing);
|
||||||
+ return true;
|
|
||||||
+ return capabilities == null ? false : capabilities.hasCapability(capability, facing);
|
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ @Override
|
+ @Override
|
||||||
|
|
Loading…
Reference in a new issue