Fix player movement, block villager trading

This commit is contained in:
fullwall 2012-08-02 22:51:10 +08:00
parent 28013dc689
commit 8c7cfa88e9
2 changed files with 10 additions and 2 deletions

View File

@ -6,6 +6,7 @@ import net.citizensnpcs.npc.CitizensMobNPC;
import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.Util;
import net.minecraft.server.EntityHuman;
import net.minecraft.server.EntityVillager;
import net.minecraft.server.World;
@ -53,6 +54,13 @@ public class CitizensVillagerNPC extends CitizensMobNPC {
Util.callCollisionEvent(npc, entity);
}
@Override
public boolean c(EntityHuman entityhuman) {
if (npc == null)
return super.c(entityhuman);
return false; // block trades
}
@Override
public void g(double x, double y, double z) {
if (npc == null) {

View File

@ -109,8 +109,8 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder {
bE = 0;
}
aX *= 0.98F;
a(aW, aX);
bs *= 0.98F;
e(br, bs);
as = yaw;
}