Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

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?

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-

  • Author

Never mind, I fixed it. Was using hard values instead of overriding getMaxItemUseDuration(). I feel pathetic.

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-

  • Author

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...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.