-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement Monster Spawner functionality #6187
base: minor-next
Are you sure you want to change the base?
Conversation
are you sure this is a good idea tho
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.
By moving the logic to a block, I mean something like Noteblock where all the data is only read once and the tile is only used to store the data. At runtime, the block class is used, enough.
use pocketmine\event\Cancellable; | ||
use pocketmine\event\CancellableTrait; | ||
|
||
class SpawnerAttemptSpawnEvent extends BlockEvent implements Cancellable{ |
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.
Wouldn't it be possible to change more values? The size, the number? Is it useful ?
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.
I don't think it makes sense to allow changing those in the event, those can be changed on the spawner block
does the author mind if i help with this pr? |
I appreciate any help, feel free to offer suggestions or PR |
Introduction
This PR implements the functionality of the Monster Spawner block
Changes
API changes
Added SpawnerAttemptSpawnEvent
Follow-up
TODO: spawn condition check (light level etc.)
TODO: spawnData, spawnPotentials
Tests
Not Tested