Comments (4)
Fixing this requires changes to pocketmine/nbt, because NbtSerializer wasn't designed to be able to read or write headless tags like this.
from bedrockprotocol.
Time to re-open this :P
from bedrockprotocol.
Thanks for the reminder.
from bedrockprotocol.
This was already correct as of 93bf272.
Sample code:
$pos = $player->getPosition();
$to = $pos->addVector($player->getDirectionVector()->multiply(3))->floor()->add(0.5, 0.5, 0.5);
$pk = LevelEventGenericPacket::create(LevelEvent::PARTICLE_TELEPORT_TRAIL, CompoundTag::create()
->setFloat("Startx", $pos->x)
->setFloat("Starty", $pos->y)
->setFloat("Startz", $pos->z)
->setFloat("Endx", $to->x)
->setFloat("Endy", $to->y)
->setFloat("Endz", $to->z)
->setFloat("Variationx", 0.6)
->setFloat("Variationy", 2.9)
->setFloat("DirScale", 0.2)
->setInt("Count", 128)
);
$player->getNetworkSession()->sendDataPacket($pk);
from bedrockprotocol.
Related Issues (20)
- StructureSettings doesn't include the `allowNonTickingPlayerAndTickingAreaChunks` field HOT 3
- ItemStackRequest misses TextProcessingEventOrigin at very end
- BossEventPacket PR for colors missed a field HOT 1
- Tidy up unknowns in BossEventPacket
- LevelSoundEvent map is not updated HOT 1
- Badly named `CraftingMarkSecondaryResultStackRequestAction` and its fields HOT 1
- Remove PacketBatch HOT 1
- Overengineered PacketBatch::getPackets() HOT 1
- Make MoveActorDeltaPacket less obnoxious to use
- Start using native enums HOT 1
- PacketSerializer error when using MobEquipmentPacket HOT 6
- Performance impact of using closures to handle item decoding
- Please adding new entity HOT 2
- Error: Whenever i use CorrectPlayerMovePredictionPacket, i get server sent broken packet HOT 11
- Bedrock Protocol
- Missing bool field in SpawnParticleEffectPacket
- CommandParameter type mismatch HOT 1
- Require usage of ::create() for packets
- ClientboundMapItemDataPacket Crash
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bedrockprotocol.