mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-11-29 14:15:50 +01:00
Fix player movement, block villager trading
This commit is contained in:
parent
28013dc689
commit
8c7cfa88e9
@ -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) {
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user