I've managed to get LevelListeners working, so we can get access to all these goodies! TLDR more hooks
Basically, whenever anything in this list happens, Minecraft will notify BlockLauncher of it.
Also, won't Level.spawnMob eventually become Level.spawnEntity because of falling sand and arrows and stuff?
This isn't ModPE Script stuff - this is Minecraft PE's notification system that notifies us of spawned particles - and MCPE clearly has two methods of spawning particles.
In ModPE, you'll probably get something like
function entityRemovedHook(entity) {
if (Entity.getEntityTypeId(ent) == 82) {
setPosition(getPlayerEnt(), Entity.getX(ent), Entity.getY(ent) + 1.7, Entity.getZ(ent));
}
}
I'm wondering how to attach all these events to ModPE script.
what setTilesDirty and allChanged means?
and what is difference with those two particles?
does brightness includes sunlight?
and is there any way to detect the disconnection from server?
lol I have too many things to ask....
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumTLDR more hooks
Basically, whenever anything in this list happens, Minecraft will notify BlockLauncher of it.
virtual void setTilesDirty(int, int, int, int, int, int) {} ; //4 virtual void tileChanged(int, int, int) {} ; //5 virtual void tileBrightnessChanged(int, int, int) {} ; //6 virtual void skyColorChanged() {} ; //7 virtual void allChanged() {} ; //8 virtual void takePicture(TripodCamera*, Entity*) {} ; //9 virtual void addParticle(std::string const&, float, float, float, float, float, float, int) {} ; //10 virtual void addParticle(ParticleType::Id, float, float, float, float, float, float, int) {} ; //11 virtual void playSound(std::string const&, float, float, float, float, float) {} ; //12 virtual void playMusic(std::string const&, float, float, float, float) {} ; //13 virtual void playStreamingMusic(std::string const&, int, int, int) {} ; //14 virtual void entityAdded(Entity*) {} ; //15 virtual void entityRemoved(Entity*) {} ; //16 virtual void levelEvent(Player*, int, int, int, int, int) {} ; //17: doors opening/closing virtual void tileEvent(int, int, int, int, int) {} ; //18: chests' open/closed state, broadcast every 3 seconds virtual void tileEntityChanged(int, int, int, TileEntity*) {} ; //19How do we expose all this awesomeness to ModPE Script? Any callbacks/hooks suggestions?
By the way:
level events: http://wiki.vg/Protocol#Effects MCPE only sends the door events
tile events: http://wiki.vg/Block_Actions MCPE only sends the chest broadcasts
Secondly:
bl_spawnMob moved again: its hopefully final home is Level.spawnMob.
we are always at war with Eurasia
Sorry about the double-move.
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumThis isn't ModPE Script stuff - this is Minecraft PE's notification system that notifies us of spawned particles - and MCPE clearly has two methods of spawning particles.
In ModPE, you'll probably get something like
function entityRemovedHook(entity) { if (Entity.getEntityTypeId(ent) == 82) { setPosition(getPlayerEnt(), Entity.getX(ent), Entity.getY(ent) + 1.7, Entity.getZ(ent)); } }I'm wondering how to attach all these events to ModPE script.
and what is difference with those two particles?
does brightness includes sunlight?
and is there any way to detect the disconnection from server?
lol I have too many things to ask....