Commit Graph

1168 Commits

Author SHA1 Message Date
fullwall
feae637824 Reload saves properly on /citizens reload 2016-02-29 00:08:38 +08:00
fullwall
be90295e10 Allow vulnerable projectiles to damage entities, implement NPCEnderTeleportEvent 2016-02-02 21:10:15 +08:00
fullwall
3ca1e03efe Add command to set any block as an NPC helmet 2016-01-25 22:59:45 +08:00
fullwall
4613839a8c Remove debug log 2016-01-24 20:05:38 +08:00
fullwall
0afd06a3f8 Add back a simple /npc script command 2016-01-23 23:00:46 +08:00
fullwall
21d3f86b7f Make /citizens reload behave more sanely with regards to trait listener unloading 2016-01-20 18:11:35 +08:00
fullwall
847652046e Respect cancelled on EntityDamageEvent 2016-01-19 10:03:30 +08:00
fullwall
23294552eb Allow Player NPCs to swim in water when not navigating 2016-01-15 23:35:27 +08:00
fullwall
ce561150b6 More correct yaw calculations for skin tracking 2016-01-15 15:29:12 +08:00
fullwall
11400b909d Set distance margin as block squared directly to reduce confusion, fix incorrect quotes in messages 2016-01-15 15:19:25 +08:00
fullwall
dafde6c3a1 Fix ender pearl NPCs 2016-01-12 23:21:52 +08:00
fullwall
7259ea9832 Formatting changes and more consistent LookClose comparator behaviour 2016-01-12 00:02:07 +08:00
fullwall
d7aefcf0db Set villager head yaw to current yaw every tick 2016-01-10 13:12:36 +08:00
fullwall
6e26252328 More realistic gravity 2016-01-10 00:12:17 +08:00
fullwall
ce8bc53b5b Use new trait name annotation 2016-01-07 22:25:09 +08:00
fullwall
3792407d80 Add some data to NPC before NPCSpawnEvent is called 2016-01-07 20:24:48 +08:00
fullwall
5fc5f23d8b Save head pose 2016-01-03 09:57:39 +08:00
fullwall
b0a4fe8e3d Minor resource cleanups 2016-01-03 00:53:11 +08:00
fullwall
bdede8fb79 Add new options to /npc pathopt, save modified options only if they are different from the settings 2016-01-03 00:33:08 +08:00
fullwall
be9fb19d39 Fix setSize causing drift for some entities 2016-01-01 14:59:49 +08:00
fullwall
14081192c3 Fix entity armor stand right click events 2016-01-01 13:15:19 +08:00
fullwall
fb2ebc0a31 Fix wither movement 2016-01-01 13:00:17 +08:00
fullwall
214b113575 Fix flying pathfinder not setting yaw correctly 2016-01-01 12:51:45 +08:00
fullwall
829cc1ef63 ArmorStand command and trait 2016-01-01 11:33:11 +08:00
fullwall
76c51248d5 Fix ocelot -s 2016-01-01 11:01:09 +08:00
fullwall
9c93897e2b Fix #552 2016-01-01 10:55:01 +08:00
fullwall
300ff53dfd Fix typo 2015-12-19 15:36:05 +08:00
fullwall
4b86f89d74 Don't import CraftServer when you need to be version independent 2015-12-19 14:51:23 +08:00
fullwall
6085f2233d Remove deprecated method and double check world when resetting player skins 2015-12-19 14:43:56 +08:00
fullwall
73c37eb7db Enable new target location mapping API and disable /npc gravity when navigating 2015-11-25 01:55:12 +08:00
fullwall
6cb0056b51 Fix rabbit movement 2015-11-24 01:17:06 +08:00
fullwall
35665695d1 Add /npc wither --charged 2015-11-16 21:36:00 +08:00
fullwall
997a14eb35 Implement new navigatorparameters settings 2015-11-06 07:17:47 +08:00
fullwall
2813508cc9 Make targeted NPCs update their path more frequently 2015-11-05 15:02:57 +08:00
fullwall
b36e62effd Fix despawn events not being called when NPC is killed while vulnerable 2015-11-02 19:53:04 +08:00
fullwall
e56cbb5e17 Make slime movement more natural 2015-11-01 00:51:37 +08:00
fullwall
d31ac463ff Don't use world full time as an update counter 2015-10-25 22:29:38 +08:00
fullwall
2d5a4593ff Fix bugs with rabbit, controllable 2015-10-24 17:07:24 +08:00
fullwall
5e5b2dc8c8 Fix /npc gravity for players 2015-10-24 15:46:09 +08:00
fullwall
11df61f74d Horse protection 2015-10-24 15:25:57 +08:00
fullwall
56fe2bb453 Merge branch 'master' of github.com:CitizensDev/Citizens2 2015-10-21 15:06:25 +08:00
fullwall
6556e03a53 Fix magma cube movement 2015-10-21 15:05:43 +08:00
JCThePants
9e3c401dc3 add SkinLayers trait and commands 2015-09-17 00:16:47 -07:00
JCThePants
82eab1e8f6 fix NPC skin layers sometimes don't show 2015-09-16 21:01:28 -07:00
JCThePants
4f0d477935 Fix NPE if NPC removed without spawning
Update players based on navigating NPC's. Update player when NPC navigates into players field of view.

Moved skin update tracker code to own class (SkinUpdateTracker)

fix use incorrect setting for tab list

rename PlayerListRemover to TabListRemover

rename recently added NMS#sendPlayerListRemove, #sendPlayerListAdd methods to #sendTabList*
2015-09-11 23:50:17 -07:00
fullwall
3950b273a5 Fix typos 2015-09-11 20:33:57 +08:00
fullwall
a61479f669 Add calls to addOrRemoveFromPlayerList 2015-09-11 20:18:31 +08:00
fullwall
44e1ea4af6 Fix #495 2015-09-11 20:13:30 +08:00
JCThePants
f0d6843867 Merge branch 'master' of https://github.com/CitizensDev/Citizens2 into skins2-2 2015-09-04 03:03:40 -07:00
JCThePants
5998bd76c3 bug fix and optimizations in NPC skins
fixed client sometimes disconnects for: Internal Exception: io.netty.handler.codec.DecoderException: java.io.IOException: Packet 0/56 (ki) was larger than I expected, found 917 bytes extra whilst reading packet 56;
changes in Skin#setNPCTexture

Allow retrieving Skin instance by skin name instead of entity so it can be retrieved without a spawned entity instance. Changes in Skin and SkinPacketTracker.

add SkinPacketTracker#onSpawnNPC

remove redundant scheduled skin update tasks in CitizensNPC and EventListen; provide no benefit

reset current SkinUpdateTracker instance if exists instead of creating a new one for all players in EventListen#onCitizensReload

reset rotation count in EventListen when player teleports/changes world/etc

reset update trackers for players nearby NPC's that spawn in case they are not looking at the NPC.
2015-09-04 03:03:15 -07:00
mcmonkey4eva
f2e2a418d9 Restore unintentionally deleted API method 2015-09-01 19:19:22 -07:00
JCThePants
37984f847b fix skin reload on citizens reload
reset skin and profile fetcher cache on citizens reload

fix -p flag in skin command not implemented

use latest skin by default

fix Property created for cached skins uses incorrect name

fix rotation based skin update in EventListen.SkinUpdateTracker

remove redundant skin update on first move in EventListen.SkinUpdateTracker

re-implement skin fetch retry; re-add settings (since reloading can cause too many requests)
2015-08-29 07:22:30 -07:00
fullwall
ec3b184f72 Fix NPE 2015-08-29 15:39:03 +08:00
JCThePants
3223ba53f6 Fix NPC's are not visible sometimes
...Fixed invisible NPC's by allowing new update tasks to cancel current
tasks instead of cancelling the new task in SkinPacketTracker#updateViewer

cancel packets in SkinPacketTracker#updateViewer after getting PlayerEntry to ensure current scheduled tasks are cancelled.

remove LinkedList, replace with ArrayDeque

ensure EventListen#recalculatePlayer does not execute for NPC's

do a little less work in EventListen.SkinUpdateTracker#shouldUpdate

don't add skinnable entity to pending map if using cache skin - Skin#apply

remove redundant fetch per NPC in Skin; Skin can already fetch once for itself

fix and improve thread safety for profile fetcher; prevent external access
to threads Runnable interface; honor subscriber always invoked from main
thread.

rename ProfileFetchSubscriber to ProfileFetchHandler since subscriber implies the handler will be used continuously
2015-08-26 21:34:56 -07:00
JCThePants
8d3ab22212 merge master, fix conflicts 2015-08-25 14:29:59 -07:00
JCThePants
f8fdd55c65 improve player NPC skins
add skin packages with skin classes

add profile package with profile fetcher classes

update commands

update EventListen

update NMS

fix radius squared

fix exception message

fix npc sometimes not removed from playerlist

fix cannot add npc to playerlist

code/comment cleanup and refactoring

remove unused skin settings

removed NPC_SKIN_RETRY_DELAY, MAX_NPC_SKIN_RETRIES

current code uses cached textures if a skin profile request fails.

add setting for updating skin

added NPC_SKIN_UPDATE: true to always get the latest skin, false to use cached skin if available, default is false.

minor code fixes, refactoring, add settings

removed assert

removed thread checks

added setting: NPC_SKIN_VIEW_DISTANCE

added setting: NPC_SKIN_UPDATE_DISTANCE

added setting: MAX_PACKET_ENTRIES

invoke EventListen#SkinUpdateTracker#reset from within #shouldUpdate instead of requiring it to be invoked manually.

fix cached locations not used in EventListen#getNearbySkinnableNPCs

clamp yaw in EventListen.SkinUpdateTracker

use static constants

rename EntitySkinnable to SkinnableEntity

add SkinnableEntity interface to PlayerNPC (CraftPlayer)

remove unused code from PlayerListRemover

replace Subscriber with direct notification to entity via method

Undo EntityController interface changes

moved skin code from HumanController to CitizensNPC

fix npcs sometimes do not show

... due to packet tracker not being notified that remove packets have been cancelled

fix imports rearranged by incorrect IDE settings
2015-08-25 14:17:43 -07:00
fullwall
b2d9c0dd73 Merge branch 'master' of github.com:CitizensDev/Citizens2 2015-08-25 23:42:16 +08:00
fullwall
a911c3dd34 Fix player NPCs not working with /npc name 2015-08-25 23:41:37 +08:00
fullwall
fef6ddc5fc Update EventListen.java 2015-08-25 23:21:23 +08:00
fullwall
6419d7a17c Set pathing delay to be same as Minecraft's 2015-08-25 22:07:03 +08:00
fullwall
2f0c1949c2 Fixes 2015-08-25 21:52:10 +08:00
fullwall
2645dc40f7 Merge branch 'master' of github.com:CitizensDev/Citizens2 2015-08-23 17:36:28 +08:00
fullwall
677a85352a Fix /npc name visibility not toggling off, fix minecart NPCs being destroyable 2015-08-23 17:36:01 +08:00
fullwall
fbfd9db7ce Update NPCCommands.java 2015-07-30 10:51:45 +08:00
fullwall
38fb49bade Rework controllable logic to incorporate speed 2015-07-22 15:13:35 +08:00
fullwall
62a9cad24d Fix some bugs 2015-07-19 14:51:51 +08:00
fullwall
27eb290eb3 Fix changing an NPC's speed mid-path 2015-07-15 15:51:38 +08:00
fullwall
fd5c09d594 Potentially fix memory leak 2015-07-03 00:33:04 +08:00
fullwall
c53808f1cf Move blockbreaker to API 2015-06-25 23:53:26 +08:00
fullwall
b1d74c50c8 Add /npc guardian 2015-06-10 00:09:17 +08:00
fullwall
20dcfd0a22 Change version checking to be rename based 2015-06-09 23:38:33 +08:00
fullwall
f0ee7e7cfa Fix item frame NPCs 2015-06-09 01:08:29 +08:00
fullwall
0af9ab304a Merge branch 'master' of github.com:CitizensDev/Citizens2 2015-06-06 12:24:35 +08:00
fullwall
176f8dd9ad Add 1.8.7 as compatible 2015-06-06 12:24:09 +08:00
fullwall
6e8951c733 Update HumanController.java 2015-06-04 12:00:16 +08:00
fullwall
00361a6438 Update HumanController.java 2015-06-03 17:05:26 +08:00
fullwall
3203a78e90 Enable new maximum name length 2015-06-03 00:42:50 +08:00
fullwall
dbb90eb985 Set protected metadata on spawn 2015-06-01 11:40:21 +08:00
fullwall
0fa1dff4d6 Fix guardian update method 2015-05-26 19:30:58 +08:00
mcmonkey
8578372ccd Bump the compatible version number 2015-05-25 11:20:58 -07:00
Sanjay Govind
8eec2e2797 1.8.5 - no nms changes. 2015-05-23 22:35:53 +12:00
Sanjay Govind
6a416bd7e1 missed a deobsufacated field 2015-05-20 21:55:16 +12:00
Sanjay Govind
70e2b07d51 Update to 1.8.4 2015-05-19 21:59:38 +12:00
fullwall
797adff2e7 Remove DB settings 2015-05-17 12:33:59 +08:00
fullwall
df3e46f3e8 Merge pull request #362 from JCThePants/JCThePants-patch-6
Re-add ignoreCancelled into onChunkUnload event handler
2015-05-05 12:58:33 +08:00
mcmonkey4eva
3e718bc049 Handle another needs-packet-sending event, fixes #364 2015-05-02 12:52:21 -07:00
JCThePants
991f5219f1 Re-add ignoreCancelled into onChunkUnload event handler 2015-05-01 08:10:05 -07:00
fullwall
639bdb2e31 Merge pull request #344 from mcmonkey4eva/master
Make wolf angriness work, fixes #343
2015-04-17 17:35:10 +08:00
mcmonkey4eva
e6372ddbbd Make wolf angriness work, fixes #343 2015-04-15 15:39:20 -07:00
Tobias Kunicke
24a27322aa adding permission-node .npc.sound to plugin.yml 2015-04-11 19:40:26 +02:00
mcmonkey4eva
b5db658549 Fix build 2015-04-07 12:16:51 -07:00
fullwall
97e0183e12 Merge pull request #231 from sanjay900/master
Fix npc mounting, add permanent skins to player npcs
2015-04-07 22:18:24 +08:00
mcmonkey4eva
38ab44b55e Fix distance calcuation bug 2015-04-06 16:44:34 -07:00
mcmonkey4eva
ad46c38ebe Fix more situations of skins not loading properly 2015-04-06 15:59:05 -07:00
mcmonkey4eva
8a52f81ae5 Delay calculating skin updates a bit, partially fixes the skin issue! 2015-04-06 15:32:00 -07:00
mcmonkey4eva
62c6b724df Double send skin packet, dont missend it - helps the skin issue 2015-04-06 14:47:25 -07:00
mcmonkey4eva
5292425c9f Fix EntityTypes usage, fixes #239 2015-04-06 14:12:41 -07:00
fullwall
f64b40ad02 Fix ghast not updating 2015-04-05 17:30:25 +08:00
fullwall
98b2f274fc Fix rabbit movement 2015-04-05 17:18:07 +08:00
fullwall
7d6a3f476b Merge pull request #304 from JCThePants/JCThePants-patch-5
Fix NPC despawned if chunk unload is cancelled
2015-03-30 19:08:44 +08:00