Jump to content

Recommended Posts

Posted

Hello,

 

I am porting my mod (Cart Mod) to smp and have 2 little problems that i do not know how to solve.

 

1. My items use onItemRightClick() and Minecraft.objectMouseOver to interact with an entity.

What the problem is that the server can't use objectMouseOver ofcourse, and other functions like "useItemOnEntity" i can't interact with the EntityPlayer.

 

 

 

2. In the getGuiElement() I need to return the GUI, and my GUI needs an inventory. how can i access the entity that the player is interacting with from my mod_*?

public Object getGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {
	return new GuiChestCart(player.inventory, inventory1 , inventory2);
}

 

 

If need any more information just ask ;)

Posted

And?

Use two different listeners....

However, I will be changing this with the new integrated server in 1.3.

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

Posted

Use one of the provided ints to store the entity id

and get the entity by id on the client side....

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

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.