Jump to content

[1.8.9] How to register many clicks (CPS) when clicked?


lethinh

Recommended Posts

4 minutes ago, diesieben07 said:
  • Your onClientTick method executes twice every tick. You must check TickEvent::phase.
  • Why do you have that clickedThisTick thing anyways?
  • I don't see you removing anything from that list.
  • I don't see you displaying the list anywhere.

I don't really understand what you mean. And I'm not going to display this list, and where to remove click from the list (onClientTick)?

Edited by lethinh
Link to comment
Share on other sites

1 minute ago, diesieben07 said:

Then what are you going to do with it?

 

Before you use it in any way you have to cleanse it of old entries.

I mean I'm going to register many clicks when I clicked, not for displaying it. And onClientTick is where I have to remove the old entries?

Link to comment
Share on other sites

4 minutes ago, diesieben07 said:

Yes, but you must do something with this value, right? Otherwise why would you calculate it. Show this something.

 

No. Read again what I said.

Oh, but what do I have to do with the list? You said in the cps reply that just add System.currentTimeMillis() to the list. (May be I misunderstanded)

Edited by lethinh
Link to comment
Share on other sites

Just now, diesieben07 said:

Yes, you have to add it to the list. But if you then never do anything with the list, why collect the values?

Why do you want to know the CPS? You must want to do something with the cps value, right? Do you want to display it? Give something to the player based on it? Collect statistics?

Just kind of like that. But I thought I added 

  1. clicks.add(Long.valueOf(System.currentTimeMillis()));
in the code.
Link to comment
Share on other sites

Just now, diesieben07 said:

Dude, seriously?

Take this example: The game measures FPS. Why does it do that? So that it can display it in the debug screen.

Why do you want to measure CPS? Just to consume CPU and memory resources? 

Umm, but you said that is the way to increase CPS. So what is the way to get many clicks after I clicked?

Link to comment
Share on other sites

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



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • It all began with a chance encounter with a testimonial shared by Olivia, a fellow traveler on the winding road of cryptocurrency. Her words spoke of a miraculous recovery orchestrated by Wizard Web Recovery, a beacon of hope in the murky waters of online fraud. Intrigued by her story, I reached out to Wizard Web Recovery, hoping they could work their magic on my blocked crypto recovery. With bated breath, I shared my plight, providing evidence of my dilemma and praying for a solution. To my astonishment, a prompt response came, swift and reassuring. Wizard Web Recovery wasted no time in assessing my situation, guiding me through the process with patience and expertise. and then like a ray of sunshine breaking through the clouds, came the news I had longed for – a new private key had been generated, restoring my precious bitcoins. It was a moment of jubilation, a triumph over adversity that filled me with newfound hope. At that moment, I realized the true power of Wizard Web Recovery, not just as skilled technicians, but as guardians of trust in the digital realm. With their assistance, I reclaimed what was rightfully mine, turning despair into determination and paving the way for a brighter future. But their capabilities did not end there. Delving deeper into their expertise, I discovered that Wizard Web Recovery possessed a wealth of knowledge in reclaiming lost stolen cryptocurrency, and even exposing fraudulent investment schemes. So to all those who find themselves entangled in the web of online fraud, take heart. With the guidance of Wizard Web Recovery, there is a path to redemption.     Write Mail; ( Wizard webrecovery AT  vprogrammer. net ) 
    • It all began with a chance encounter with a testimonial shared by Olivia, a fellow traveler on the winding road of cryptocurrency. Her words spoke of a miraculous recovery orchestrated by Wizard Web Recovery, a beacon of hope in the murky waters of online fraud. Intrigued by her story, I reached out to Wizard Web Recovery, hoping they could work their magic on my blocked crypto recovery. With bated breath, I shared my plight, providing evidence of my dilemma and praying for a solution. To my astonishment, a prompt response came, swift and reassuring. Wizard Web Recovery wasted no time in assessing my situation, guiding me through the process with patience and expertise. and then like a ray of sunshine breaking through the clouds, came the news I had longed for – a new private key had been generated, restoring my precious bitcoins. It was a moment of jubilation, a triumph over adversity that filled me with newfound hope. At that moment, I realized the true power of Wizard Web Recovery, not just as skilled technicians, but as guardians of trust in the digital realm. With their assistance, I reclaimed what was rightfully mine, turning despair into determination and paving the way for a brighter future. But their capabilities did not end there. Delving deeper into their expertise, I discovered that Wizard Web Recovery possessed a wealth of knowledge in reclaiming lost stolen cryptocurrency, and even exposing fraudulent investment schemes. So to all those who find themselves entangled in the web of online fraud, take heart. With the guidance of Wizard Web Recovery, there is a path to redemption.    
    • How can I add drops when killing an entity? Now there are no drops. How can I add an @override to change the attack speed to 1.6 and show "when in main hand...attack damage,...attack speed"? also, how can I make the item enchantable? 
    • Ok. Thanks. by the way, will this crash in any circumstances? public boolean onLeftClickEntity(ItemStack stack, Player player, Entity entity) { if (entity instanceof LivingEntity){ LivingEntity victim = (LivingEntity) entity; if(!victim.isDeadOrDying() && victim.getHealth()>0){ victim.setHealth(0); return true; } } return false; }  
    • You shouldn't be extracting the mod .jar, just place it in your mods folder.
  • Topics

×
×
  • Create New...

Important Information

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