Jump to content

[1.8]How you create a mouse event to use leftclick in custom actions ?? <SOLVED>


Recommended Posts

Posted

good days

 

i wanna use left click to make somethink whith a custome item a sort of

onItemRightClick() but  onItemLeftClick() version

 

time ago someone tell that a must create a custom event thath time  i tink wass done whit a KeyInputHandler class

and let it for later

and now i realize thath nop dont works this way 

 

package mercenarymod.utilidades;

import org.lwjgl.input.Mouse;

import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.fml.common.gameevent.InputEvent;
import mercenarymod.utilidades.gearbox;

public class KeyInputHandler {

    @SubscribeEvent
    public void onKeyInput(InputEvent.KeyInputEvent event) {
       
    	if(KeyBindings.gearup.isPressed()){
            System.out.println("gearUp");
            gearbox.up();}
            
        if(KeyBindings.geardown.isPressed()){
            System.out.println("geardown");
        	gearbox.down();}
       
        
        if(KeyBindings.extraer.isPressed()){
            System.out.println("extraer");
        	//todavia nu se que hacer con el pero nesesita world and entityplayer ;
                                           }
        
        if (Mouse.isButtonDown(0)){System.out.println("Botton Zero");}
        
        if (Mouse.isButtonDown(1)){System.out.println("Botton Uno");}
        
        if (Mouse.isButtonDown(2)){System.out.println("Botton Dos");}
        
        
    }

}

 

well i get stuck  an have no idea of wtha i m doing

 

how do you make a custom event trigger by left click ??

Posted

 

is so easy that i get embarrased

 

 

public boolean onEntitySwing(EntityLivingBase entityLiving, ItemStack stack)
    {

	World worldIn=entityLiving.getEntityWorld();
	EntityPlayer playerIn=(EntityPlayer) entityLiving;

	System.out.println("SWING"+"entityLiving="+entityLiving.getName()+"\n Mundo="+worldIn.isRemote+"\n playerIn="+playerIn.getName());


        return false;
    }

 

[19:30:40] [Client thread/INFO] [sTDOUT]:

SWINGentityLiving=Player380

Mundo=true

playerIn=Player380

[19:30:40] [server thread/INFO] [sTDOUT]:

SWINGentityLiving=Player380

Mundo=false

playerIn=Player380

[19:30:43] [Client thread/INFO] [sTDOUT]:

SWINGentityLiving=Player380

Mundo=true

playerIn=Player380

[19:30:43] [server thread/INFO] [sTDOUT]:

SWINGentityLiving=Player380

Mundo=false

playerIn=Player380

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

    • Shopping just got a whole lot more exciting this July 2025. With the verified  Temu   coupon code (acu729640), you can enjoy up to 40% off, a flat $100 discount, and much more—even if you’re a returning customer. The  Temu   coupon code (acu729640) opens the door to a world of savings, perks, and unbeatable deals for savvy shoppers like you and me. Why Everyone Is Buzzing About  Temu   in July 2025  Temu   has become one of the most talked-about shopping platforms globally. Here’s why: Over 250,000 trending items across electronics, fashion, home goods, and more Unbeatable prices with discounts reaching up to 90% Free shipping in 67 countries Reliable and fast delivery with real-time tracking User-friendly app and desktop experience New loyalty rewards programs and exclusive offers like (acu729640) What Makes the  Temu   Coupon Code (acu729640) a Game-Changer The  Temu   promo code (acu729640) for July 2025 is your golden ticket to bigger savings. It’s not just another random promo—it’s a highly flexible code packed with benefits that both new and existing Customers can enjoy. Here’s a breakdown of the savings:  Temu   coupon code (acu729640) $100 off for new Customers – Flat $100 discount on your first order  Temu   coupon code (acu729640) $100 off for existing Customers – Loyal customers get the same amazing $100 off  Temu   coupon code (acu729640) 40% off – Additional 40% discount across popular categories  Temu   $100 coupon bundle – Stackable savings up to $100 for multiple purchases  Temu   first time user coupon – Free gift + instant discounts These aren’t just generic savings. They’re curated to elevate your shopping experience. I used the (acu729640) coupon code last week and saved over $120 while shopping for kitchen gadgets, summer apparel, and gifts.  Temu   Coupons You Shouldn’t Miss in July 2025 If you’re anything like me, stacking deals is the ultimate thrill. And with the  Temu   coupon bundle available this July 2025, that thrill comes with real rewards. Whether you're a new or returning customer,  Temu   has a discount strategy tailored just for you. Must-Have  Temu   Coupon Codes  Temu   coupon code (acu729640) – Ideal for July 2025 sitewide savings  Temu   coupon code (acu729640) $100 off – Massive savings for both new and repeat Customers  Temu   coupon code (acu729640) 40% off – Perfect for trimming costs on trending products  Temu   $100 coupon bundle – Stackable codes for extra savings  Temu   coupons for new Customers – Welcome discounts + surprise gift  Temu   coupons for existing Customers – Loyalty benefits + access to VIP-only sales  Temu   discount code (acu729640) for July 2025 – Boost your cart value while spending less  Temu   promo code (acu729640) for July 2025 – Use this code for optimized checkout deals Country-Specific Coupon Benefits  Temu   coupon code $100 off for USA – Great for electronics, home appliances, and sports gear  Temu   coupon code $100 off for Canada – Ideal for winter wear, home décor, and wellness products  Temu   coupon code $100 off for UK – Popular for fashion, tech accessories, and skincare  Temu   coupon code $100 off for Japan – Perfect for minimalist homeware and tech  Temu   coupon code 40% off for Mexico – Clothing, bags, and beauty products at 40% off  Temu   coupon code 40% off for Brazil – Big savings on shoes, kitchenware, and fitness items The Power of the  Temu   Coupon Bundle The  Temu   $100 coupon bundle is not a myth. It’s a dynamic pack of stackable coupons that can be used together or separately to suit your cart size and item types. Bundle Highlights: Coupons worth $10, $20, $30, and $40 – Use one or stack all Free express shipping codes – Save time AND money Early access to flash sales – App-only deals included Seasonal bonuses – Added during holidays and big sale days Real Benefits You Can Count On Using  Temu   coupon code (acu729640) for July 2025 is not only smart—it’s empowering. Here’s what you stand to gain: $100 off for new Customers – Start strong with a generous discount $100 off for existing Customers – Stay loyal and still save 40% extra off – Cut down your final bill without cutting corners Free gift for new Customers – A little surprise goes a long way $100 coupon bundle – Plan multiple orders and save consistently How to Redeem the  Temu   Promo Code (acu729640) Visit the  Temu   website or download the app Log in or sign up for an account Add your favorite items to the shopping cart Enter the  Temu   discount code (acu729640) at checkout Watch the prices drop before your eyes  Temu   New Offers in July 2025 If you're on the lookout for fresh deals,  Temu  's new offers in July 2025 are hard to beat. With rolling flash sales, new arrivals daily, and special discounts for app Customers, you’ll always find something irresistible. And yes, you can use the  Temu   promo code (acu729640) with many of these new deals.  Temu   is constantly updating their product catalog. Whether you’re interested in smart gadgets, fashion-forward pieces, or home essentials, you’ll find quality and affordability combined in one platform. Final Thoughts Shopping on  Temu   with the coupon code (acu729640) is a no-brainer. You unlock value instantly, stack your savings strategically, and make every purchase count. In July 2025, this code isn’t just recommended—it’s essential. I’ve saved hundreds with the  Temu   coupon code (acu729640), and I know you can too. Why pay full price when you have access to: The  Temu   coupon code (acu729640) $100 off The  Temu   coupon code (acu729640) 40% off The  Temu   $100 coupon bundle Free gifts and fast delivery Your smarter shopping journey starts now. Just remember the magic key: acu729640. Happy shopping!  
    • Temu   Adventure: Unlock Massive Savings with Coupon Code (acu729640) – Your Ultimate Guide to  Temu   Coupons for July 2025 Step into the world of  Temu   and prepare for an exhilarating shopping journey where unbeatable prices meet bold discounts. This July 2025, your gateway to incredible savings begins with a single code [acu729640]. Whether you're a first-time buyer or a returning treasure hunter,  Temu   has a deal made just for you.  Temu   is a haven of trending fashion, cutting-edge gadgets, quirky home essentials, and unexpected gems. With lightning-fast delivery, free shipping across 67 countries, and discounts of up to 30%, it’s no wonder shoppers worldwide are captivated. But here’s where it gets thrilling—you’re not just shopping, you’re scoring big. Top 5  Temu   Coupon Codes Ranked for July 2025 1.  Temu   Coupon Code (acu729640) – $100 Off for New Users Your first journey into  Temu  ’s universe should be unforgettable. Use this powerful code to unlock a $100 discount as a new user. It’s the perfect welcome to an epic shopping experience. 2.  Temu   Coupon Code (acu729640) – 30% Off on Selected Items Already a dedicated explorer? Use the same code to get a massive 30% off on select trending items. Ideal for those who love thrills without the full bill. 3.  Temu   $100 Coupon Bundle For those who want more from every cart,  Temu   delivers a $100 coupon bundle. Use acu729640 to unlock additional savings across multiple product categories. A smart move for savvy shoppers. 4.  Temu   Coupon Code (acu729640) – $100 Off for Existing Users Loyal shoppers are rewarded too. With acu729640, returning users can grab an impressive $100 off. Your continued adventure with  Temu   pays off. 5.  Temu   First-Time User Coupon – Free Gift New users don’t just get discounts—they get gifts too. Use the coupon code and enjoy a free gift on top of your savings. Your first purchase becomes even more rewarding. Country-Specific Coupon Rankings USA:  Temu   coupon code (acu729640) $100 off for new users Canada:  Temu   coupon code (acu729640) 30% off on selected items UK:  Temu   coupon code (acu729640) $100 off for new users Mexico:  Temu   coupon code (acu729640) 30% off special category items Brazil:  Temu   coupon code (acu729640) 30% off for first-time users Japan:  Temu   $100 coupon bundle with code (acu729640) Why  Temu   Coupon Code (acu729640) Is Your Golden Key  Temu   coupon code (acu729640) $100 off: Available for both new and returning customers  Temu   coupon code (acu729640) 30% off: Extra savings on top-selling items  Temu   $100 coupon bundle: Stackable deals across categories  Temu   coupons for new users: Cash discounts and free gifts  Temu   coupons for existing users: Ongoing perks and loyalty rewards  Temu   promo code (acu729640) for July 2025: Seasonal savings and flash deals  Temu   discount code (acu729640) for July 2025: Updated weekly offers throughout the month  Temu   new offers in July 2025: Special product bundles and exclusive launches Quick Guide to Redeem  Temu   Coupons Visit the  Temu   app or website. Add your favorite finds to your cart. Apply the code [acu729640] at checkout. Enjoy instant savings and complete your purchase with confidence. Final Word  Temu   is your ultimate destination for adventure-packed shopping, incredible discounts, and exciting rewards. Whether you're exploring for the first time or returning for more, [acu729640] unlocks the best deals  Temu   has to offer in July 2025. Don’t just shop—make it legendary. Fill your cart, apply your code, and watch the magic happen.
  • Topics

×
×
  • Create New...

Important Information

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