Commit Graph

1597 Commits

Author SHA1 Message Date
fullwall
44e1ea4af6 Fix #495 2015-09-11 20:13:30 +08:00
fullwall
dd37eb25d3 Merge pull request #502 from JCThePants/skins2-2
bug fix and optimizations in NPC skins
2015-09-05 12:01:20 +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
mcmonkey
fbb786c365 Merge pull request #501 from mcmonkey4eva/master
Restore unintentionally deleted API method
2015-09-01 19:22:05 -07:00
mcmonkey4eva
f2e2a418d9 Restore unintentionally deleted API method 2015-09-01 19:19:22 -07:00
fullwall
c6e38158a0 Merge pull request #496 from JCThePants/skins2-1
fix skin reload on citizens reload
2015-08-30 13:59:36 +08: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
fullwall
7ff746a5b6 Merge pull request #490 from JCThePants/skins2
Improve player NPC skins
2015-08-27 21:13:59 +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
mcmonkey
c8053f9d68 Update POM.XML to latest Bukkit, Vault 2015-07-02 15:19:18 -07: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
c2416d989e Update the readme 2015-05-25 11:21:15 -07:00
mcmonkey
8578372ccd Bump the compatible version number 2015-05-25 11:20:58 -07:00
mcmonkey
0fcb334c7f Re-bump version number 2015-05-25 11:19:53 -07:00
fullwall
eccd97b90e Bump API version 2015-05-25 21:55:25 +08:00
fullwall
0b99a83781 Bump version number 2015-05-25 21:54:44 +08:00
fullwall
2ef5774acc Merge pull request #381 from sanjay900/master
Update to 1.8.4/5
2015-05-25 21:53:53 +08:00
Sanjay Govind
49a7801d42 Update pom 2015-05-23 22:48:41 +12: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
fullwall
a4ee12c18a Merge pull request #365 from mcmonkey4eva/master
Handle another needs-packet-sending event
2015-05-05 12:58:19 +08:00