Is there an event or something that I can use to prevent an entity from moving so they act like an NPC? I would like help with this.
1928i There are a few routes you can take with this: - Extremely high slowness - Scheduler - Overriding the Entity All 3 have their (dis)advantages, the 1st, while achieving what you want, seems more like a cheap workaround. The 2nd, can be laggy depending on how its done and is also a cheap workaround. The 3rd, requires understanding NMS, which isn't an easy thing for "new developers". You can find out how to do all of these on the forums, wiki, and google-ing.
xTigerRebornx What if one were to constantly check the entity's location and if it strayed it would teleport it back?
use slowness. It's the best solution. If you combine it with PlayerInteractEntityEvent and EntityDamageByEntityEvent, it's really like they are just standing around and looking around. The problem is just that they are always looking to you if it is an aggressive NPC.
xTigerRebornx I can't find anything about this "NMS" except something discontinued called "RemoteEntities." Is there anywhere I can go for help on this? I can't find anything.
Hmm. I'm testing it on singleplayer and it's not working. Slowness 255 stops you from moving unless you jump, though. EDIT by Moderator: merged posts, please use the edit button instead of double posting.
Lactem The range of valid values is from -127 to +128, as Minecraft's save format uses a single signed byte.
_LB Yeah no. I'm talking about the amplifier, which can go up to 255. /effect <effect> <seconds> <amplifier> --> /effect 8 60 255
Well then I'm sorry to tell you that you're flat-out wrong. Go in-game and try using an amplifier of 255. It works just fine. Then try 256. It will actually tell you that the maximum value is 255. There's nothing about positive 128. Just try that command I told you: /effect 8 60 255 in vanilla.
Lactem Did you happen to notice the level of the poiton? Lactem OK, so I tested with 1.7.10 and you are right - I tested with older versions and I am right, so it's a version difference. EDIT by Moderator: merged posts, please use the edit button instead of double posting.
_LB Pretty sure it was changed to 255 when they actually made the max build limit to 256 (version 1.2.1 snapshot 12w07a).
1928i What about making a new Custom Entity which adapts to all kinds of entity, that contains method "addToEventListener()" that calls the EntityMoveEvent? I'll see if I can make some code for you
DevilMental Erm. No offence, an EntityMoveEvent is a terrible idea. If you're going to use custom entites to keep track of entities that move, it's best to do so directly rather than through the use of events.
DevilMental Then you're still tracking it with custom entities. As I said, it's easier to just handle it with the entity itself, rather than fire an unnecessary event, since most plugins that use custom entities do so for their own purpose, rather than a to be shared with another plugin.
Is this rumored "high speed and jump boost" thing a bug in CraftBukkit? It certainly doesn't freeze the entity in place in Vanilla.