Comments (6)
Does this explain the apparent oscillation of the velocities?
from minecrafttassimulator.
Correction: the interval is 0.03125, although they don't seem to be always updated.
The code that seems to be responsible for this is inside net.minecraft.entity.EntityTrackerEntity#updatePlayerList(List<EntityPlayer>)
. In it, the positions are compressed into an int
, where the unit is 1/32. The same thing happens to the rotations, where 360 degrees is mapped to 256 values.
from minecrafttassimulator.
The game plan is to send the entity's position and rotation encoded in the binary representation of double
and float
if that entity is recursively ridden by the player by listening to onPostWorldTick
.
from minecrafttassimulator.
The "same" entity on the client and server side does not share their ids... Here are the possible ways:
- Instead of trying to send unconnected packets of data, send the position of the entity in the tower of riders. Cheaty and possibly unreliable?
- Figure out how client-side entities are synchronized with the server-side counterpart. This seems okay, but is it really necessary?
from minecrafttassimulator.
I found a way to go with option 2. It turns out the id by getEntityId
is the same among the sides. So I can simply keep track of that.
from minecrafttassimulator.
Done! 8f1185b
from minecrafttassimulator.
Related Issues (2)
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 minecrafttassimulator.