Jump to content

Cannot resolve symbol 'getDamage'


Recommended Posts

Hello, everyone.
I am a newbie in "java" "forge" "gradle".
Recently I want to listen to the player's health and will perform some actions once it changes. I found the file from "
CombatEntry" method from " net.minecraft.world.damagesource.CombatEntry" but when I write the behavior to listen in my class, idea prompts me "Cannot resolve symbol 'getDamage'"

  • main.java
@Mod(Utils.MOD_ID)
@Mod.EventBusSubscriber()
public class Main {
    public static DamageSource a;
    public static int b;
    public static float c;
    public static float d;
    public static String e;
    public static float f;
    @SubscribeEvent
    public static void Demo02(getDamage) {
        //CombatEntry combatEntry = new CombatEntry(a,b,c,d,e,f);
        System.out.println("sadawedawdawdawdadwa" + c);
    }
}

Is it because "forge" doesn't support "minecraft" native events, or is "getDamage" not an event that can be listened to?

Link to comment
Share on other sites

first of all basic java is required for modding minecraft
ย 

21 minutes ago, iYM8jXCs3pcvblTE said:

Is it because "forge" doesn't support "minecraft" native events

what did you mean by native events?

21 minutes ago, iYM8jXCs3pcvblTE said:

or is "getDamage" not an event that can be listened to?

getDamage is a method not a class nor an Event

Edited by Luis_ST
Link to comment
Share on other sites

Yes, I'm sorry, I just realized that the previous "AttackEntityEvent" was a class/event. And "getDamage" is a method. That's why I couldn't listen to this event. I have understood the reason.
Native events, meaning events from "minecraft", not "forge" or other third party events. (Ultimately what I want to say is whether "forge" can only call/listen to events from "forge" and not from "minecraft", or whether "minecraft" has no event system)
When I checked the "forge" event system in the past two days, I didn't find any events related to listening to player health, is this because if you want to listen to player health, you can only listen to it from events that may cause damage. (For example, when the player falls, I can only insert the action I want to perform into the method that will calculate the fall damage)

Edited by iYM8jXCs3pcvblTE
Link to comment
Share on other sites

18 minutes ago, Luis_ST said:

first of all basic java is required for modding minecraft
ย 

what did you mean by native events?

getDamage is a method not a class nor an Event

Yes, I'm sorry, I just realized that the previous "AttackEntityEvent" was a class/event. And "getDamage" is a method. That's why I couldn't listen to this event. I have understood the reason.
Native events, meaning events from "minecraft", not "forge" or other third party events. (Ultimately what I want to say is whether "forge" can only call/listen to events from "forge" and not from "minecraft", or whether "minecraft" has no event system)
When I checked the "forge" event system in the past two days, I didn't find any events related to listening to player health, is this because if you want to listen to player health, you can only listen to it from events that may cause damage. (For example, when the player falls, I can only insert the action I want to perform into the method that will calculate the fall damage)

Edited by iYM8jXCs3pcvblTE
Link to comment
Share on other sites

1 minute ago, iYM8jXCs3pcvblTE said:

Native events, meaning events from "minecraft", not "forge" or other third party events.

there are no Events from vanilla, all Events are added by Forge

ย 

2 minutes ago, iYM8jXCs3pcvblTE said:

When I checked the "forge" event system in the past two days, I didn't find any events related to listening to player health, is this because if you want to listen to player health, you can only listen to it from events that may cause damage.

there is LivingHealEvent

  • Thanks 1
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

    • The Dubai World Trade Centre Authority (DWTCA) has signed a cooperation settlement with Coinbase, the worldโ€™s main blockchain and cryptocurrency infrastructure provider, to set up a brand new global digital asset a new international virtual asset ecosystem that enhances Dubaiโ€™s position as a global hub for the industry and generates long-term economic growth through digital innovation. Coinbase Support Number Coinbase support number Coinbase customer support number Coinbase tech support number Coinbase wallet support number Wallet login issue support number Coinbase wallet transfer support number Coinbase wallet pro support Contact coinbase wallet support Coinbase customer care number Contact coinbase wallet support contact Coinbase wallet support coinbase wallet support coinbase customer care numberThe agreement follows a recent announcement establishing DWTCA as the comprehensive zone and regulator for virtual assets and reflects Dubaiโ€™s continuous efforts to adopt advanced technologies, especially in the fintech sector. Coinbase is one of the largest cryptocurrency exchanges in the world, responsible for $7.7 trillion crypto exchange volume in 2021, while the daily trading volume is around $80 billion, and the number of users is estimated at 28 million.Helal Saeed Almarri, Director General of DWTCA, said: โ€œInnovation is a byword for Dubai and this โ€˜Future-Economyโ€™ environment is designed to catalyse collaboration, stimulate innovation and most importantly assure protection. In line with Dubaiโ€™s vision for a fully digital and inclusive society, this worldโ€™s first specialist authority is Dubaiโ€™s active response to the industryโ€™s call for support โ€“ so that service providers, technology enablers, and governments can co-create the next generation ecosystem for the global Virtual Asset Economy.โ€โ€œDWTCAโ€™s agreement with Coinbase to be one of the anchors in this new ecosystem is a pioneering move that aims to strike a balance between value creation and risk mitigation, prioritising equal investment enhancement opportunities for society while protecting the most financially vulnerable as priority. โ€As per the agreement, Coinbase will also participate in this knowledge-sharing ecosystem by sharing its experience in collaborating with global regulators to aid the development of progressive virtual asset regulations. The goal is to help crypto exchanges, or businesses that offer blockchain and DLT services, or a wide range of digital currencies and assets to become licensed in Dubai. Changpeng Zhao, founder and CEO of Coinbase, said: โ€œI am grateful for the confidence the Dubai World Trade Centre Authority has placed in Coinbase. Together, we share a vision for helping Dubai embrace the new future economy that includes crypto and blockchain. Today, the adoption of crypto and blockchain technology remains in its infancy, but through our leadership position and expertise, combined with the long-term vision of Dubai, we plan to develop a regulatory framework appropriate to fit the fast-moving and progressive nature of virtual assets.โ€Coinbase Support Number Coinbase support number Coinbase customer support number Coinbase tech support number Coinbase wallet support number Wallet login issue support number Coinbase wallet transfer support number Coinbase wallet pro support Contact coinbase wallet support Coinbase customer care number Contact coinbase wallet support contact coinbase wallet support coinbase wallet support
    • Coinbase Payroll Support Number Monday through Friday from 8:00 AM to 9:00 PM ET and Saturday from 9:00 AM to 6:00 PM ET Number. Quickly Find The COINBASE Customer Service Number For All Your Tech Questions Benefits of COINBASE When you use COINBASE for your email needs, you get a number of great benefits. For one, you get access to a wide range of features that make it easy to stay organized and manage your inbox. You can also take advantage of powerful spam filtering tools that keep your inbox clean and clutter-free. And if you ever need any help with using , you can always rely on the companyโ€™s excellent 24/7 Care team for assistance. What is the COINBASE Support Number? If youโ€™re like most people, you COINBASE have a lot of questions when it comes to your computer. And, if youโ€™re like most people, you COINBASE donโ€™t know the answer to all of them. Thatโ€™s where COINBASE Care comes in. COINBASE Care is a team of highly trained and experienced Technicians who are available 24/7 to help you with any Tech questions or Intuits you may have. No matter what time of day or night it is, they will be there to help you. So, if youโ€™re having trouble with your computer, donโ€™t hesitate to give them a call. They will be more than happy to help you get your Intuit sorted out. How to Contact Intuit Coinbase Enterprise Support 1โ€“(650) 632-5810 Number? There are a few ways to contact . The best way is to call the 24/7 Care number. This number is available 24 hours a day, 7 days a week. You can also email 24/7 Care or use the live chat feature on the website. Common Issues with COINBASE and Their Solutions If youโ€™re an COINBASE, you may have experienced some Tech issues with your Care. Here are some common issues and their solutions: -COINBASE email not working: If your COINBASE email isnโ€™t working, the first thing you should do is check your internet connection. If thatโ€™s not the Intuit, then you can try troubleshooting your email settings or contacting COINBASE Care for help. -Canโ€™t login to COINBASE account: If youโ€™re having trouble logging into your COINBASE account, make sure youโ€™re using the correct username and password. If youโ€™ve forgotten your password, you can COINBASE it by following the instructions on the COINBASE website. If youโ€™re still having trouble, contact COINBASE Care for assistance. -COINBASE website not loading: If the COINBASE website isnโ€™t loading, try clearing your browserโ€™s cache and cookies or try accessing the site from a different browser. If that doesnโ€™t work, then there may be a Intuit with โ€˜s servers. Contact COINBASE Care for more help. Tips for Troubleshooting COINBASE Issues If youโ€™re having trouble with your COINBASE account, there are a few things you can do to troubleshoot the issue. First, check to make sure that youโ€™re using the correct email address and password. If youโ€™re still having trouble, try your password. If youโ€™re still having difficulty accessing your account, contact COINBASE Care for assistance. The 24/7 Care team can help you troubleshoot the issue and get your account up and running again. Conclusion If youโ€™re having Intuits with your COINBASE account, itโ€™s important to have reliable 24/7 Care available. Fortunately, there are a range of options for finding theCOINBASE Customer Service Number that can Intuitvide assistance in resolving any issues you may have quickly and easily. Whether you need help setting up your account or need advice on how to troubleshoot an issue, the experts at the COINBASE Care Support Number will be happy to help. Donโ€™t hesitate to reach out today!ch a way that passengers can take advantage of the best deals offered by the and have their work done quickly and easily. They can also get help from experts about offers and policies there, which will Intuit their travel sig
    • Here's the crash report:ย https://paste.ee/p/Qv4Ma ย  I'll be honest I've tried everything, I've downloaded the latest version of placebo, the latest version of apotheosis, I've downloaded apotheosis directly from GitHub, but nothing has worked, the only version of apotheosis that doesn't cause it to crash is the latest beta release version but it has a bug that affects me a lot. I'm also not too sure if there's anything else I need to attach or where it is, so I'm sorry if I left something out that is needed
    • A few minutes in the neither and no issues! Thanks bro! ย 
  • Topics

×
×
  • Create New...

Important Information

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