Height shouldn't matter except for the single block jumps, so just x and z is probably fine.
Alright, i've removed the extra bits and added comments for everything, i hope this version is a bit clearer
Lines starting with // are comments - meaning nothing would change if they were removed (the mod ignores those lines), they're simply there for explanation
Edit: Wanted to at least highlight the comments but can't get the forums to cooperate
//
// Configuration
//
// How close we need to get to the target
#threshold = 0
//
// Waypoints
//
// Reset the array so that the list doesn't get bigger every time the script is run
UnSet(#walkx[])
UnSet(#walkz[])
// Add one coordinate
#walkx[] = 10
#walkz[] = 10
// Add another coordinate
#walkx[] = 10
#walkz[] = 0
//
// Code
//
// A common snippet used to make a script toggleable (let me know if you want an explanation of this)
TOGGLE;IF;Log("Stopped");Keyup(jump);Keyup(forward);STOP;ENDIF;
// How many total coordinates do we have?
#size = ArraySize(#walkx[])
#size = #size - 1
// For each waypoint
FOR(#i = 0 to %#size%)
// Copy the coordinates to shorter variables for convenience
#x = #walkx[%#i%]
#y = #walky[%#i%]
#z = #walkz[%#i%]
// Start walking
keydown(forward)
// Repeat this part until we reach the waypoint
// This part handles looking towards the coordinate and jumping if necessary
DO()
// Look towards the waypoint on the x-z plane
calcyawto(%#x%,%#z%,#yaw,#dist);
inc(#yaw,180); // Fix because minecraft yaw is 180 degrees off
look(%#yaw%,+0); // +0 means do not affect pitch (you can still control pitch with the mouse then)
// ↓ Jump if blocks in the way
// Depending on which 90 degree angle you're looking towards, this will only check the three blocks that are in that sector
// sig_x - Whether we're looking more towards positive x or negative x
// sig_z - Same but for z
#sig_x = 1;
#sig_z = 1;
IF(YAW < 180); #sig_x = -1; ENDIF
IF((90 < YAW) && (YAW < 270)); #sig_z = -1; ENDIF
// Block along x axis, along y axis, and on the diagonal
&block_1 = GETIDREL(%#sig_x%,0,0)
&block_2 = GETIDREL(%#sig_x%,0,%#sig_z%)
&block_3 = GETIDREL(0,0,%#sig_z%)
// If all are air, do not jump, else jump
IFMATCHES("%&block_1%,%&block_2%,%&block_3%","air,air,air");
Keyup(jump)
ELSE;
Keydown(jump);
ENDIF;
// ↑ end
// ↓ Expose global variables
// Not important for the script, but might be handy if you want to make a GUI to show progress or something
@#walker_yaw = %#yaw%
@#walker_pitch = %#pitch%
@#walker_target_x = %#x%
@#walker_target_y = %#y%
@#walker_target_z = %#z%
@#walker_distance = %#dist%
// ↑ end
While(#threshold < #dist);
// Done walking to waypoint
Keyup(forward)
NEXT;
// Done walking to all waypoints
That's perfect, thank you. I'll try the new version out and come back with feedback yet again if there's something I can't wrap my head around. Want a small donation or something? Nothing big, just so I can thank you less superficially. It's also close to Christmas, so I guess it's kinda like an early present or something. If so, does paypal work?
Does anybody know how to compare 2 Itemnames with each other? I mean the actual name not the ids. I know that you can get the Intemname of the item in your hand with log(%ITEMNAME%); but how do I do this with items I dont have in my hands?
Does anybody know how to compare 2 Itemnames with each other? I mean the actual name not the ids. I know that you can get the Intemname of the item in your hand with log(%ITEMNAME%); but how do I do this with items I dont have in my hands?
I hope you guys know what I mean ^^
Given an ID, you can get a bunch of details using:
Given an ID, you can get a bunch of details using:
GETITEMINFO(<item[:damage]>,[&namevar],[#maxstacksize],[&type],[&dropid])</item[:damage]>
//For example
&id = GetSlotItem(9)
GetItemInfo(%&id%,&name);
Log("Slot 9 of your inventory contains %&name%")
I dont want to get the name to an id. I want to get the name of an item. For Example: if I rename a stack of Cobblestone in an Anvil with "TEST" I get using log(%ITEMNAME%); "TEST" as a response even if its Cobblestone but if I use getslotitem(%&idofitem%,&name); I get the minecraft-name to an id.
So what I am searching for is a way to get the display-name (%ITEMNAME% for the display-name of the item in my hands) of an item if I am in my inventory and want to check a specific slot.
I dont want to get the name to an id. I want to get the name of an item. For Example: if I rename a stack of Cobblestone in an Anvil with "TEST" I get using log(%ITEMNAME%); "TEST" as a response even if its Cobblestone but if I use getslotitem(%&idofitem%,&name); I get the minecraft-name to an id.
So what I am searching for is a way to get the display-name (%ITEMNAME% for the display-name of the item in my hands) of an item if I am in my inventory and want to check a specific slot.
hm - i don't think there's any commands for that - with vanilla you'll have to move the item to your hotbar and select it i suppose
Probably very complicated, but if this is critical you could install spthiel's "Not enough information" module which adds a fifth parameter to GetSlotItem that returns the nbt data Then you'll need to somehow extract the name from that (i believe it gives you a json string)
How do you find the ID of a specific script, because I need to know how to stop a script, it would be helpful if you could tell me the command to stop all scripts aswell. I would like to have a macro that stops the scripts.
STOP([ ]) Stops the current macro, or macros matching the specified ID
The Meaning of Life, the Universe, and Everything.
Join Date:
5/28/2014
Posts:
285
Location:
USA
Minecraft:
TheUnderTaker11
Member Details
Hey guys, sorry if this has been answered but I got a question.
Is there any way to make my scripts run as soon as I join a server/world? Like right when I join the scripts start themselves?
Rollback Post to RevisionRollBack
Want a mod with the best magnets available? The download Better Magnets!
And if you like Avaritia then you will love More Avaritia! Adds recipes for creative items from a huge list of mods, and even adds more custom items that fit the Avaritia theme!
The Meaning of Life, the Universe, and Everything.
Join Date:
5/28/2014
Posts:
285
Location:
USA
Minecraft:
TheUnderTaker11
Member Details
I got another question now I could use help with, is there any way for me to tell what enchantments and item has on it in my script? Even just telling if it is enchanted at all would work fine.
Rollback Post to RevisionRollBack
Want a mod with the best magnets available? The download Better Magnets!
And if you like Avaritia then you will love More Avaritia! Adds recipes for creative items from a huge list of mods, and even adds more custom items that fit the Avaritia theme!
can you publish the source code of the MacroMod to Github? I guess there are many developers which are going to fork it and provide a version of the awesome MacroMod for the latest Minecraft version.
@user-100236000 Mumfrey is still working on updating the mod. Furthermore there will be no use to this as you would need to also update liteloader which you aren't allowed to share due to the license
Where did you get this information? Liteloader is for MC 1.12.2. MC 1.15.2 is going to be released soon. I cant see any commits to Liteloader. Mumfrey is working on Mixin, which is amazing. But there are no updates of liteloader. Also Liteloader is not required to run MacroMod in the latest MC version. You can use Fabric which uses the same techniques (Mixins).
@user-100236000 macromod in fact has it's latest version 1.12.1 which still requires liteloader. So you are probably talking about something else while thinking it's macromod. Furthermore I got the info via discord where mumfrey responded to the question if liteloader will live beyond 1.12 with "of course" and "why wouldn't it". Now true, this does not say that macromod will be updated because he's only talking about liteloader but I believe it's easier to update macromod than liteloader
Alright, i've removed the extra bits and added comments for everything, i hope this version is a bit clearer
Lines starting with // are comments - meaning nothing would change if they were removed (the mod ignores those lines), they're simply there for explanation
Edit: Wanted to at least highlight the comments but can't get the forums to cooperate
'Cause tomorrow spring is here
That's perfect, thank you. I'll try the new version out and come back with feedback yet again if there's something I can't wrap my head around. Want a small donation or something? Nothing big, just so I can thank you less superficially. It's also close to Christmas, so I guess it's kinda like an early present or something. If so, does paypal work?
nah
'Cause tomorrow spring is here
Hey,
Does anybody know how to compare 2 Itemnames with each other? I mean the actual name not the ids. I know that you can get the Intemname of the item in your hand with log(%ITEMNAME%); but how do I do this with items I dont have in my hands?
I hope you guys know what I mean ^^
Given an ID, you can get a bunch of details using:
GETITEMINFO(<item[:damage]>,[&namevar],[#maxstacksize],[&type],[&dropid])
//For example
&id = GetSlotItem(9)
GetItemInfo(%&id%,&name);
Log("Slot 9 of your inventory contains %&name%")
'Cause tomorrow spring is here
How do you get constant negative pitch values for the look command? Using minus just makes the pitch relative.
add 360 to it
'Cause tomorrow spring is here
I dont want to get the name to an id. I want to get the name of an item. For Example: if I rename a stack of Cobblestone in an Anvil with "TEST" I get using log(%ITEMNAME%); "TEST" as a response even if its Cobblestone but if I use getslotitem(%&idofitem%,&name); I get the minecraft-name to an id.
So what I am searching for is a way to get the display-name (%ITEMNAME% for the display-name of the item in my hands) of an item if I am in my inventory and want to check a specific slot.
hm - i don't think there's any commands for that - with vanilla you'll have to move the item to your hotbar and select it i suppose
Probably very complicated, but if this is critical you could install
spthiel's "Not enough information" module which adds a fifth parameter to GetSlotItem that returns the nbt dataThen you'll need to somehow extract the name from that (i believe it gives you a json string)Edit: See post below
'Cause tomorrow spring is here
Instead of using the NotEnoughInformation module I recommend getSlotItemExt module which also adds an action specifically to get the name.
This allows you to skip the step where you have to get the name from the nbt
How do you find the ID of a specific script, because I need to know how to stop a script, it would be helpful if you could tell me the command to stop all scripts aswell. I would like to have a macro that stops the scripts.
STOP([ ]) Stops the current macro, or macros matching the specified ID
Thanks.
Hey guys, sorry if this has been answered but I got a question.
Is there any way to make my scripts run as soon as I join a server/world? Like right when I join the scripts start themselves?
Want a mod with the best magnets available? The download Better Magnets!
And if you like Avaritia then you will love More Avaritia! Adds recipes for creative items from a huge list of mods, and even adds more custom items that fit the Avaritia theme!
sounds like the onJoinGame event - or is there some problem with that?
Events found by either clicking the yellow arrows on the top to switch tabs, or selecting one from the 'file' menu in the corner
'Cause tomorrow spring is here
I got another question now I could use help with, is there any way for me to tell what enchantments and item has on it in my script? Even just telling if it is enchanted at all would work fine.
Want a mod with the best magnets available? The download Better Magnets!
And if you like Avaritia then you will love More Avaritia! Adds recipes for creative items from a huge list of mods, and even adds more custom items that fit the Avaritia theme!
@TheUnderTaker11 you need a module for that, I suggest GetSlotItemExt which has a getslotitemenchant function
The syntax is the same as getslotitem except of an additional parameter which stores enchantments
I have been trouble with the if/else/endif statements... they seem to not be aligning correctly. For example, this:
#stack = 64
IF (#stack==64)
LOG(ABC)
ELSE
LOG(XYZ)
ENDIF
Prints out both ABC and XYZ. What am I doing wrong?
Hey Mumfrey,
can you publish the source code of the MacroMod to Github? I guess there are many developers which are going to fork it and provide a version of the awesome MacroMod for the latest Minecraft version.
Thank you in advanced.
@user-100236000 Mumfrey is still working on updating the mod. Furthermore there will be no use to this as you would need to also update liteloader which you aren't allowed to share due to the license
@SPThiel
Where did you get this information? Liteloader is for MC 1.12.2. MC 1.15.2 is going to be released soon. I cant see any commits to Liteloader. Mumfrey is working on Mixin, which is amazing. But there are no updates of liteloader. Also Liteloader is not required to run MacroMod in the latest MC version. You can use Fabric which uses the same techniques (Mixins).
@user-100236000 macromod in fact has it's latest version 1.12.1 which still requires liteloader. So you are probably talking about something else while thinking it's macromod. Furthermore I got the info via discord where mumfrey responded to the question if liteloader will live beyond 1.12 with "of course" and "why wouldn't it". Now true, this does not say that macromod will be updated because he's only talking about liteloader but I believe it's easier to update macromod than liteloader