Controllabe NPCs stop only on shift-left/right click now

This commit is contained in:
fullwall 2013-03-11 19:35:21 +08:00
parent bcb7672246
commit deba96875c
2 changed files with 1 additions and 2 deletions

View File

@ -120,7 +120,7 @@ public class Controllable extends Trait implements Toggleable, CommandConfigurab
@EventHandler @EventHandler
public void onPlayerInteract(PlayerInteractEvent event) { public void onPlayerInteract(PlayerInteractEvent event) {
if (!npc.isSpawned() || !enabled) if (!npc.isSpawned() || !enabled || !event.getPlayer().isSneaking())
return; return;
EntityPlayer handle = ((CraftPlayer) event.getPlayer()).getHandle(); EntityPlayer handle = ((CraftPlayer) event.getPlayer()).getHandle();
Action performed = event.getAction(); Action performed = event.getAction();

View File

@ -71,7 +71,6 @@ public class Util {
new Random().nextBytes(seed); new Random().nextBytes(seed);
return RNG_CONSTRUCTOR.newInstance(seed); return RNG_CONSTRUCTOR.newInstance(seed);
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace();
return new Random(); return new Random();
} }
} }