Jump to content

thebest108

Members
  • Posts

    503
  • Joined

  • Last visited

Everything posted by thebest108

  1. I dont know anything about models, but I do know if you can get access to the method that renders the model you can call GL11.rotateF(rotationsNums) and that'll rotate it easy PS: There is a chance it hasnt been translated properly yet when rendering so you might have to use some trigonometry to move it back to the right spot after rotating (Only a chance)
  2. The problem is Im trying to get the player to be moving smoothly when theyre on something else theyre riding (without mounting it). Using other methods causes jaggy rendering and such, but the problem is when the player's onGround = false this only keeps adding to acceleration, making the player keep moving faster until they fall off. What can I do to prevent this, the only solution I have is keep the player onGround permanently on but a lot more problems come from that plz?
  3. GL11 has a function called scale, you can just render the model you want to shrink and just call the scale function before the render method to make it bigger/smaller
  4. How would I be able to set a block(Like redstone) in the air without it not placing? Im trying to copy things from 1 world to another and it keeps breaking off
  5. Im writing some custom packets based around these and I was just wondering that since packet 22 already can handle multiple updates why does packet 23 exist?
  6. Can I just get a number please
  7. I know that, Im just trying to use vanilla packets. Theres something in the world called worldAccesses and I think those handle sending packets. Do I just add a worldAccess to that list and Im done?
  8. ok, now how would I get the client to receive updates on those regions even if theyre not there (this is critical)
  9. Not Important but basically I have a modified world class that is very tiny(4 chunks). The idea is that a player can quickly have a pocket world as an item that when used they are quickly moved into their own world by simply overriding the game renderer and changing the player position. Im doing something like if(client){world = new world}else{world = new worldServer}. How would I theoretically link up theses 2 worlds?
  10. Im trying to enable each player being in multiple worlds to receive packets from all of them
  11. What would you think is the most practical way to give an entity its own world and have the server send packets to the entities world on client.
  12. How to add a world to MinecraftServer.getServer().worldServers and make it send packets to client
  13. Nononono Just do player.onGround = true whenever the player jump method is called or something and then they can jump again
  14. Im trying to spawn structures and the redstone keeps breaking because of updates
  15. The method the game uses to check for collisions between entities is *slightly* inefficient, and in my case slows down my code by a lot. The method called World.getEntitiesWithinAABB() that takes in a filter goes down to this chunk method public void getEntitiesOfTypeWithinAAAB(Class entityClass, AxisAlignedBB aabb, List listToFill, Predicate p_177430_4_) { int i = MathHelper.floor_double((aabb.minY - World.MAX_ENTITY_RADIUS) / 16.0D); int j = MathHelper.floor_double((aabb.maxY + World.MAX_ENTITY_RADIUS) / 16.0D); i = MathHelper.clamp_int(i, 0, this.entityLists.length - 1); j = MathHelper.clamp_int(j, 0, this.entityLists.length - 1); for (int k = i; k <= j; ++k) { Iterator iterator = this.entityLists[k].func_180215_b(entityClass).iterator(); while (iterator.hasNext()) { Entity entity = (Entity)iterator.next(); if (entity.getEntityBoundingBox().intersectsWith(aabb) && (p_177430_4_ == null || p_177430_4_.apply(entity))) { listToFill.add(entity); } } } } My suggestion is to move the predicate checker 1 step higher to something like this public void getEntitiesOfTypeWithinAAAB(Class entityClass, AxisAlignedBB aabb, List listToFill, Predicate p_177430_4_) { int i = MathHelper.floor_double((aabb.minY - World.MAX_ENTITY_RADIUS) / 16.0D); int j = MathHelper.floor_double((aabb.maxY + World.MAX_ENTITY_RADIUS) / 16.0D); i = MathHelper.clamp_int(i, 0, this.entityLists.length - 1); j = MathHelper.clamp_int(j, 0, this.entityLists.length - 1); for (int k = i; k <= j; ++k) { Iterator iterator = this.entityLists[k].func_180215_b(entityClass).iterator(); while (iterator.hasNext()) { Entity entity = (Entity)iterator.next(); if(p_177430_4_ == null || p_177430_4_.apply(entity)){ if (entity.getEntityBoundingBox().intersectsWith(aabb) && () { listToFill.add(entity); } } } } } This code does Exactly the same thing but it avoids unnecessary intercept calculations. In my case where I have thousands of entities that use a complex intercept calculation this slows things down by a lot. Please change, its a performance improvement for everybody!
  16. I think you imported the wrong entity player class. Use the one at net.minecraft.entity.player
  17. I set up a boolean that once the entity is first spawned its true, and after the first tick its then false that way you can ensure all the things are in place before doing the next operation Ex. boolean fresh = true; onUpdate(){ if(fresh){ //Do your things fresh =false; } Edit: Is this entity supposed to also have a refrence to the seat entity because if so then your gonna need to do some funky packet handling }
  18. I *think* it could be that your not overriding the method that gets called when the client receives a packet. I dont know what its called in 1.7.10 but its fields are @SideOnly(Side.CLIENT) public void func_180426_a(double x, double y, double z, float yaw, float pitch, int p_180426_9_, boolean p_180426_10_){} By default this function moves an entity up if its colliding with something
  19. No its a child entity, theres a parent entity that is receiving updates and that sets the children's positions based on where it remembers them. These dont need anything, so how can I set them to not send position packets?
  20. I have an entity that I spawn by the thousands, but there's a massive bottleneck because whenever the position of these entities changes it sends a packet to the client. The problem with this is that at the level of thousands sending all those packets kills any performance. I cant just set the entity to be still on the server because of tracking range and bounding boxes. Is there like a way I could tell the server to Not send any position packets for this entity? The entity can handle itself on client so all these packets are useless
  21. This new block state system doesnt seem to have one?
  22. What would I have to do to an entity that would enable the player to continuously hit it like a block?
  23. Thanks, that works well enough
  24. Um, well I have an entity that is very movement sensitive, and I'd love to make it as smooth as possible. Right now Ive set up some equations that make movements extremely smooth and precise, only problem is I need a dt (time difference) to calculate it all. Is there really nothing thats just a ping to the server?
  25. yeah, is there a field for that?
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.