
thebest108
Members-
Posts
503 -
Joined
-
Last visited
Everything posted by thebest108
-
Damn it, is there any way I can tell how long ago a packet was sent?
-
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?
-
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?
-
Nvm I fixed it Anyway this is all for a *special mod Im making PS. its not a sub region
-
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]
-
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
-
Not just reflection, I need to replace an entire minecraft class with my own. Anywhere I can find out how?
-
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
-
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
-
A way to Not Send the client entity position packets
thebest108 replied to thebest108's topic in Modder Support
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 -
[1.8] Help! Render item model with dynamic texture layer
thebest108 replied to Cleverpanda's topic in Modder Support
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 -
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)
-
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.
-
Whats the best way to render an entity as a block if I give it a blockId and coordinates
-
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
-
Ill update my java and check
-
I know it used to be in a class called renderBlocks. Does anyone know where that method is now? renderBlockAsItem(block, meta, brightness);
-
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
-
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)
-
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?
-
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.
-
Would there be a way to make a solid bounding box rotated at an angle. It can't be impossible zepplen mod did it.
-
Forge Event for blocking mob spawners from spawning
thebest108 replied to Conraad's topic in Modder Support
I would delete the spawned tile entity on block placed and put it back on block destroyed