Jump to content

thebest108

Members
  • Posts

    503
  • Joined

  • Last visited

Everything posted by thebest108

  1. Damn it, is there any way I can tell how long ago a packet was sent?
  2. Lol sorry I assumed, but anyway setPositionAndRotation2 is only called by the client, and is used by certain entities (boats) to smooth out what would otherwise be drastic changes. It gets called every time the entity gets a movement packet. back to the question plz, is the int in it representing how many ticks ago the packet was sent?
  3. Alright so I'm a bit confused on the field( int p_180426_9_) which I think returns a value for how many ticks ago the receiving packet got sent, but after looking at it in singleplayer I've noticed this gets called every tick, but the p_180426_9_ was set to 3. Is the client just 3 ticks behind or is this not what I think it is?
  4. Nvm I fixed it Anyway this is all for a *special mod Im making PS. its not a sub region
  5. Itll sound dumb but Ive added a bounding box that can rotate, however I need the default bounding boxes to have a few changes so they can interact properly with the new bounding box, specifically the bit that returns a MovingObjectPosition that makes it so the player can still move when rubbing against the edge of a bounding box Proof: [embed=425,349]<iframe width="560" height="315" src="https://www.youtube.com/embed/umNIcFSoBnY" frameborder="0" allowfullscreen></iframe>[/embed]
  6. Lol I know you'll tell me to use reflection but all the methods Im changing are like 90% of the class and the class itself is used very frequently by vanilla minecraft. Reflection would kill performance. I just need to replace a class with my own
  7. Not just reflection, I need to replace an entire minecraft class with my own. Anywhere I can find out how?
  8. Im currently using player.addVelocity to move the player to certain locations but the players legs move and it looks pretty stupid. Any way to force them to not move unless the player is actually walking? Also is there a variable that tells you how many ticks the player has been airbourne
  9. Actually I looked a bit into it, when an entity packet is sent this method is called in Entity.class @SideOnly(Side.CLIENT) public void func_180426_a(double p_180426_1_, double p_180426_3_, double p_180426_5_, float p_180426_7_, float p_180426_8_, int p_180426_9_, boolean p_180426_10_) { this.setPosition(p_180426_1_, p_180426_3_, p_180426_5_); this.setRotation(p_180426_7_, p_180426_8_); List list = this.worldObj.getCollidingBoundingBoxes(this, this.getEntityBoundingBox().contract(0.03125D, 0.0D, 0.03125D)); if (!list.isEmpty()) { double d3 = 0.0D; Iterator iterator = list.iterator(); while (iterator.hasNext()) { AxisAlignedBB axisalignedbb = (AxisAlignedBB)iterator.next(); if (axisalignedbb.maxY > d3) { d3 = axisalignedbb.maxY; } } //THIS BIT CAUSES IT \/ p_180426_3_ += d3 - this.getEntityBoundingBox().minY; this.setPosition(p_180426_1_, p_180426_3_, p_180426_5_); } } So just override the func_180426_a in your entity class with something suitable
  10. Theres some weird black magic that happens with the posY... Anyway Ive gotten around it by using a dataWatcher to hold the posY data, so rather than changing the posY I update the datawatcher with that value and on the onUpdate method I do posY = getDataWatcher.getWatchableFloat(yourId) Look at this: http://www.minecraftforge.net/wiki/Datawatcher
  11. Cmon this cant be that hard. Im just looking for a way to override the tracker checking if the player is in range by replacing posXYZ that function uses with some other variables
  12. You should look into ways to merge 2 images together, mods like dense ores do it adding non vanilla ores to the dense ore version
  13. So Ive got a situation where Ive got quite a few invisible entities that only act as a bounding box, so I set my tracker range to around 5 as I dont want to be sending a lot of unnecessary data. The entity bounding boxes are independent of their posX,posY,and posZ's so ideally I would want to set those to something constant to avoid sending position packets. The problem with giving them a constant is that the server wont send updates when a player is in tracking range because that is based on the entity posXYZ; ie the bounding box wont be updated for the client. Is there a way I can make the tracker range respond to a custom set of coords I give the entity, not the posXYZ (I really need it, sending data for thousands of entities posXYZ is very intensive and in my case unnecessary)
  14. Is there a way I can get the xyz of the point of rendering? Im asking because for some custom rendering Im replacing the fields from doRender() with ones Im making using the player position(I have to, the paramater provided breaks in this case), these however only update once every tick so it makes for choppy rendering.
  15. Whats the best way to render an entity as a block if I give it a blockId and coordinates
  16. I want to know how much time wouldve passed since the last tick to smooth out my rendering by multiplying the difference by the velocity and adding that to where to render it at. My entities movement is very jaggy at the moment so I want to smooth it out from a rendering perspective
  17. Ill update my java and check
  18. I know it used to be in a class called renderBlocks. Does anyone know where that method is now? renderBlockAsItem(block, meta, brightness);
  19. I know your gonna say but you can use like 5 things to change it even if final and Ill say yes I know; but the problem is I have a situation where Im working with hundreds of bounding boxes for a mod Im making and these workarounds are killing performance for what could be so simple. Please, I know it kills but can you please just remove the final modifier from min/max XYZ on AxisAlignedBB. Also the finals on xyzCoords of the Vec3 class Ill pray to LexGod evry day promise
  20. Why is your username "theboys"? Also, is your java 32 bit?
  21. 1. Is there a way to run something every tick from the mod class and how? 2. How can I get the client to press buttons as if they were being pressed by the keyboard (specifically A and D)
  22. GetBlockType only works client side and getBlockId just gives me an int. Is there any way to access the block field from a tile entity?
  23. Is there a way to get access to all of a blocks variables based on xyz coords from a tile entity? I need to change the bounding box of a block from the tileEntity.
  24. Would there be a way to make a solid bounding box rotated at an angle. It can't be impossible zepplen mod did it.
  25. I would delete the spawned tile entity on block placed and put it back on block destroyed
×
×
  • Create New...

Important Information

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