33 lines
1.5 KiB
Diff
33 lines
1.5 KiB
Diff
--- a/net/minecraft/entity/player/EntityPlayer.java
|
|
+++ b/net/minecraft/entity/player/EntityPlayer.java
|
|
@@ -97,6 +97,8 @@
|
|
import net.minecraftforge.api.distmarker.OnlyIn;
|
|
|
|
public abstract class EntityPlayer extends EntityLivingBase {
|
|
+ public static final net.minecraft.entity.ai.attributes.IAttribute REACH_DISTANCE = new net.minecraft.entity.ai.attributes.RangedAttribute(null, "generic.reachDistance", 5.0D, 0.0D, 1024.0D).setShouldWatch(true);
|
|
+
|
|
private static final DataParameter<Float> ABSORPTION = EntityDataManager.<Float>createKey(EntityPlayer.class, DataSerializers.FLOAT);
|
|
private static final DataParameter<Integer> PLAYER_SCORE = EntityDataManager.<Integer>createKey(EntityPlayer.class, DataSerializers.VARINT);
|
|
protected static final DataParameter<Byte> PLAYER_MODEL_FLAG = EntityDataManager.<Byte>createKey(EntityPlayer.class, DataSerializers.BYTE);
|
|
@@ -663,7 +665,12 @@
|
|
return p_184816_1_.getItem();
|
|
}
|
|
|
|
+ @Deprecated //Use location sensitive version below
|
|
public float getDigSpeed(IBlockState state) {
|
|
+ return getDigSpeed(state, null);
|
|
+ }
|
|
+
|
|
+ public float getDigSpeed(IBlockState state, @Nullable BlockPos pos) {
|
|
float f = this.inventory.getDestroySpeed(state);
|
|
if (f > 1.0F) {
|
|
int i = EnchantmentHelper.getEfficiencyModifier(this);
|
|
@@ -705,6 +712,7 @@
|
|
f /= 5.0F;
|
|
}
|
|
|
|
+ f = net.minecraftforge.event.ForgeEventFactory.getBreakSpeed(this, state, f, pos);
|
|
return f;
|
|
}
|
|
|