Jump to content

[1.7.10+][SOLVED-Using tracker] Player view-distance for Entities.


Recommended Posts

Posted

What's the range player sees Entities? (other PlayerEntity most important)

 

Is it same for all?

 

Is it constraint? Server has "view-distance=10" to max 15, this is only for world-sending or also Entities? If for Both - how do I get that range? (probably somewhere in MinecraftServer).

 

When player logs in, other clients generate their EntityPlayer (I belive so), do they know (client-side) other player coordinates when thay are NOT in view range?

 

Looking on my own (it's pain in the ass to test it with 2 clients, running around on server map checking Syso), might aswell get some of answers faster here. Thanks :)

 

Reason: Sending packet to all around. (should be in visible-range)

1.7.10 is no longer supported by forge, you are on your own.

Posted

Thanks, that probably just saved me from literally writing my own tracker.

 

//Server-side
public void onAttributeModified(AttributeKeys key, AttributeSources source) // this.player is player owning attribute
{
EntityTracker entitytracker = ((WorldServer)this.player.worldObj).getEntityTracker();
			for (EntityPlayer p : entitytracker.getTrackingPlayers(this.player))
			{
				PacketDispatcher.sendTo(new PacketUpdateAttribute(this.getAttribute(key, source)), p);
			}
}

 

So this is how I do it? (can't even launch MC now because of tons of other errors - WIP stuff)

 

Also: Is the player being tracked also in tracking set? (you know logically - client tracks its entityPlayer)

 

Again - thanks :P Thread is most-likely resolved

1.7.10 is no longer supported by forge, you are on your own.

Posted

I tried, but: Packet != IMessage :C

public void func_151247_a(Entity p_151247_1_, Packet p_151247_2_)
public void func_151248_b(Entity p_151248_1_, Packet p_151248_2_)

 

And they seem like they are literally doing same stuff (iterating).

 

Unless I will start extending Packet for that ;p

1.7.10 is no longer supported by forge, you are on your own.

Posted

As always, diesieben to the rescue! :)

Nice to learn this stuff exists.

 

Thread marked SOLVED.

Thanks.

1.7.10 is no longer supported by forge, you are on your own.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

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