mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-11-23 19:16:34 +01:00
Add setting for new boat controls for controllable NPCs. Fixes CITIZENS-556
This commit is contained in:
parent
3867c0e30d
commit
005ed48216
@ -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;
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user