Code Monkey home page Code Monkey logo

npc's Introduction

NPC

The NPC plugin for PocketMine-MP

This plugin is designed for PocketMine-MP and may not work with other spoons or forks.

command usage
/npc create [type] [name] [skinPath(optional)] [geometryPath(optional) Create an entity.
/npc remove Remove an entity.
/npc edit [message/command/scale] [args...] Edit an entity.
/npc get Get an entities.

Feature

Doesn't use entity class.

You can create & modify the entities you want.

You can apply your own skin.

Modeling can also be applied.

If you want to apply modeling, you need to put geometryName: "your geometry name" in the json file created with BlockBench.

Custom Modeling usage

npc's People

Contributors

alvin0319 avatar poggit-bot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

npc's Issues

NPC Api

Issue Description

What do you want to change?

  • Function 1: NPC Api For Plugins Can You add It

Additional content
Add NPCApi so i can use it for my plugins pls add it thx
....

Geometryc Bug

When I'm creating an npc with customizable skin the server is closing, I'm giving the command /npc create npc Teste Teste.png Teste.json

Error: Unknown size
File: src/pocketmine/network/mcpe/protocol/types/SkinImage
Line: 61
Type: InvalidArgumentException

A PLUGIN WAS INVOLVED IN THIS CRASH
BAD PLUGIN: NPC v1.0.9

Code:
[52] return new self(32, 64, $data);
[53] case 64 * 64 * 4:
[54] return new self(64, 64, $data);
[55] case 128 * 64 * 4:
[56] return new self(64, 128, $data);
[57] case 128 * 128 * 4:
[58] return new self(128, 128, $data);
[59] }
[60]
[61] throw new \InvalidArgumentException("Unknown size");
[62] }
[63]
[64] public function getHeight() : int{
[65] return $this->height;
[66] }
[67]
[68] public function getWidth() : int{
[69] return $this->width;
[70] }
[71]

How do you reproduce it?

  • Step 1: I'm using this geometry.json file:

{
"format_version": "1.10.0",
"geometryName": "Teste",
"Teste": {
"texturewidth": 16,
"textureheight": 16,
"visible_bounds_width": 2,
"visible_bounds_height": 1,
"visible_bounds_offset": [0, 0, 0],
"bones": [
{
"name": "unknown_bone",
"pivot": [0, 0, 0],
"cubes": [
{"origin": [-8, 0, -1], "size": [16, 16, 1], "uv": [0, 0]}
]
}
]
}
}

  • Step 2: I using this image:
    Teste

Your System information

  • OS: Linux

  • Your PocketMine-MP Version: Last

  • Plugin Version: Last

NPCTag - Update

Issue Description

What do you want to change?

  • NPCTag Update.
    I will get update the Nametag of the NPC every 2 - 5 Seconds when its possible

Additional content

....

[Bug] /npc create Doesnt Work

Everytime I do /npc create (mob) (name) I get anerror. Some mobs do work, the only one I could find was cow. Looking at the code(line 40 customentity.php) it seems todo with the entitey width.

NPC doesn't tell player when NPC type is NPCHuman

Issue Description

NPC doesn't tell or execute command when NPC type is NPCHuman

How do you reproduce it?

  • Step 1: Create a NPC that type is npc

  • Step 2: add command and try interact to them

Your System information

  • OS: Windows

  • Your PocketMine-MP Version: Lastest Version

  • Plugin Version: 1.0.4

NPC 플러그인 오류

[15:19:58|DEBUG]: #0 plugins/NPC(Plugin)/src/alvin0319/NPC/task/NPCCheckTask(24): alvin0319\NPC\entity\EntityBase->getClosestPlayer()
[15:19:58|DEBUG]: #1 src/scheduler/TaskHandler(122): alvin0319\NPC\task\NPCCheckTask->onRun(integer 1)
[15:19:58|DEBUG]: #2 src/scheduler/TaskScheduler(150): pocketmine\scheduler\TaskHandler->run(integer 1)
[15:19:58|DEBUG]: #3 src/plugin/PluginManager(438): pocketmine\scheduler\TaskScheduler->mainThreadHeartbeat(integer 1)
[15:19:58|DEBUG]: #4 src/Server(1654): pocketmine\plugin\PluginManager->tickSchedulers(integer 1)
[15:19:58|DEBUG]: #5 src/Server(1557): pocketmine\Server->tick()
[15:19:58|DEBUG]: #6 src/Server(1133): pocketmine\Server->tickProcessor()
[15:19:58|DEBUG]: #7 src/PocketMine(265): pocketmine\Server->__construct(object BaseClassLoader, object pocketmine\utils\MainLogger, string[32] C:\TrueToneServer\TrueTone-Main\, string[40] C:\TrueToneServer\TrueTone-Main\plugins\)
[15:19:58|DEBUG]: #8 src/PocketMine(288): pocketmine\server()
[15:19:58|EMERGENCY]: 복구 불가능한 오류가 발생해 서버가 강제 종료되었습니다. 충돌 덤프를 생성합니다
[15:19:58|EMERGENCY]: "C:\TrueToneServer\TrueTone-Main\crashdumps/Tue_Mar_10-15.19.58-ACDT_2020.log" 파일을 충돌 보관소에 업로드하고 버그 보고 페이지에 링크를 제출해주세요. 가능한 한 많은 정보를 주시기 바랍니다.



[15:19:58|CRITICAL]: Error: "Call to a member function getFolderName() on null" (EXCEPTION) in "plugins/NPC(Plugin)/src/alvin0319/NPC/entity/EntityBase" at line 250
[15:19:58|DEBUG]: #0 plugins/NPC(Plugin)/src/alvin0319/NPC/entity/NPCHuman(124): alvin0319\NPC\entity\EntityBase->nbtSerialize()
[15:19:58|DEBUG]: #1 plugins/NPC(Plugin)/src/alvin0319/NPC/NPCPlugin(97): alvin0319\NPC\entity\NPCHuman->nbtSerialize()
[15:19:58|DEBUG]: #2 src/plugin/PluginBase(146): alvin0319\NPC\NPCPlugin->onDisable()
[15:19:58|DEBUG]: #3 src/plugin/PluginManager(426): pocketmine\plugin\PluginBase->onEnableStateChange(boolean )
[15:19:58|DEBUG]: #4 src/plugin/PluginManager(415): pocketmine\plugin\PluginManager->disablePlugin(object alvin0319\NPC\NPCPlugin)
[15:19:58|DEBUG]: #5 src/Server(1369): pocketmine\plugin\PluginManager->disablePlugins()
[15:19:58|DEBUG]: #6 src/Server(1529): pocketmine\Server->forceShutdown()
[15:19:58|DEBUG]: #7 src/Server(1457): pocketmine\Server->crashDump()
[15:19:58|DEBUG]: #8 src/Server(1136): pocketmine\Server->exceptionHandler(object Error)
[15:19:58|DEBUG]: #9 src/PocketMine(265): pocketmine\Server->__construct(object BaseClassLoader, object pocketmine\utils\MainLogger, string[32] C:\TrueToneServer\TrueTone-Main\, string[40] C:\TrueToneServer\TrueTone-Main\plugins\)
[15:19:58|DEBUG]: #10 src/PocketMine(288): pocketmine\server()
[15:19:58|EMERGENCY]: Crashed while crashing, killing process```

Please add Entity size and items

Hi Your plugin is awesome but i cant the npc size it and another problem Entity can not hold a item in the hand and all another plugins say this plugin this no a Entity {Playerhead}

Npc stop the server

Issue Description
When two player go close to the npc the server crash
Your System information
I uso minehub to hoste

*I use android /window 10

  • Your PocketMine-MP Version:

  • Plugin Version:
    NPC v1.0.2

Code:

Backtrace:

PocketMine-MP version: 3.12.0 [Protocol 390]
Git commit: 77d45bf11674a1360f58e32a14a3b09f423d860c
uname -a: Linux 1ce6636e4a86 4.19.0-0.bpo.6-amd64 #1 SMP Debian 4.19.67-2+deb10u1~bpo9+1 (2019-09-30) x86_64
PHP Version: 7.3.6
Zend version: 3.3.6
OS : Linux, linux

THIS CRASH WAS CAUSED BY A PLUGIN
BAD PLUGIN: NPC v1.0.2

===BEGIN CRASH DUMP===
eNq1Wm1zozgS/isu39bVbm2MAb/F+XLlOMlMduKML/a83A5bKRlkozEgVggnZGvut1+LV4nkxnaW
mcok0EDreboldaulv9prynzE73eYRYQG7TPzpM2Jj9tnxuB0NB73++bgpI0Zo6x99lebJyE8al/e
X97dvb9rn7R9HEVoI2S3OOIk2LQ8vMNei1PacjAOW50Ww3YMyncYBCEOHBzYyb/g0zXxxHehF29I
EHVv59MvE29HAr1njP9o/Wz8ooUuYt2I2V1UyMVbXRxwwpPuZfrnHEUYlHkkEJhN49tJrvGeBDvq
7bAPr0MzDgEcvF08FYDnU7i1qQMffvkDaDNk55cbHGCGPME4QMIY7Tm1t5jPoJXObA6fraDZymjt
nmaYmi7kMfEcADIa907aJLp38K59tkZehKFlRjm1KajtjXVohAhco5HTH6zWhjEc9ZHRG+rrwSnu
mcjoo95KH6/7Zs85Heo26GZo65EVfKMXrcU5uhsSxI8tw8bDYW+I++h02OprxljTO7q2Cqk27CDf
GfZb/zBai9m8dYFXBAXZK8NRx/zVwStDj43/wrvjX43Wz6ZujDv6uNPTf2k9ng7vh31hODcUeLWe
NoS7J/BkSjy7hYf3NCqggCC98dKb0iWRMOi5s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Av/2vmf4387/D1fpUaha48E/8PIfqG0TiMlOmmFO1ZLUxd5Ifv15Br
4MaKGLJOyyqQHLEHjthWHWOZoBbZVCJvfR9+4N9xVTJ5HfIdSq7vu0I5DLgUiyCTYzp2eimAdnMN
og7q4ogvXBrKVdBSpqY6ZnpcRCIuhn26nMbst/ntcRHjMPIlFMuSUR1LPKQbuOtQFkIfRxvcrZSJ
wQrp/8RTgkou2dODJ4EjCqxv37z7Edwr7TAYM0DlxSF9+Q6HiLA7LDgpA7T24PtnGCApWDHkEn+2
MMQeulxE/QGkSdaYZakgjxjBydyjygjOBCrLoWbUDgR8IvgJJJePj4iJt07aX1FEg4ckCGopXv/o
+KIs8fPjaDTAoiJ3Weav6VbnxeVHkjef7pIueOKl1ddLFCVT6vsocETdZp0XsXOrZRzBSAXX7+zc
pmUvZ4cCGzvviJICK2K1NNKr9/2G9j9eXGHJy7sKUQO7IgrBb+JwW7lTrSW+J6wDANOUWwsZDTHj
RJytEOIQMbASTHU5D/zIcRClm1dgwSllWDpi5yAu34KmIIo8SRLayvvRnx7A78mH9LLzgsXtyvbT
gmwpsJEHJkRMFrEk5DQ9wpPt5Nj5mc/yhZjJGL5G+WgYpc6FPgXspOdrLp8a3DjyjS8/ciF3kMlw
JJDJ7y/mN9Jdes7UyY5DZmURfxVxRiAxr17yEzBKelAxv2oNxJaO2XHwrtVpmbox0Pv6CC5/unbO
WiPbhp/xEA9Hg/XQGZl4YK/1tTkcrfun2BiObBOtVmav9VNq/YDLlpi7iiGrXnFvu3GwjTkRBx7F
4c3UUiGNyKP8Pndhphb9Oc3JDHFy9KSdH56lwSbOjFF8fofXokyRDa3SaK5PZZtGKYZI7lNRvqwe
ww3ZrEiAWJJXpIUNOd3igDwpLkxQ2qtFFU2shp5ImKWcg/Q2NSwpX//27X+41B76
===END CRASH DUMP===

Not work in 1.16

Please, update the plugin to the new version mcpe 1.16

TypeError: "Argument 2 passed to alvin0319\NPC\util\Promise::setNow() must be of the type string, array given, called in phar:///plugins/NPC-stable.phar/src/alvin0319/NPC/util/Promise.php on line 50" (EXCEPTION) in "plugins/NPC-stable.phar/src/alvin0319/NPC/util/Promise" at line 59

cant save합니다 빈앨님

TypeError: "Argument 1 passed to pocketmine\nbt\tag\CompoundTag::setTag() must be an instance of pocketmine\nbt\tag\NamedTag, string given, called in /mnt/c/Users/hyuns/MCPE server/plugins/NPC-stable/src/alvin0319/NPC/entity/NPCHuman.php on line 120" (EXCEPTION) in "vendor/pocketmine/nbt/src/tag/CompoundTag" at line 135

서버 끌시 오류나면서 그동안 작업한 NPC파일에 저장이 되지 않습니다.
php 사용버전: 7.3
서버 api: 3.11.3

How use geometry?

Plugin Version is Latest

How do you apply geometry to npc?
Only me got an error?

Mobs + Non-NPC

When I create another villager or any mob, The 1 Mob will be vanish

For Non-NPC like when i hit players or mobs the Message
"[NPC] This Entity is not a NPC"

How to add Custom geometry?

How can I add my custom geometry? can you give me an example? I keep getting "the GeometryName was not found"

The plugin doesn't load

This plugin doesn't work in my servers I think it is not loading and it can't be seen by /pl.
I tried lot of times but not working
It doesn't create plugin data in folder.

Geometry

how to create a geometric shape?

World Bug

I saw that only NPC that are in the main world, they get save but if u put a NPC in other world that is not the Main world, this npc dont get save in the data

Server Crashes after 30 minutes

13:52:19] [Server thread / EMERGENCY]: An unrecoverable error has occurred and the server crashed. Create a crash dump ...

[13:52:19] [Server thread / EMERGENCY]: Please upload the "/home/minecraft/crashdumps/Mon_Jan_6-13.52.19-CET_2020.log" file into the crash archive and submit the link on the bug Reporting page. Provide as much information as possible.

floating text, no body

can you make it like slapper's falling sand but it just spawns a floating text and no entity body

NPC can't hold item

Issue Description

Now, the NPC can't hold item.

so it need to hold item.

What do you want to change?

API Changes

  • Add EntityBase->setHeldItem(Item $item) : void method
  • Add /npc edit item command
    ....

how to configuration file geometryName?

Issue Description

I try to load geometry.json file, but always get message "GeometryName does not exist in the geometry file"

please explanation configuration file geometryName more detailed 🙏.

Applying skin and geometry on CustomEntity

I have a question, how can I apply skin and geometry on CustomEntity?

I checked the source code of the CustomEntity class and BaseEntity class found that there is no skin property in these two classes and they don't extend from the Pocketmine-MP Entity class either.

Do I use the NPCHuman class if I want to apply skin and geometry?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.