Skip to content

Commit

Permalink
Fix Villager trades not being blocked
Browse files Browse the repository at this point in the history
  • Loading branch information
fullwall committed Mar 1, 2016
1 parent bdd82ce commit 7ad5f73
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
Expand Up @@ -196,8 +196,9 @@ protected void L() {
@Override
public void M() {
super.M();
if (npc != null)
if (npc != null) {
npc.update();
}
}

@Override
Expand Down
Expand Up @@ -174,8 +174,9 @@ protected void L() {
@Override
public void M() {
super.M();
if (npc != null)
if (npc != null) {
npc.update();
}
}

@Override
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/net/citizensnpcs/npc/entity/PigController.java
Expand Up @@ -187,8 +187,9 @@ protected void L() {
@Override
public void M() {
super.M();
if (npc != null)
if (npc != null) {
npc.update();
}
}

@Override
Expand Down
Expand Up @@ -18,7 +18,9 @@
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;
Expand Down Expand Up @@ -69,7 +71,7 @@ protected void a(double d0, boolean flag, IBlockData block, BlockPosition blockp
}

@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
}
Expand Down

0 comments on commit 7ad5f73

Please sign in to comment.