mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-10-05 10:57:27 +02:00
Fix Villager trades not being blocked
This commit is contained in:
parent
60a99643cc
commit
b48940f1e4
@ -196,9 +196,10 @@ public class EndermanController extends MobEntityController {
|
||||
@Override
|
||||
public void M() {
|
||||
super.M();
|
||||
if (npc != null)
|
||||
if (npc != null) {
|
||||
npc.update();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean n_() {
|
||||
|
@ -174,9 +174,10 @@ public class IronGolemController extends MobEntityController {
|
||||
@Override
|
||||
public void M() {
|
||||
super.M();
|
||||
if (npc != null)
|
||||
if (npc != null) {
|
||||
npc.update();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean n_() {
|
||||
|
@ -187,9 +187,10 @@ public class PigController extends MobEntityController {
|
||||
@Override
|
||||
public void M() {
|
||||
super.M();
|
||||
if (npc != null)
|
||||
if (npc != null) {
|
||||
npc.update();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean n_() {
|
||||
|
@ -18,7 +18,9 @@ import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.v1_9_R1.BlockPosition;
|
||||
import net.minecraft.server.v1_9_R1.EntityHuman;
|
||||
import net.minecraft.server.v1_9_R1.EntityVillager;
|
||||
import net.minecraft.server.v1_9_R1.EnumHand;
|
||||
import net.minecraft.server.v1_9_R1.IBlockData;
|
||||
import net.minecraft.server.v1_9_R1.ItemStack;
|
||||
import net.minecraft.server.v1_9_R1.MinecraftKey;
|
||||
import net.minecraft.server.v1_9_R1.NBTTagCompound;
|
||||
import net.minecraft.server.v1_9_R1.SoundEffect;
|
||||
@ -69,7 +71,7 @@ public class VillagerController extends MobEntityController {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean a(EntityHuman entityhuman) {
|
||||
public boolean a(EntityHuman entityhuman, EnumHand enumhand, ItemStack itemstack) {
|
||||
return npc == null || !blockTrades ? super.a(entityhuman) : false; // block
|
||||
// trades
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user