-
Notifications
You must be signed in to change notification settings - Fork 102
Conversation
Did u fixed MobSpawner/Lightning |
src/CortexPE/block/EndPortal.php
Outdated
if($entity->getLevel()->getName() != Main::$endName){ // OVERWORLD -> END | ||
Server::getInstance()->getScheduler()->scheduleDelayedTask(new DelayedCrossDimensionTeleportTask(Main::getInstance(), $entity, DimensionIds::THE_END, Main::$endLevel->getSafeSpawn()), 1); | ||
$plug->getScheduler()->scheduleDelayedTask(new DelayedCrossDimensionTeleportTask($entity, DimensionIds::THE_END, Main::$endLevel->getSafeSpawn()), 1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could've used Main::getInstance() directly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Effectively, I must have been tired the day I made this pull request x) I correct that
src/CortexPE/block/Portal.php
Outdated
if($gm == Player::SURVIVAL || $gm == Player::ADVENTURE){ | ||
Server::getInstance()->getScheduler()->scheduleDelayedTask(new DelayedCrossDimensionTeleportTask(Main::getInstance(), $entity, DimensionIds::NETHER, $posNether), 20 * 4); | ||
$plug->getScheduler()->scheduleDelayedTask(new DelayedCrossDimensionTeleportTask($entity, DimensionIds::NETHER, $posNether), 20 * 4); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use Main::getInstance() instead
@@ -188,7 +189,8 @@ private static function writeEnchantList(EnchantmentList $list, NetworkBinaryStr | |||
$entry = $list->getSlot($i); | |||
$stream->putUnsignedVarInt($entry->getCost()); | |||
$stream->putUnsignedVarInt(count($entry->getEnchantments())); | |||
foreach($entry->getEnchantments() as $enchantment){ | |||
/** @var Enchantment $enchantment */ | |||
foreach($entry->getEnchantments() as $enchantment){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indentation
@@ -65,7 +64,7 @@ public function onRun(int $currentTick){ | |||
))); | |||
$this->internalCount++; | |||
}else{ | |||
$plug = PMServer::getInstance()->getPluginManager()->getPlugin(Main::getInstance()->getName()); | |||
$plug = Main::getInstance(); | |||
$plug->getScheduler()->cancelTask($this->getTaskId()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$plug = Main::getInstance();
$plug->getScheduler()->cancelTask($this->getTaskId());
could've been easily
Main::getInstance()->getScheduler()->cancelTask($this->getTaskId());
since you're only using the variable's value once. xd
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
xD ok i'm changing that
This'd be kinda hacky, but would it be appropriate to do so? |
haven't touched minecraft for a while now xd |
If we don't do that, each time the server restarts the content of the mobs spawners will be restored: It's like leaving our minecraft survival world, and our farm for the Mobs disappears xD |
that means the NBT data isn't being saved... there's a correct way of doing this however, I'm not quite sure how it is right now because PMMP has changed so much within the past few weeks xD |
Mmm, the mobs spawners appears at the reboot of the server but without the mobs inside, I fix that tonight |
fix losted nbt when chunk is unloaded |
Losted nbt ? |
add a mob to spawner and restart server, bum, spawner is empty. |
I already fixed that, you should try again with a newer version of this pull request. |
thats why I disabled them in the first place xd |
I'll fix it tomorrow morning ^^ I would also reformat the code/indentation (PHPStorm doesn't do its job well apparently) |
@MineBuilderFR
|
You don't fixed bug. If you create mob spawner with a egg and a spawner, and you restart server, them is empty. Actually, is client-side bug, not server side. nbt is saved on server, but it's not handled by client because if you "put" again egg, mob spawner is not updated, so nbt already exist. Can you fix that? |
[13:56:03] [Server thread/CRITICAL]: Error: "Undefined class constant 'SOURCE_TYPE_ANVIL_MATERIAL'" (EXCEPTION) in "TeaSpoon-master/src/CortexPE/network/types/NetworkInventoryAction" at line 250
[13:56:03] [Server thread/DEBUG]: #0 src/pocketmine/Player(2284): CortexPE\network\types\NetworkInventoryAction->createInventoryAction(pocketmine\Player object)
[13:56:03] [Server thread/DEBUG]: #1 src/pocketmine/network/mcpe/PlayerNetworkSessionAdapter(132): pocketmine\Player->handleInventoryTransaction(CortexPE\network\InventoryTransactionPacket object)
[13:56:03] [Server thread/DEBUG]: #2 TeaSpoon-master/src/CortexPE/network/InventoryTransactionPacket(163): pocketmine\network\mcpe\PlayerNetworkSessionAdapter->handleInventoryTransaction(CortexPE\network\InventoryTransactionPacket object)
[13:56:03] [Server thread/DEBUG]: #3 src/pocketmine/network/mcpe/PlayerNetworkSessionAdapter(92): CortexPE\network\InventoryTransactionPacket->handle(pocketmine\network\mcpe\PlayerNetworkSessionAdapter object)
[13:56:03] [Server thread/DEBUG]: #4 src/pocketmine/network/mcpe/protocol/BatchPacket(114): pocketmine\network\mcpe\PlayerNetworkSessionAdapter->handleDataPacket(CortexPE\network\InventoryTransactionPacket object)
[13:56:03] [Server thread/DEBUG]: #5 src/pocketmine/network/mcpe/PlayerNetworkSessionAdapter(92): pocketmine\network\mcpe\protocol\BatchPacket->handle(pocketmine\network\mcpe\PlayerNetworkSessionAdapter object)
[13:56:03] [Server thread/DEBUG]: #6 src/pocketmine/Player(3032): pocketmine\network\mcpe\PlayerNetworkSessionAdapter->handleDataPacket(pocketmine\network\mcpe\protocol\BatchPacket object)
[13:56:03] [Server thread/DEBUG]: #7 src/pocketmine/network/mcpe/RakLibInterface(158): pocketmine\Player->handleDataPacket(pocketmine\network\mcpe\protocol\BatchPacket object)
[13:56:03] [Server thread/DEBUG]: #8 vendor/pocketmine/raklib/src/server/ServerHandler(98): pocketmine\network\mcpe\RakLibInterface->handleEncapsulated(string 86.126.186.28 49206, raklib\protocol\EncapsulatedPacket object, integer 0)
[13:56:03] [Server thread/DEBUG]: #9 src/pocketmine/network/mcpe/RakLibInterface(103): raklib\server\ServerHandler->handlePacket()
[13:56:03] [Server thread/DEBUG]: #10 src/pocketmine/network/Network(94): pocketmine\network\mcpe\RakLibInterface->process()
[13:56:03] [Server thread/DEBUG]: #11 src/pocketmine/network/mcpe/RakLibInterface(80): pocketmine\network\Network->processInterface(pocketmine\network\mcpe\RakLibInterface object)
[13:56:03] [Server thread/DEBUG]: #12 vendor/pocketmine/snooze/src/SleeperHandler(120): pocketmine\network\mcpe\RakLibInterface->pocketmine\network\mcpe\{closure}()
[13:56:03] [Server thread/DEBUG]: #13 vendor/pocketmine/snooze/src/SleeperHandler(82): pocketmine\snooze\SleeperHandler->processNotifications()
[13:56:03] [Server thread/DEBUG]: #14 src/pocketmine/Server(2258): pocketmine\snooze\SleeperHandler->sleepUntil(double 1530726963.6407)
[13:56:03] [Server thread/DEBUG]: #15 src/pocketmine/Server(2129): pocketmine\Server->tickProcessor()
[13:56:03] [Server thread/DEBUG]: #16 src/pocketmine/Server(1710): pocketmine\Server->start()
[13:56:03] [Server thread/DEBUG]: #17 src/pocketmine/PocketMine(237): pocketmine\Server->__construct(BaseClassLoader object, pocketmine\utils\MainLogger object, string /root/build/, string /root/build/plugins/)
[13:56:03] [Server thread/DEBUG]: #18 /root/build/PocketMine-MP.phar(1): require(string phar:///root/build/PocketMine-MP.phar/src/pocketmine/PocketMine.php) Error when i want use Anvil for changing name of x64 Mob Spawners. |
Just a report: I cant turn off Hopper transaction (btw it seems that all dupes are fixed from hopper). All api load, if i turn it on it give a error( about construct ) .... Elytra gets pulled back by antifly... Otherwise the plugin works well, good job ... |
[Server thread/CRITICAL]: InvalidStateException: "Cannot schedule update on garbage entity CortexPE\entity\projectile\FishingHook" (EXCEPTION) in "src/pocketmine/entity/Entity" at line 1381 |
Error: Value 38475 is too large! Code: Backtrace:
|
i think this is ded :)) |
[Server thread/CRITICAL]: Error: "Call to undefined method pocketmine\Server::getScheduler()" (EXCEPTION) in "TeaSpoon-master/src/CortexPE/item/Fireworks" at line 127 |
up @MineBuilderFR i tried this configuration with latest build 1.5.0 https://github.com/pmmp/PocketMine-MP/tree/mc-broken-ed-1.5 server crash
|
Please try #285 as the pull request hasn't actived for a while now.... |
@Adam1609
|
please update to 3.0.0 ALPHA 10 |
Reformat code
Some inappropriate pocketmine API break. Fishing is now working.
Added:
Fixed:
This pull request is not finished! Changes are still coming on this pull request to fix the various bugs there might be