Started by
proxerater
on
Topic category: Help with MCreator software
I can't figure it out. Maybe i'm just stupid? help please!
The problem is is that i don't what to put in "while" because i only want it to do these two events. Help!
Here's the picture....
Edited by proxerater on Sat, 10/27/2018 - 09:35
Try removing the while...
I had already tried that and it came up with this.
https://imgur.com/a/QzV3gjc
In required dependencies, it says "itemstack".
Proxerater, I believe I have a solution to your problem. I've been working on making several tools with various effects on right click. This is however a very lengthy explanation.
For explanation purposes I'm using brackets as a place holder for events: [example event], and parentheses as a place holder for user defined variables: (example variable). For sake of neatness, I use alphabetical order with my events as much as possible.
In the procedure system, you need two specific events: from the Player Management tab, grab the [Add Potion With Level (define level here) And Duration (define duration here) To Provided Player -Potion: (select potion here)]. And the other event from the Item Modifications tab, [Deal The Provided Item Damage Of Amount (specify damage dealt here)]
Once you have those in the workspace, if you're unfamiliar with the PS, you'll want to arrange the events like so below:
[Event Trigger]
[Add potion with level () and duration () to provided player - potion ()]
[Deal the provided item damage of amount ()]
I hope this helps, have a nice day/night depending on when/if you read this.
This is as a post script for my comment above, I realize you may not know that you need to link the new procedure to the item you want it to work with.
Open/edit the item you want the procedure linked to and when you get to the Add Procedure page, click the drop tab on When Right Clicked In Air/On Block and add your procedure to your desired option.
Personally, I advise against adding it to On Item Creation, as that will cost your item usage before you're ready to use it. I also advise against adding it to When Block Destroyed With Tool as then it's costing you extra usage each time you mine any block.
Oh, i know this thank you.
Ok, well, thank you for the help buuuuttt....
a new problem happened. It says "itemstack" in a red color. Please let me know if i did something wrong...
https://imgur.com/a/lSO1htl
So, I've spent a few minutes looking over your code and nothing is wrong with it, the itemstack is supposed to be in red as the color shows what type of code it is the procedure affects: blue(xyz), tan(world), green(entity), purple(block), red(item), and green(GUI/inventory).
Hope this helps
ok.
So i tested it.. and...
Sorry, it didnt show the image
here it is https://imgur.com/a/JK89Eux
Did you attempt loading the mod in Minecraft or the sim within MCreator?
don't know what a sim is, but i used the mod within MCreators' minecraft launcher
Sim is short for simulation. The launcher in MCreator only simulates a Minecraft client, personally I prefer using Minecraft itself by exporting the mod to my Minecraft mod folder. When I tried using the client sim, my computer crashed, so I used "Test" as the mod name and put it in Minecraft. For me, the code is more stable there. While testing, I take notes on what I need to change before quiting, deleting my test mod, and fixing my code or continuing with the mod if I'm content with it.
Just remove the while/do block and just put the lose durability under the potion effect
I've actually done this in my mod, so I can confirm the method I have used does work. Just note that Damage Durability doesn't necessarily (unless I'm doing it wrong) calculate correctly, so it is possible to obtain negative Durability. Hope this helps. The example I've given is when a Diamond Sword in your main hand has been Right-Clicked.