To print something, either use your logger class or the regular System.out.println("Text you want here").
I presume this all needs to be done with Forge?
As to the purpose of your program, obviously, but you make it sound like an external program, i.e. not a mod, in which case players probably cannot view it while in game, so is this just a novelty / fun project (nothing wrong with that)
Yup.
or are you actually expecting people to use it rather than just checking the wiki or using a Damage Indicators type of mod?
Does that mod tell you the exact damage of what mobs are doing to you?
Rollback Post to RevisionRollBack
Yeah, that guy in the avatar is me. I'm *that* strange. It happens. Sometimes people act like that. Just go with it. I can offer help with suggestions even before you post them - NOT make your suggestions - but help you with them.
Does that mod tell you the exact damage of what mobs are doing to you?
Printing information to the console assumes you are writing code in Java, yes. If you are not, then I have no idea how you plan to acquire this data.
And yes, it tells you the exact amount of damage being done to any entity, using some pretty simple Java in combination with Forge hooks, but it's in real time while you are fighting in the game, whereas yours seems to be designed more as a utility for running a table-top version of Minecraft. Unless you intend it to give real-time feedback? I wouldn't imagine so by looking at the GUI (which looks nice, btw).
Printing information to the console assumes you are writing code in Java, yes. If you are not, then I have no idea how you plan to acquire this data.
How do I set up such a console? Or is that too long to explain in one post?
Rollback Post to RevisionRollBack
Yeah, that guy in the avatar is me. I'm *that* strange. It happens. Sometimes people act like that. Just go with it. I can offer help with suggestions even before you post them - NOT make your suggestions - but help you with them.
How do I set up such a console? Or is that too long to explain in one post?
You don't set one up - if you are running your mod through an IDE such as Eclipse, it already has a console. If you are running your mod in actual Minecraft, you have the launcher console if you set it to stay open. If you are writing an actual standalone program, when it runs it should have a little window where any output is shown.
Printing things to the screen is the very first thing one learns when beginning to code.
You don't set one up - if you are running your mod through an IDE such as Eclipse
Does Eclipse, by default, print the mob damages via console?
Rollback Post to RevisionRollBack
Yeah, that guy in the avatar is me. I'm *that* strange. It happens. Sometimes people act like that. Just go with it. I can offer help with suggestions even before you post them - NOT make your suggestions - but help you with them.
Does Eclipse, by default, print the mob damages via console?
No, you'll have to setup an eventhandler. Also there's an important distinction between Eclipse and Forge. You are modding Minecraft with Forge, not Eclipse. Eclipse is just an IDE, its purpose is to make coding easier by doing things like warning you about syntax errors or missing imports.
I see you are a programmer, what language do you use?
No, you'll have to setup an eventhandler. Also there's an important distinction between Eclipse and Forge. You are modding Minecraft with Forge, not Eclipse. Eclipse is just an IDE, its purpose is to make coding easier by doing things like warning you about syntax errors or missing imports.
I see you are a programmer, what language do you use?
Visual Basic, C++, C#, a very amount of Java, PHP, ASM.
I'm starting to think this program of mine is more trouble than it's really worth. I might just give up on the program altogether.
Rollback Post to RevisionRollBack
Yeah, that guy in the avatar is me. I'm *that* strange. It happens. Sometimes people act like that. Just go with it. I can offer help with suggestions even before you post them - NOT make your suggestions - but help you with them.
Are you using an IDE while coding? Do you have a basic Forge mod setup that you can run?
If the answer to both is yes, it is trivial to set up a LivingHurtEvent listener to print damage out to your IDE's console:
public class DamageLogger {
@SubscribeEvent
public void onHurt(LivingHurtEvent event) {
if (event.source.getEntity() != null) { // otherwise you'll get spammed with suffocation damage, fall damage, etc.
System.out.println(String.format("Entity class %s hurt for %.2f damage", event.entity.getClass().getSimpleName(), event.ammount));
}
}
}
// in your main mod class:
@Mod.EventHandler
public void init(FMLPreInitializationEvent event) {
// all your other mod initialization code
// now register your event handling class:
MinecraftForge.EVENT_BUS.register(new DamageLogger());
}
Simple as that, you have exact amounts of damage being done to all entities in the game when attacked by another entity.
Are you using an IDE while coding? Do you have a basic Forge mod setup that you can run?
-snip-
I'm pretty sure I have Forge set up already. All I have to do is copy and paste that code of yours? Where do I do that?
Rollback Post to RevisionRollBack
Yeah, that guy in the avatar is me. I'm *that* strange. It happens. Sometimes people act like that. Just go with it. I can offer help with suggestions even before you post them - NOT make your suggestions - but help you with them.
I'm pretty sure I have Forge set up already. All I have to do is copy and paste that code of yours? Where do I do that?
"pretty sure" is not an unequivocal 'yes', and if you don't know for sure and you don't know where that code goes, then you very likely do not have a Forge modding workspace set up, which is an entirely different beast than installing Forge so you can play mods.
I'm the link I'm clicking is "Src" on the website? Is that what I want?
Rollback Post to RevisionRollBack
Yeah, that guy in the avatar is me. I'm *that* strange. It happens. Sometimes people act like that. Just go with it. I can offer help with suggestions even before you post them - NOT make your suggestions - but help you with them.
's a good tutorial on how to setup a modding environment by Lex Manos himself. Beyond that you can just search for 'beginning modding tutorials' and come up with plenty of results.
Looks like I must go on an interesting conquest for my program to be accurate. Be honest, is my program pointless, or is it something that might actually be helpful?
Rollback Post to RevisionRollBack
Yeah, that guy in the avatar is me. I'm *that* strange. It happens. Sometimes people act like that. Just go with it. I can offer help with suggestions even before you post them - NOT make your suggestions - but help you with them.
Looks like I must go on an interesting conquest for my program to be accurate. Be honest, is my program pointless, or is it something that might actually be helpful?
If your program is meant to be used in-game, then that role is already filled by other mods that do this exact thing, so you'd have to make your mod (is it a mod or an external program? I'm still confused on this point) really awesome to compete with the existing ones.
If it's meant to be used outside of Minecraft... well, I don't seen any reason why someone would use it that way, but they might.
On the other hand, any project that you learn from is useful to you.
If your program is meant to be used in-game, then that role is already filled by other mods that do this exact thing, so you'd have to make your mod (is it a mod or an external program? I'm still confused on this point) really awesome to compete with the existing ones.
It's both, it can edit damage values completely or just simply print them out. This program was started a while back and forgotten about, so it was before mobs could hold other weapons so didn't need to worry about these new damage values.
If other mods already filled this role, there's no point in working on my program at all.
Rollback Post to RevisionRollBack
Yeah, that guy in the avatar is me. I'm *that* strange. It happens. Sometimes people act like that. Just go with it. I can offer help with suggestions even before you post them - NOT make your suggestions - but help you with them.
I presume this all needs to be done with Forge?
Yup.
Does that mod tell you the exact damage of what mobs are doing to you?
Yeah, that guy in the avatar is me. I'm *that* strange. It happens. Sometimes people act like that. Just go with it. I can offer help with suggestions even before you post them - NOT make your suggestions - but help you with them.
Unofficial Suggestions Guide (2.0) - by Theriasis
Unofficial Critics Guide - by yoshi9048
Printing information to the console assumes you are writing code in Java, yes. If you are not, then I have no idea how you plan to acquire this data.
And yes, it tells you the exact amount of damage being done to any entity, using some pretty simple Java in combination with Forge hooks, but it's in real time while you are fighting in the game, whereas yours seems to be designed more as a utility for running a table-top version of Minecraft. Unless you intend it to give real-time feedback? I wouldn't imagine so by looking at the GUI (which looks nice, btw).
How do I set up such a console? Or is that too long to explain in one post?
Yeah, that guy in the avatar is me. I'm *that* strange. It happens. Sometimes people act like that. Just go with it. I can offer help with suggestions even before you post them - NOT make your suggestions - but help you with them.
Unofficial Suggestions Guide (2.0) - by Theriasis
Unofficial Critics Guide - by yoshi9048
You don't set one up - if you are running your mod through an IDE such as Eclipse, it already has a console. If you are running your mod in actual Minecraft, you have the launcher console if you set it to stay open. If you are writing an actual standalone program, when it runs it should have a little window where any output is shown.
Printing things to the screen is the very first thing one learns when beginning to code.
Does Eclipse, by default, print the mob damages via console?
Yeah, that guy in the avatar is me. I'm *that* strange. It happens. Sometimes people act like that. Just go with it. I can offer help with suggestions even before you post them - NOT make your suggestions - but help you with them.
Unofficial Suggestions Guide (2.0) - by Theriasis
Unofficial Critics Guide - by yoshi9048
No, you'll have to setup an eventhandler. Also there's an important distinction between Eclipse and Forge. You are modding Minecraft with Forge, not Eclipse. Eclipse is just an IDE, its purpose is to make coding easier by doing things like warning you about syntax errors or missing imports.
I see you are a programmer, what language do you use?
Please don't PM me asking for help, I will just redirect you to the appropriate forum, where there are others who are far more skilled than me.
This is not the signature you are looking for.
Banners and such things
Visual Basic, C++, C#, a very amount of Java, PHP, ASM.
I'm starting to think this program of mine is more trouble than it's really worth. I might just give up on the program altogether.
Yeah, that guy in the avatar is me. I'm *that* strange. It happens. Sometimes people act like that. Just go with it. I can offer help with suggestions even before you post them - NOT make your suggestions - but help you with them.
Unofficial Suggestions Guide (2.0) - by Theriasis
Unofficial Critics Guide - by yoshi9048
Are you using an IDE while coding? Do you have a basic Forge mod setup that you can run?
If the answer to both is yes, it is trivial to set up a LivingHurtEvent listener to print damage out to your IDE's console:
Simple as that, you have exact amounts of damage being done to all entities in the game when attacked by another entity.
I'm pretty sure I have Forge set up already. All I have to do is copy and paste that code of yours? Where do I do that?
Yeah, that guy in the avatar is me. I'm *that* strange. It happens. Sometimes people act like that. Just go with it. I can offer help with suggestions even before you post them - NOT make your suggestions - but help you with them.
Unofficial Suggestions Guide (2.0) - by Theriasis
Unofficial Critics Guide - by yoshi9048
"pretty sure" is not an unequivocal 'yes', and if you don't know for sure and you don't know where that code goes, then you very likely do not have a Forge modding workspace set up, which is an entirely different beast than installing Forge so you can play mods.
I'm the link I'm clicking is "Src" on the website? Is that what I want?
Yeah, that guy in the avatar is me. I'm *that* strange. It happens. Sometimes people act like that. Just go with it. I can offer help with suggestions even before you post them - NOT make your suggestions - but help you with them.
Unofficial Suggestions Guide (2.0) - by Theriasis
Unofficial Critics Guide - by yoshi9048
's a good tutorial on how to setup a modding environment by Lex Manos himself. Beyond that you can just search for 'beginning modding tutorials' and come up with plenty of results.
Looks like I must go on an interesting conquest for my program to be accurate. Be honest, is my program pointless, or is it something that might actually be helpful?
Yeah, that guy in the avatar is me. I'm *that* strange. It happens. Sometimes people act like that. Just go with it. I can offer help with suggestions even before you post them - NOT make your suggestions - but help you with them.
Unofficial Suggestions Guide (2.0) - by Theriasis
Unofficial Critics Guide - by yoshi9048
If your program is meant to be used in-game, then that role is already filled by other mods that do this exact thing, so you'd have to make your mod (is it a mod or an external program? I'm still confused on this point) really awesome to compete with the existing ones.
If it's meant to be used outside of Minecraft... well, I don't seen any reason why someone would use it that way, but they might.
On the other hand, any project that you learn from is useful to you.
It's both, it can edit damage values completely or just simply print them out. This program was started a while back and forgotten about, so it was before mobs could hold other weapons so didn't need to worry about these new damage values.
If other mods already filled this role, there's no point in working on my program at all.
Yeah, that guy in the avatar is me. I'm *that* strange. It happens. Sometimes people act like that. Just go with it. I can offer help with suggestions even before you post them - NOT make your suggestions - but help you with them.
Unofficial Suggestions Guide (2.0) - by Theriasis
Unofficial Critics Guide - by yoshi9048