These ain't horses.

This commit is contained in:
asofold 2014-12-04 23:17:38 +01:00
parent c0a188d2c1
commit 7b5f22e64d

View File

@ -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();
} }