mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-12-26 11:07:59 +01:00
Fix Villager trades not being blocked
This commit is contained in:
parent
60a99643cc
commit
b48940f1e4
@ -196,8 +196,9 @@ public class EndermanController extends MobEntityController {
|
||||
@Override
|
||||
public void M() {
|
||||
super.M();
|
||||
if (npc != null)
|
||||
if (npc != null) {
|
||||
npc.update();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -174,8 +174,9 @@ public class IronGolemController extends MobEntityController {
|
||||
@Override
|
||||
public void M() {
|
||||
super.M();
|
||||
if (npc != null)
|
||||
if (npc != null) {
|
||||
npc.update();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -187,8 +187,9 @@ public class PigController extends MobEntityController {
|
||||
@Override
|
||||
public void M() {
|
||||
super.M();
|
||||
if (npc != null)
|
||||
if (npc != null) {
|
||||
npc.update();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -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