Jump to content

Recommended Posts

Posted

Okay, I don't normally ask questions, but this is really weird and I can't track it. So I have several items in my mod that have "charge up" functions. They use a combination of onItemRightClick() and onPlayerStoppedUsing() in order to perform. However, one of these items has the Client and Server sides syncing properly, and another does not. For example, I added printouts to EntityPlayer and ItemStack methods, and this is what I get for the broken item:

 

2013-08-01 15:50:39 [iNFO] [sTDOUT] Player: CLIENT
2013-08-01 15:50:39 [iNFO] [sTDOUT] ItemStack CLIENT
2013-08-01 15:50:39 [iNFO] [sTDOUT] CLIENT
2013-08-01 15:50:39 [iNFO] [sTDOUT] Player: SERVER

 

With the properly syncing item, ItemStack SERVER and SERVER will print out below Player: SERVER. I am not sure what is causing this. Has this happened to anyone else? Does anyone have a solution?

Posted

do you mind showing us some code ? :P but it hasnt happened to me

 

the other thing (a tip) maybe if you had some baseItem that implements these "charge" effect for you would prevent problem like this, it would either not work at all or everything works

 

aka

 

onItemRightClick(){

 

[...]

if(timeUse > getTriggerTime()){

triggerEffect();

}

}

 

abstract getTriggerTime();

abstract triggerEffect();

 

 

jsut suggesting

 

how to debug 101:http://www.minecraftforge.net/wiki/Debug_101

-hydroflame, author of the forge revolution-

Posted

these happen :P still consider making a base item if its worth (i dont know what you're actually trying to do  :\

how to debug 101:http://www.minecraftforge.net/wiki/Debug_101

-hydroflame, author of the forge revolution-

Posted

Can't do a base item since they are different types of items. One is an extension of ItemAxe, the other is just Item. I would have done a base item if I could have.

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.