mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2025-01-30 19:31:28 +01:00
These ain't horses.
This commit is contained in:
parent
c0a188d2c1
commit
7b5f22e64d
@ -1,13 +1,10 @@
|
|||||||
package fr.neatmonster.nocheatplus.compat.cbdev;
|
package fr.neatmonster.nocheatplus.compat.cbdev;
|
||||||
|
|
||||||
import net.minecraft.server.v1_8_R1.AttributeInstance;
|
|
||||||
import net.minecraft.server.v1_8_R1.AxisAlignedBB;
|
import net.minecraft.server.v1_8_R1.AxisAlignedBB;
|
||||||
import net.minecraft.server.v1_8_R1.Block;
|
import net.minecraft.server.v1_8_R1.Block;
|
||||||
import net.minecraft.server.v1_8_R1.DamageSource;
|
import net.minecraft.server.v1_8_R1.DamageSource;
|
||||||
import net.minecraft.server.v1_8_R1.EntityComplexPart;
|
import net.minecraft.server.v1_8_R1.EntityComplexPart;
|
||||||
import net.minecraft.server.v1_8_R1.EntityInsentient;
|
|
||||||
import net.minecraft.server.v1_8_R1.EntityPlayer;
|
import net.minecraft.server.v1_8_R1.EntityPlayer;
|
||||||
import net.minecraft.server.v1_8_R1.GenericAttributes;
|
|
||||||
import net.minecraft.server.v1_8_R1.MobEffectList;
|
import net.minecraft.server.v1_8_R1.MobEffectList;
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
@ -141,17 +138,6 @@ public class MCAccessCBDev implements MCAccess{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public double getSpeedAttributeValue(Entity entity) {
|
|
||||||
net.minecraft.server.v1_8_R1.Entity mcEntity = ((CraftEntity) entity).getHandle();
|
|
||||||
if (mcEntity instanceof EntityInsentient) {
|
|
||||||
AttributeInstance attr = ((EntityInsentient) mcEntity).getAttributeInstance(GenericAttributes.d);
|
|
||||||
if (attr != null) {
|
|
||||||
return attr.getValue();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return Double.NEGATIVE_INFINITY;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getInvulnerableTicks(final Player player) {
|
public int getInvulnerableTicks(final Player player) {
|
||||||
return ((CraftPlayer) player).getHandle().invulnerableTicks;
|
return ((CraftPlayer) player).getHandle().invulnerableTicks;
|
||||||
@ -187,7 +173,6 @@ public class MCAccessCBDev implements MCAccess{
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean hasGravity(final Material mat) {
|
public boolean hasGravity(final Material mat) {
|
||||||
// TODO: Test/check.
|
|
||||||
return mat.hasGravity();
|
return mat.hasGravity();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user