Add setting for new boat controls for controllable NPCs. Fixes CITIZENS-556

This commit is contained in:
fullwall 2013-05-16 12:04:21 +08:00
parent 3867c0e30d
commit 005ed48216
2 changed files with 3 additions and 1 deletions

View File

@ -104,6 +104,7 @@ public class Settings {
TALK_CLOSE_MAXIMUM_COOLDOWN("npc.text.max-talk-cooldown", 5),
TALK_CLOSE_MINIMUM_COOLDOWN("npc.text.min-talk-cooldown", 10),
TALK_ITEM("npc.text.talk-item", "340"),
USE_BOAT_CONTROLS("npc.controllable.use-boat-controls", true),
USE_NEW_PATHFINDER("npc.pathfinding.use-new-finder", false);
protected String path;

View File

@ -3,6 +3,7 @@ package net.citizensnpcs.trait;
import java.lang.reflect.Constructor;
import java.util.Map;
import net.citizensnpcs.Settings.Setting;
import net.citizensnpcs.api.command.CommandConfigurable;
import net.citizensnpcs.api.command.CommandContext;
import net.citizensnpcs.api.event.NPCRightClickEvent;
@ -170,7 +171,7 @@ public class Controllable extends Trait implements Toggleable, CommandConfigurab
}
private void setMountedYaw(EntityLiving handle) {
if (handle instanceof EntityEnderDragon)
if (handle instanceof EntityEnderDragon || !Setting.USE_BOAT_CONTROLS.asBoolean())
return; // EnderDragon handles this separately
double tX = handle.locX + handle.motX;
double tZ = handle.locZ + handle.motZ;