Justin_Perry
Members-
Posts
27 -
Joined
-
Last visited
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
Justin_Perry's Achievements
Tree Puncher (2/8)
0
Reputation
-
Alright, I give up on modding, thanks guys.
-
I was looking at how to use onItemUse, nothing more.
-
I was googling what other people used to execute a function when an item was right clicked. I found some old information and tried to incorporate it in 1.12. Apparently, it did not work. I found a youtube video that used the ActionResult<ItemStack> other than that, I was at a loss. I found no information that would have lead me to EnumActionResult. I have since implemented what DavidM suggested and it works.
-
Telling me I don't know how to override is a complete insult. I have at least an item that heals others. I obviously had to override to do that. The issue is mostly the lack of forge documentation for low-level modders to look into. I have learned Python, taken C++ courses, and learned a moderate amount of Java.
-
I would rather have a lesser understanding of java on my own than continue to be ridiculed. I searched high and low on information on onItemUse, while your eventual solution may have worked, you have made me really discouraged from asking for more help. I haven't learned everything in Java, no. But I do know how to make classes, variables, functions, and a bit more. Again, I appreciate your help, but you are not a nice person. Please refrain from talking to me anymore.
-
Alright, thank you for nothing. I will figure everything else I'll need to make this mod by myself or by reading. Thanks
-
Something that may be easy for you to understand and interpret can be hard for others. I have checked my parameters. public class stimSelf extends Item implements IHasModel { public stimSelf(String name) { setUnlocalizedName(name); setRegistryName(name); setCreativeTab(CreativeTabs.MISC); modItems.ITEMS.add(this); } @Override public void registerModels() { Main.proxy.registerItemRenderer(this, 0, "inventory"); } @Override public ActionResult<ItemStack> onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int par7, float xFloat, float yFloat, float zFloat) { if (player.getHealth() < player.getMaxHealth()) { System.out.println("We healed."); player.setHealth(player.getHealth() + 5.0F); player.getCooldownTracker().setCooldown(modItems.STIM_SELF, 300); return new ActionResult<ItemStack>(EnumActionResult.SUCCESS, stack); }else { System.out.println("We have not healed."); return new ActionResult<ItemStack>(EnumActionResult.FAIL, stack); } } } You tell me.
-
Not very helpful.
-
public class stimSelf extends Item implements IHasModel { public stimSelf(String name) { setUnlocalizedName(name); setRegistryName(name); setCreativeTab(CreativeTabs.MISC); modItems.ITEMS.add(this); } @Override public void registerModels() { Main.proxy.registerItemRenderer(this, 0, "inventory"); } @Override public ActionResult<ItemStack> onItemUse(ItemStack itemStack, World world, EntityPlayer player) { if (player.getHealth() < player.getMaxHealth()) { System.out.println("We healed."); player.setHealth(player.getHealth() + 5.0F); player.getCooldownTracker().setCooldown(modItems.STIM_SELF, 300); }else { System.out.println("We have not healed."); } return null; } } I have no output. Can you help? Warning: The method onItemUse(ItemStack, World, EntityPlayer) of type stimSelf must override or implement a supertype method. Thank you.
-
I am trying to have my item heal when the player right clicks with it out. How should I go about this? Thank you. I realize I know how to increase the health, add a cooldown, I'm familiar with getting health, setting health. I would use itemInteractionForEntity however, I do not know how to heal without interacting with an entity which may be compromising in an intense fight.
-
Sorry for being so vague, I am just trying to accomplish one thing with the easiest route. I think avoiding ray tracing is the way to go. I particularly like constant health bar or hearts above the entities while in range. I am looking into RenderLivingEvent. Thank you
-
Thank you for your useless comment. I am not asking for code as you can clearly see, so I will reply to whoever is attempting to assist me when I get past a certain stage asking for more clarification and guidance. I am taking guidance and putting my spin on it. I understand there are mods that do this, I am attempting to make one big mod for my friends and I, instead of downloading many mods that others have created. I have a friend who particularly does not like mods simply because they do not blend well and that is what I am here to accomplish. I appreciate your assistance, however, it is anything but. Have a great day.
-
I have created a basic gui that displays text on the screen. How should I go about getting an entities health when the player hovers over them? If not hover, how can I make health permanently show?
-
I want to create health bars and I need guidance to how I should go about this. Thank you.
-
[Solved]1.12 Creating New Harvest Levels?
Justin_Perry replied to Justin_Perry's topic in Modder Support
I corrected my issue yesterday by including the new ore blocks into the effective-on set within Minecraft and including them within the exceptions list for harvest levels. Thank you all for being helpful and not getting frustrated by my stupidity.