Skip to content
This repository has been archived by the owner on Apr 19, 2021. It is now read-only.

Commit

Permalink
Update to 3.0.0-Alpha12 (#300)
Browse files Browse the repository at this point in the history
* PureEntities: Update NBT Access methods.

* PEXCustomLogger: Remove TextFormat::toANSI per API change.

* AutoSpawnTask: Muliple Updates -
Update Hard Limit for Mob Caps for performance.
Modify valid dry spawn conditions to avoid spawining in side of blocks.

* CreatureSpawnEvent: Add debug message.

* NBTConst: Added additional keys from MobEquipment and IdlingComponents

* BaseEntity: Remove use of Timings (temporarily) and change updateMovement to comply with new API.

* WalkingMonster: Remove use of Timings (temporarily)

* SwimmingMonster: Remove use of Timings (temporarily)

* JumpingMonster: Remove use of Timings (temporarily)

* FlyingMonster: Remove use of Timings (temporarily)

* ZombieVillager: Remove use of Timings (temporarily)

* ZombiePigman: Remove use of Timings (temporarily)

* Zombie: Remove use of Timings (temporarily)

* Witch: Remove use of Timings (temporarily)

* Vindicator: Remove use of Timings (temporarily)

* Stray: Remove use of Timings (temporarily)

* Skeleton: Remove use of Timings (temporarily)

* Evoker: Remove use of Timings (temporarily)

* WalkingAnimal: Remove use of Timings (temporarily)

* SwimmingAnimal: Remove use of Timings (temporarily)

* FlyingAnimal: Remove use of Timings (temporarily)

* MobEquipment: Multiple changes -
Update Item Types
Move Internal Keys to NBTConst
Change NBT Access methods to comply with new API

* IdlingComponent: Updated NBT Access methods to comply with new API and moved internal constants to NBTConst.

* Sheared: Remove unnecessary variable declaration.

* Tamable: Fix misspelling.

* EventListener: Updated NBT Access methods for compatibility.  Updated NBT Keys to use constants.  Added some debug messgaes.

* Spawner: Multiple Changes
Updated NBT access methods to comply with new API
Added Debug Messages
Converted NBT Keys to constants for uniformity
Changed Methods for storing default values.
Moved NBT Retrieval from __construct to loadNBT
Added (currently unused) missing NBT keys

* NBTConst: Added Spawner Keys

* plugin.yml: Update to 3.0.0-ALPHA12 and update version number to reflect changes.

* README: Update target version number to reflect current 3.0.0-ALPHA12 release.

* MobEquipment: Add Missing NBT Settings Check

* MobEquipment:  Update Entity Item type to work with newer API

* Tameable:  Update NBT Methods to force tag types when saving and handle incorrect types when retrieving.

* BreedingComponent:  Update NBT Methods to force tag types when saving and handle incorrect types when retrieving.

* Parrot:  Update NBT Methods to force tag types when saving and handle incorrect types when retrieving.

* MooShroom:  Update NBT Methods to force tag types when saving and handle incorrect types when retrieving.

* Mooshroom: Fix Formatting

* Ocelot:  Update NBT Methods to force tag types when saving and handle incorrect types when retrieving.

* Sheep:  Update NBT Methods to force tag types when saving and handle incorrect types when retrieving.

* Sheep: Fix Formatting

* MagmaCube:  Update NBT Methods to force tag types when saving and handle incorrect types when retrieving.

* Slime:  Update NBT Methods to force tag types when saving and handle incorrect types when retrieving.

* CaveSpider:  Fix Poison effect.

* Creeper: Update NBT Methods to force tag types when saving and handle incorrect types when retrieving.

* Husk: Fix Hunger Effect

* Wolf: Update NBT Methods to force tag types when saving and handle incorrect types when retrieving.

* BaseEntity: Update NBT Methods to force tag types when saving and handle incorrect types when retrieving.
  • Loading branch information
95CivicSi committed Apr 19, 2018
1 parent becaafa commit a9d97fa
Show file tree
Hide file tree
Showing 40 changed files with 338 additions and 271 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
[![Poggit-CI](https://poggit.pmmp.io/ci.badge/RevivalPMMP/PureEntitiesX/PureEntitiesX)](https://poggit.pmmp.io/ci/RevivalPMMP/PureEntitiesX/PureEntitiesX)
=====

### Compatible PocketMine-MP Version: 1.7dev-743 https://github.com/pmmp/PocketMine-MP/releases/tag/1.7dev-743
### Compatible PocketMine-MP Versions: 1.7dev-937 https://github.com/pmmp/PocketMine-MP/releases/tag/api%2F3.0.0-ALPHA12

Currently being revived by 95CivicSi - Stay tuned for more updates

PureEntitiesX is currently in Alpha level development while PocketMine-MP works towards reaching a stable API version. This means that there is no stable release of PureEntitesX and changes are being made very frequently. Please bear with us as we work towards a complete MobAI solution. The most reliable versions of PureEntitiesX will be released to Poggit (https://poggit.pmmp.io/p/PureEntitiesX/). Released versions will be updated to work with released versions of PocketMine-MP (found here: https://github.com/pmmp/PocketMine-MP/releases). This means that if you are using the latest build of PocketMine-MP from jenkins.pmmp.io or directly from the PocketMine-MP master branch, then PureEntitiesX may not work as those versions are constantly being changed and updated with new items daily (sometimes multiple times per day).

If you are having issues, feel free to report them using the issue template provided. The more accurate your issue report, the more likely it is that we can help resolve your problem. If you are not sure about reporting your issue, feel free to connect with us on Gitter (link above).
If you are having issues, feel free to report them using the issue template provided. The more accurate your issue report, the more likely it is that we can help resolve your problem. If you are not sure about reporting your issue, feel free to connect with us on Gitter (link above).
4 changes: 2 additions & 2 deletions plugin.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: PureEntitiesX
main: revivalpmmp\pureentities\PureEntities
version: 0.4.0
api: [3.0.0-ALPHA11]
version: 0.4.1
api: [3.0.0-ALPHA11, 3.0.0-ALPHA12]

load: STARTUP
authors: ["milk0417", "RevivalPMMP"]
Expand Down
2 changes: 1 addition & 1 deletion src/revivalpmmp/pureentities/PEXCustomLogger.php
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ protected function send($message, $level, $prefix, $color){
$threadName = (new \ReflectionClass($thread))->getShortName() . " thread";
}

$message = TextFormat::toANSI(TextFormat::AQUA . "[" . date("H:i:s", $now) . "] " . TextFormat::RESET . $color . "[" . $threadName . "/" . $prefix . "]:" . " " . $message . TextFormat::RESET);
$message = TextFormat::AQUA . "[" . date("H:i:s", $now) . "] " . TextFormat::RESET . $color . "[" . $threadName . "/" . $prefix . "]:" . " " . $message . TextFormat::RESET;
$cleanMessage = TextFormat::clean($message);

foreach($this->attachments as $attachment){
Expand Down
2 changes: 1 addition & 1 deletion src/revivalpmmp/pureentities/PureEntities.php
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ public function onCommand(CommandSender $sender, Command $command, string $label
foreach(Server::getInstance()->getLevels() as $level){
foreach($level->getEntities() as $entity){
if(count($args) === 0){
if(!$entity instanceof Player and isset($entity->namedtag->generatedByPEX)){
if(!$entity instanceof Player and $entity->namedtag->hasTag("generatedByPEX")){
$entitiesRemoved[] = clone($entity);
$entity->close();
$entitiesRemoved[] = $entity;
Expand Down
17 changes: 9 additions & 8 deletions src/revivalpmmp/pureentities/components/BreedingComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,19 +131,20 @@ public function __construct(Entity $belongsTo){

public function loadFromNBT(){
if(PluginConfiguration::getInstance()->getEnableNBT()){
if(($age = $this->entity->namedtag->getInt(NBTConst::NBT_KEY_AGE, NBTConst::NBT_INVALID_INT)) !== NBTConst::NBT_INVALID_INT){
$this->age = $age;

if($this->entity->namedtag->hasTag(NBTConst::NBT_KEY_AGE)){
$this->age = $this->entity->namedtag->getInt(NBTConst::NBT_KEY_AGE, 0, true);
}
if(($inLove = $this->entity->namedtag->getInt(NBTConst::NBT_KEY_IN_LOVE, NBTConst::NBT_INVALID_INT)) !== NBTConst::NBT_INVALID_INT){
$this->inLove = $this->entity->namedtag[NBTConst::NBT_KEY_IN_LOVE];
if($this->entity->namedtag->hasTag(NBTConst::NBT_KEY_IN_LOVE)){
$this->inLove = $this->entity->namedtag->getInt(NBTConst::NBT_KEY_IN_LOVE, 0, true);
}
}
}

public function saveNBT(){
if(PluginConfiguration::getInstance()->getEnableNBT()){
$this->entity->namedtag->setInt(NBTConst::NBT_KEY_AGE, $this->age);
$this->entity->namedtag->setInt(NBTConst::NBT_KEY_IN_LOVE, $this->inLove);
$this->entity->namedtag->setInt(NBTConst::NBT_KEY_AGE, $this->age, true);
$this->entity->namedtag->setInt(NBTConst::NBT_KEY_IN_LOVE, $this->inLove, true);
}
}

Expand All @@ -152,8 +153,8 @@ public function saveNBT(){
*/
public function init(){
$this->loadFromNBT();
$this->setAge($this->getAge());
$this->setInLove($this->getInLove());
$this->setAge($this->age);
$this->setInLove($this->inLove);
}

/**
Expand Down
57 changes: 20 additions & 37 deletions src/revivalpmmp/pureentities/components/IdlingComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
use pocketmine\entity\Creature;
use pocketmine\entity\Entity;
use pocketmine\nbt\tag\CompoundTag;
use pocketmine\nbt\tag\IntTag;
use pocketmine\Player;
use revivalpmmp\pureentities\data\NBTConst;
use revivalpmmp\pureentities\entity\BaseEntity;
use revivalpmmp\pureentities\features\IntfCanBreed;
use revivalpmmp\pureentities\PluginConfiguration;
Expand All @@ -41,20 +41,6 @@
*/
class IdlingComponent{

const NBT_KEY_IDLE_SETTINGS = "IdleSettings"; // compound tag

const NBT_KEY_IDLING = "Idling"; // BooleanTag

const NBT_KEY_IDLING_COUNTER = "IdlingCounter"; // IntTag

const NBT_KEY_MAX_IDLING_COUNTER = "MaxIdlingCounter"; // IntTag

const NBT_KEY_IDLING_TICK_COUNTER = "IdlingTickCounter"; // IntTag

const NBT_KEY_MAX_IDLING_TICK_COUNTER = "MaxIdlingTickCounter"; // IntTag

const NBT_KEY_LAST_IDLE_STATUS = "LastIdleStatus"; // IntTag

protected $idling = false;
/**
* @var TickCounter
Expand Down Expand Up @@ -224,19 +210,19 @@ public function isIdling(){
public function loadFromNBT(){
if(PluginConfiguration::getInstance()->getEnableNBT()){
$namedTag = $this->baseEntity->namedtag;
if(isset($namedTag->IdleSettings)){
$nbt = $namedTag->IdleSettings;
if($namedTag->hasTag(NBTConst::NBT_KEY_IDLE_SETTINGS)){
$nbt = $namedTag->getCompoundTag(NBTConst::NBT_KEY_IDLE_SETTINGS);
/**
* @var $nbt CompoundTag
* @var CompoundTag $nbt;
*/
$this->idling = $nbt[self::NBT_KEY_IDLING];
$this->idling = $nbt->getInt(NBTConst::NBT_KEY_IDLING, 1, true);
if($this->idling){
$this->idlingCounter = new TickCounter($nbt[self::NBT_KEY_MAX_IDLING_COUNTER]);
$this->idlingCounter->setCurrentCounter($nbt[self::NBT_KEY_IDLING_COUNTER]);
$this->idlingTickCounter = new TickCounter($nbt[self::NBT_KEY_MAX_IDLING_TICK_COUNTER]);
$this->idlingTickCounter->setCurrentCounter($nbt[self::NBT_KEY_IDLING_TICK_COUNTER]);
$this->idlingCounter = new TickCounter($nbt->getInt(NBTConst::NBT_KEY_MAX_IDLING_COUNTER, 0, true));
$this->idlingCounter->setCurrentCounter($nbt->getInt(NBTConst::NBT_KEY_IDLING_COUNTER, 0, true));
$this->idlingTickCounter = new TickCounter($nbt->getInt(NBTConst::NBT_KEY_MAX_IDLING_TICK_COUNTER, 0, true));
$this->idlingTickCounter->setCurrentCounter($nbt->getInt(NBTConst::NBT_KEY_IDLING_TICK_COUNTER, 0, true));
}
$this->lastIdleStatus = $nbt[self::NBT_KEY_LAST_IDLE_STATUS];
$this->lastIdleStatus = $nbt->getInt(NBTConst::NBT_KEY_LAST_IDLE_STATUS, 0, true);
PureEntities::logOutput($this->baseEntity . ": Idling properties set: [idling:" . $this->idling . "] [lastIdleStatus:" . $this->lastIdleStatus . "]");
}else{
PureEntities::logOutput($this->baseEntity . ": no idling properties found in NBT. Do not restore idling status leave default.");
Expand All @@ -250,22 +236,19 @@ public function loadFromNBT(){
public function saveNBT(){
if(PluginConfiguration::getInstance()->getEnableNBT()){
$entityTag = $this->baseEntity->namedtag;
$idleCompound = new CompoundTag(NBTConst::NBT_KEY_IDLE_SETTINGS);
if($this->idling){
$idleCompound = new CompoundTag(self::NBT_KEY_IDLE_SETTINGS, [
self::NBT_KEY_IDLING => new IntTag(self::NBT_KEY_IDLING, $this->idling),
self::NBT_KEY_IDLING_COUNTER => new IntTag(self::NBT_KEY_IDLING_COUNTER, $this->idlingCounter->getCurrentCounter()),
self::NBT_KEY_MAX_IDLING_COUNTER => new IntTag(self::NBT_KEY_MAX_IDLING_COUNTER, $this->idlingCounter->getMaxCounter()),
self::NBT_KEY_IDLING_TICK_COUNTER => new IntTag(self::NBT_KEY_IDLING_TICK_COUNTER, $this->idlingTickCounter->getCurrentCounter()),
self::NBT_KEY_MAX_IDLING_TICK_COUNTER => new IntTag(self::NBT_KEY_MAX_IDLING_TICK_COUNTER, $this->idlingTickCounter->getMaxCounter()),
self::NBT_KEY_LAST_IDLE_STATUS => new IntTag(self::NBT_KEY_LAST_IDLE_STATUS, $this->lastIdleStatus)
]);
$idleCompound->setInt(NBTConst::NBT_KEY_IDLING, $this->idling);
$idleCompound->setInt(NBTConst::NBT_KEY_IDLING_COUNTER, $this->idlingCounter->getCurrentCounter());
$idleCompound->setInt(NBTConst::NBT_KEY_MAX_IDLING_COUNTER, $this->idlingCounter->getMaxCounter());
$idleCompound->setInt(NBTConst::NBT_KEY_IDLING_TICK_COUNTER, $this->idlingTickCounter->getCurrentCounter());
$idleCompound->setInt(NBTConst::NBT_KEY_MAX_IDLING_TICK_COUNTER, $this->idlingTickCounter->getMaxCounter());
$idleCompound->setInt(NBTConst::NBT_KEY_LAST_IDLE_STATUS, $this->lastIdleStatus);
}else{
$idleCompound = new CompoundTag(self::NBT_KEY_IDLE_SETTINGS, [
self::NBT_KEY_IDLING => new IntTag(self::NBT_KEY_IDLING, $this->idling),
self::NBT_KEY_LAST_IDLE_STATUS => new IntTag(self::NBT_KEY_LAST_IDLE_STATUS, $this->lastIdleStatus)
]);
$idleCompound->getInt(NBTConst::NBT_KEY_IDLING, $this->idling);
$idleCompound->getInt(NBTConst::NBT_KEY_LAST_IDLE_STATUS, $this->lastIdleStatus);
}
$entityTag->IdleSettings = $idleCompound;
$entityTag->setTag($idleCompound);
}
}

Expand Down
53 changes: 29 additions & 24 deletions src/revivalpmmp/pureentities/components/MobEquipment.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
namespace revivalpmmp\pureentities\components;


use pocketmine\entity\object\ItemEntity;
use pocketmine\item\Armor;
use pocketmine\item\DiamondBoots;
use pocketmine\item\DiamondChestplate;
Expand Down Expand Up @@ -54,6 +55,7 @@
use pocketmine\Player;
use pocketmine\Server;
use revivalpmmp\pureentities\config\mobequipment\EntityConfig;
use revivalpmmp\pureentities\data\NBTConst;
use revivalpmmp\pureentities\entity\BaseEntity;
use revivalpmmp\pureentities\features\IntfCanEquip;
use revivalpmmp\pureentities\PluginConfiguration;
Expand All @@ -63,9 +65,6 @@

class MobEquipment{

const NBT_KEY_HAND_ITEMS = "HandItems";
const NBT_KEY_ARMOR_ITEMS = "ArmorItems";

/**
* @var Item|null
*/
Expand Down Expand Up @@ -121,7 +120,7 @@ public function __construct(BaseEntity $entity){
* @param int $tickDiff
*/
public function entityBaseTick($tickDiff = 1){
if($this->pickupTimer->isTicksExpired($tickDiff) and !$this->entity->getBaseTarget() instanceof \pocketmine\entity\Item){
if($this->pickupTimer->isTicksExpired($tickDiff) and !$this->entity->getBaseTarget() instanceof ItemEntity){
$entityConfig = MobEquipmentConfigHolder::getConfig($this->entity->getName());
$pickupByChance = mt_rand(0, 100) <= $entityConfig->getWearPickupChance()->getCanPickupLootChance();
PureEntities::logOutput($this->entity . ": got mob equipment config: " . ($entityConfig !== null) .
Expand All @@ -145,9 +144,9 @@ public function entityBaseTick($tickDiff = 1){
/**
* This is called from WalkingEntity when the item is reached by the entity which was desired.
*
* @param \pocketmine\entity\Item $item
* @param ItemEntity $item
*/
public function itemReached(\pocketmine\entity\Item $item){
public function itemReached(ItemEntity $item){
PureEntities::logOutput($this->entity . ": reached $item. Pick it up!", PureEntities::DEBUG);
$this->entity->stayTime = 50; // first: stay here!
$this->entity->getLevel()->removeEntity($item); // remove item from level
Expand Down Expand Up @@ -273,13 +272,17 @@ public function setChestplate($chestplate){
* @param Player $player the player to send the data packet to
*/
public function sendEquipmentUpdate(Player $player){
if(isset($this->entity->namedtag->ArmorItems)){
PureEntities::logOutput("sendEquipmentUpdate: armor to " . $player->getName(), PureEntities::DEBUG);
$player->dataPacket($this->createArmorEquipPacket());
}
if(isset($this->entity->namedtag->HandItems)){
PureEntities::logOutput("sendEquipmentUpdate: hand items to " . $player->getName(), PureEntities::DEBUG);
$player->dataPacket($this->createHandItemsEquipPacket());
if(PluginConfiguration::getInstance()->getEnableNBT()){
if($this->entity->namedtag->hasTag(NBTConst::NBT_KEY_ARMOR_ITEMS)){
PureEntities::logOutput("sendEquipmentUpdate: armor to " . $player->getName(), PureEntities::DEBUG);
$player->dataPacket($this->createArmorEquipPacket());
}
if($this->entity->namedtag->hasTag(NBTConst::NBT_KEY_HAND_ITEMS)){
PureEntities::logOutput("sendEquipmentUpdate: hand items to " . $player->getName(), PureEntities::DEBUG);
$player->dataPacket($this->createHandItemsEquipPacket());
}
} else {
PureEntities::logOutput("sendEquipmentUpdate called when EnableNBT is false.", PureEntities::WARN);
}
}

Expand All @@ -294,7 +297,7 @@ public function getLootOfInterest(int $blocksAround){
$itemsAround = [];

foreach($this->entity->getLevel()->getNearbyEntities($this->entity->boundingBox->grow($blocksAround, $blocksAround, $blocksAround)) as $entity){
if($entity instanceof \pocketmine\entity\Item and in_array($entity->getItem()->getId(), $this->entity->getPickupLoot())){
if($entity instanceof ItemEntity and in_array($entity->getItem()->getId(), $this->entity->getPickupLoot())){
PureEntities::logOutput($this->entity . ": found interesting loot: " . $entity->getItem(), PureEntities::DEBUG);
$itemsAround[] = $entity;
}
Expand Down Expand Up @@ -555,42 +558,44 @@ private function storeToNBT(){
"Damage" => new IntTag("Damage", 10),
"id" => new IntTag("id", $this->helmet !== null ? $this->helmet->getId() : ItemIds::AIR),
]);
$armorItems = new ListTag(NBTConst::NBT_KEY_ARMOR_ITEMS, $armor);

$this->entity->namedtag->setTag($armorItems);

$this->entity->namedtag->ArmorItems = new ListTag(self::NBT_KEY_ARMOR_ITEMS, $armor);

// store hand item to NBT
$hands[0] = new CompoundTag("0", [
"Count" => new ByteTag("Count", 1),
"Damage" => new IntTag("Damage", 10),
"id" => new IntTag("id", $this->getMainHand() !== null ? $this->getMainHand()->getId() : ItemIds::AIR),
]);
$this->entity->namedtag->HandItems = new ListTag(self::NBT_KEY_HAND_ITEMS, $hands);
$this->entity->namedtag->setTag(new ListTag(NBTConst::NBT_KEY_HAND_ITEMS, $hands));
}
}

private function loadFromNBT(){
if(PluginConfiguration::getInstance()->getEnableNBT()){
PureEntities::logOutput("MobEquipment: loadFromNBT for " . $this->entity, PureEntities::DEBUG);
if(isset($this->entity->namedtag->ArmorItems)){
if($this->entity->namedtag->hasTag(NBTConst::NBT_KEY_ARMOR_ITEMS)){
PureEntities::logOutput("MobEquipment: armorItems set for " . $this->entity, PureEntities::DEBUG);
$nbt = $this->entity->namedtag[self::NBT_KEY_ARMOR_ITEMS];
$nbt = $this->entity->namedtag->getListTag(NBTConst::NBT_KEY_ARMOR_ITEMS);
if($nbt instanceof ListTag){
$itemId = $nbt[0]["id"];
$itemId = $nbt->get(0)->getInt(NBTConst::NBT_KEY_ARMOR_ID);
$this->boots = Item::get($itemId);
$itemId = $nbt[1]["id"];
$itemId = $nbt->get(1)->getInt(NBTConst::NBT_KEY_ARMOR_ID);
$this->leggings = Item::get($itemId);
$itemId = $nbt[2]["id"];
$itemId = $nbt->get(2)->getInt(NBTConst::NBT_KEY_ARMOR_ID);
$this->chestplate = Item::get($itemId);
$itemId = $nbt[3]["id"];
$itemId = $nbt->get(3)->getInt(NBTConst::NBT_KEY_ARMOR_ID);
$this->helmet = Item::get($itemId);
PureEntities::logOutput("MobEquipment: loaded from NBT [boots:" . $this->boots . "] [legs:" . $this->leggings . "] " .
"[chest:" . $this->chestplate . "] [helmet:" . $this->helmet . "]", PureEntities::DEBUG);
}
}

if(isset($this->entity->namedtag->HandItems)){
if($this->entity->namedtag->hasTag(NBTConst::NBT_KEY_HAND_ITEMS)){
PureEntities::logOutput("MobEquipment: handItems set for " . $this->entity, PureEntities::DEBUG);
$nbt = $this->entity->namedtag[self::NBT_KEY_HAND_ITEMS];
$nbt = $this->entity->namedtag->getListTag(NBTConst::NBT_KEY_HAND_ITEMS);
if($nbt instanceof ListTag){
$itemId = $nbt[0]["id"];
PureEntities::logOutput("MobEquipment: found hand item (id): $itemId -> set it now!", PureEntities::DEBUG);
Expand Down
29 changes: 29 additions & 0 deletions src/revivalpmmp/pureentities/data/NBTConst.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,35 @@ interface NBTConst{
const NBT_KEY_SITTING = "Sitting"; // 1 or 0 (true/false)
const NBT_KEY_WALL_CHECK = "WallCheck";


const NBT_KEY_IDLE_SETTINGS = "IdleSettings"; // compound tag
const NBT_KEY_IDLING = "Idling"; // IntTag
const NBT_KEY_IDLING_COUNTER = "IdlingCounter"; // IntTag
const NBT_KEY_MAX_IDLING_COUNTER = "MaxIdlingCounter"; // IntTag
const NBT_KEY_IDLING_TICK_COUNTER = "IdlingTickCounter"; // IntTag
const NBT_KEY_MAX_IDLING_TICK_COUNTER = "MaxIdlingTickCounter"; // IntTag
const NBT_KEY_LAST_IDLE_STATUS = "LastIdleStatus"; // IntTag

const NBT_KEY_HAND_ITEMS = "HandItems"; // ListTag
const NBT_KEY_ARMOR_ITEMS = "ArmorItems"; // ListTag
const NBT_KEY_ARMOR_COUNT = "Count"; // IntTag
const NBT_KEY_ARMOR_DAMAGE = "Damage"; // IntTag
const NBT_KEY_ARMOR_ID = "id"; // IntTag

const NBT_KEY_SPAWNER_IS_MOVABLE = "isMovable"; // ByteTag
const NBT_KEY_SPAWNER_DELAY = "Delay"; // ShortTag
const NBT_KEY_SPAWNER_MAX_NEARBY_ENTITIES = "MaxNearbyEntities"; // ShortTag
const NBT_KEY_SPAWNER_MAX_SPAWN_DELAY = "MaxSpawnDelay"; // ShortTag
const NBT_KEY_SPAWNER_MIN_SPAWN_DELAY = "MinSawnDelay"; // ShortTag
const NBT_KEY_SPAWNER_REQUIRED_PLAYER_RANGE = "RequiredPlayerRange"; // ShortTag
const NBT_KEY_SPAWNER_SPAWN_COUNT = "SpawnCount"; // ShortTag
const NBT_KEY_SPAWNER_SPAWN_RANGE = "SpawnRange"; // ShortTag
const NBT_KEY_SPAWNER_ENTITY_ID = "EntityId"; // IntTag
const NBT_KEY_SPAWNER_DISPLAY_ENTITY_HEIGHT = "DisplayEntityHeight"; // FloatTag
const NBT_KEY_SPAWNER_DISPLAY_ENTITY_SCALE = "DisplayEntityScale"; // FloatTag
const NBT_KEY_SPAWNER_DISPLAY_ENTITY_WIDTH = "DisplayEntityWidth"; // FloatTag
const NBT_KEY_SPAWNER_SPAWN_DATA = "SpawnData"; // ShortTag

// this is our own tag - only for server side ...
const NBT_SERVER_KEY_OWNER_NAME = "OwnerName";
}
Loading

1 comment on commit a9d97fa

@SOF3
Copy link

@SOF3 SOF3 commented on a9d97fa Apr 25, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dear @RevivalPMMP:
I regret to inform you that the release you submitted, named "PureEntitiesX" (v0.4.1), for the project PureEntitiesX on 2018-04-19T19:29:47.000Z, has been rejected.

Special colors including red, yellow, gold, green, aqua, etc. are reserved for notices, warnings, errors and other important messages. You are not allowed to use them for meaningless messages like who wrote the plugin in onEnable/onDisable, as they distract the user from real errors/warnings. You may still write that message (although we discourage you to), but please keep it white.

Please resolve the issues listed above and submit the updated plugin again.

Note: This comment is created here because this is the last commit when the released build was created.

via Poggit (@poggit-bot)

Please sign in to comment.