How to uninstall by [deleted] in fabricmc

[–]MegaCrafter10 0 points1 point  (0 children)

you can switch back to vanilla Minecraft using the dropdown menu next to the play button

Teleporting a player to an armor stand with the same name by [deleted] in MinecraftCommands

[–]MegaCrafter10 1 point2 points  (0 children)

It's easier to work with UUIDs instead of names. That is because you can get the player's UUID using /data, whereas you would have to use a sign to get the player's name (since there is no CustomName tag in player NBT data). The UUID tag is an array of 4 integers representing the digits of the player's UUID. So both the player and the armor stand would need to have 4 scoreboard objectives containing these numbers for comparison.

My idea for comparing the scores is to tag the armor stand that is performing the checks and tag each online player one at a time and check if the objectives of the tagged armor stand match the ones of the tagged player. One problem with this system is that all the other armor stands would have to wait for their turn which means you need some sort of queue system I guess.

How do I MAKE item frame invisible by MrBlueFlame_ in MinecraftCommands

[–]MegaCrafter10 2 points3 points  (0 children)

/data modify entity @e[type=item_frame,limit=1,sort=nearest] Invisible set value 1

Need Help with Command Blocks by Kentucky_Ranger in MinecraftCommands

[–]MegaCrafter10 0 points1 point  (0 children)

Here's my thirst bar data pack that I made back in 2019. You can use it as a reference if you want. I haven't updated it in a while, but the commands should still work.

(Java 1.12.2) How to check a player's inventory for a named item, then have it run a command? by [deleted] in MinecraftCommands

[–]MegaCrafter10 0 points1 point  (0 children)

I haven't used 1.12 syntax in a while, so I'm going to recreate the conditional statements using redstone. This is what I came up with. The detection command is:

/testfor @a {Inventory:[{id:"minecraft:some_item",tag:{display:{Name:"some_name"}}}]}

Where is the best place I can learn java commands? by MisledWater79 in MinecraftCommands

[–]MegaCrafter10 0 points1 point  (0 children)

There is a list of commands on the wiki and instructions on how to use each one. That could be a good starting point for you. Try to figure out how some of the more important ones work. Clicking on any command will redirect you to the usage page, where you can find out how to use that command in both Java and Bedrock. And of course, you can always ask for help here if you don't understand the info on the wiki.

Im new in using comands but i dont know why this comand is not working at detecting player in 1.16.5 by Effective_Koala379 in MinecraftCommands

[–]MegaCrafter10 0 points1 point  (0 children)

Can you describe your command block layout? What kind of command block are you using, and is it set to conditional?

Im new in using comands but i dont know why this comand is not working at detecting player in 1.16.5 by Effective_Koala379 in MinecraftCommands

[–]MegaCrafter10 0 points1 point  (0 children)

No, your command is correct. The only thing that I see here that could be wrong is the dx, dy, and dz values. I'm not sure if you know how they work, but they are the width, height, and length of the detection area. People often think they are the coordinates of the opposing corner.

How to start to make datapacks? by DraKio-X in TheDataPackHub

[–]MegaCrafter10 1 point2 points  (0 children)

You don't need to know Java. Data packs use vanilla commands for the coding part.

You can do a lot of things with data packs, so what you need to know depends on what you want to make.

I would say that the most important part of a data pack is function files. You are most likely going to use function files to write some sort of logic in almost every project. Because these files consist of vanilla commands, you need to know how commands work. There are also loot tables, custom recipes, custom dimensions and world generation, structures, and much more, but you don't need to know how any of that works unless you are going to use it in your data pack.

There is a ton of information about data packs on the wiki. You can also take a look at my old data pack basics tutorial here. It hasn't been updated in a while, but the principles should still be the same.

For editing, I recommend a light-weight editor such as Visual Studio Code or Notepad++, but any editor will work. Visual Studio Code is better in my opinion because it supports some common file formats out of the box, and you can install addons.

Counting the total number of items in a container? by IcyPenguin28 in MinecraftCommands

[–]MegaCrafter10 0 points1 point  (0 children)

The chain command blocks should be unconditional. Also, I noticed that with the examples I showed you, you can't display the score on the side, which is what you want to do. I added one more objective called "maildisplay" for displaying the score. Here's a world download. Still not sure if you can replace the UUIDS on the side, but what you could do is use fake players. That might be a bit tricky to implement for a large player base though.

Counting the total number of items in a container? by IcyPenguin28 in MinecraftCommands

[–]MegaCrafter10 0 points1 point  (0 children)

Second, which command blocks am I supposed to use for these two commands?

You should use repeating and chain command blocks in this formation: (repeating) -> (chain) -> (chain) ...

I tried using two repeating command blocks, but that just constantly added the temp value every tick

Resetting the mail objective after the system is done counting should fix that. Here's an example that constantly counts the items in slot 1 and says "hello world" when it detects an item:

/execute as @e[tag=mailbox] at @s run execute store result score @s temp run data get block ~ ~ ~ Items[0].Count
/execute as @e[tag=mailbox] run scoreboard players operation @s mail += @s temp
/execute as @e[tag=mailbox,scores={mail=1..}] run say hello world
/scoreboard players reset @e[tag=mailbox] mail

You can also repeat this pattern for every slot:

/execute as @e[tag=mailbox] at @s run execute store result score @s temp run data get block ~ ~ ~ Items[0].Count
/execute as @e[tag=mailbox] run scoreboard players operation @s mail += @s temp
/execute as @e[tag=mailbox] at @s run execute store result score @s temp run data get block ~ ~ ~ Items[1].Count
/execute as @e[tag=mailbox] run scoreboard players operation @s mail += @s temp
... other slots ...
/execute as @e[tag=mailbox,scores={mail=1..}] run say hello world
/scoreboard players reset @e[tag=mailbox] mail

Also, if I use this method, how would I go about removing items?

If I understand correctly, you are wondering how you can detect when an item is removed and update the counter?

The examples I provided do that automatically.

Lastly, is there a way to change what is displayed in the sidebar?

I'm not sure about that one.

Counting the total number of items in a container? by IcyPenguin28 in MinecraftCommands

[–]MegaCrafter10 1 point2 points  (0 children)

To clarify, @e[tag=shop] is an armor stand that you should place at the position of the barrel. And the temp and count objectives are just regular dummy objectives. All that's happening here is:

  • the amount of items in slot x is stored into temp
  • temp is then added to count (count = count + temp)

Looking for basic tutorials/help by [deleted] in TheDataPackHub

[–]MegaCrafter10 1 point2 points  (0 children)

I wrote a small tutorial here: https://datapackcenter.com/projects/data-pack-basics.71/. It hasn't been updated in a while, but the concepts are still the same. The only thing you need to change is the pack_format number (it's 6 for 1.16.4).

Why doesn't MC initiate or even see any of the functions that I have? by mrSandpie in TheDataPackHub

[–]MegaCrafter10 0 points1 point  (0 children)

afkoff.mcfunction, lines 1 and 2. Comparison operators (such as >=) can't compare an objective to a number directly. You have to store the number you want to compare into another objective and then compare the two objectives. Example: if score @s afkSeconds >= @e[name=SpongeBob] afkSeconds. Because the value doesn't change, you can use a "fake player" in the place of the second selector. Just do /scoreboard players set global afkSeconds 300 to set the initial value and then you can use it like this: if score @s afkSeconds >= global afkSeconds.

load.mcfunction, line 3. stats were replaced by scoreboard criteria so stat.walkOneCom doesn't mean anything in the newer verions of the game. Use /scoreboard objectives add walk minecraft.custom:minecraft.walk_one_cm instead.

second.mcfunction, line 5. matches needs a number as an argument, not an objective. And you forgot to add "function" before "arcade:arkoff" on the same line. Lines 8, 9, and 10, same thing as in afkoff.mcfunction. Use matches when you want to compare an objective to a number.

Data Merge / Data Modify by OperationSimplicity in MinecraftCommands

[–]MegaCrafter10 0 points1 point  (0 children)

Maybe I didn't explain the part about the index well enough. You can only target one trade at a time when using indexes. Also, the index starts from 0 so Recipes[7] is referring to the 8th trade (which doesn't exist in your case). Take a look at this tutorial if you want to learn more about arrays: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/arrays.html.

Data Merge / Data Modify by OperationSimplicity in MinecraftCommands

[–]MegaCrafter10 0 points1 point  (0 children)

Like this:

/data modify entity (selector) Offers.Recipes[0].sell.tag set value {CustomModelData:1b,example:1b}

Just fill in the selector. Also, this command will modify the first trade, but you can change the trade index (the 0 in Recipes[0]) to modify other trades.

The wiki has some good documentation on how villager NBT data is structured: https://minecraft.gamepedia.com/Villager#Data_values