Commit Graph

1375 Commits

Author SHA1 Message Date
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
fullwall
39ff48ca77 Merge pull request #518 from JCThePants/skins2-5
Add SkinLayers trait and skinlayers command
2015-09-17 22:26:58 +08:00
JCThePants
9e3c401dc3 add SkinLayers trait and commands 2015-09-17 00:16:47 -07:00
fullwall
446e4d2ef0 Merge pull request #516 from JCThePants/skins2-4
fix NPC skin layers sometimes don't show (Issue #505)
2015-09-17 12:48:34 +08:00
JCThePants
82eab1e8f6 fix NPC skin layers sometimes don't show 2015-09-16 21:01:28 -07:00
fullwall
f204fc1ecf Merge pull request #514 from JCThePants/skins2-3
Fix NPE, improve navigating NPC skins, fix tablist setting
2015-09-12 19:55:45 +08: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
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