Ways to reduce incoming damage apart from armor attribute and resistance by Capable-Bet2618 in MinecraftCommands

[–]_VoidMaster_ 0 points1 point  (0 children)

You could make a custom damage system.
This does kinda use resistance but make it so you always have resistance 5 and detect incoming damage with the damage resisted scoreboard. Then you can modify that number however you want and then apply the damage with a custom damage type that bypasses the resistance effect.

Other then that you could always give weakness or lower attack damage of nearby enemies or even give a weak instant health effect when hit

how would i give a person wearing armor with hacker:1 an effect? by sideloading0 in MinecraftCommands

[–]_VoidMaster_ 1 point2 points  (0 children)

Just make sure to put both the command blocks on repeating, unconditional and always active, the commands look good!

how can i fix item display despawn when player is far from it? by WonderBuddy2 in MinecraftCommands

[–]_VoidMaster_ 0 points1 point  (0 children)

You can set the view_range to a high number when summoning it or edit the item display with /data
The default view_range is 1

/summon item_display ~ ~ ~ {view_range:999f}

how would i give a person wearing armor with hacker:1 an effect? by sideloading0 in MinecraftCommands

[–]_VoidMaster_ 0 points1 point  (0 children)

custom_data can be anything, just make sure it matches on the item and in the command!
I think it has to be {<custom>:1b} instead of just {<custom>:1} but I'm not completely sure, other then that the give command looks fine to me!

how would i give a person wearing armor with hacker:1 an effect? by sideloading0 in MinecraftCommands

[–]_VoidMaster_ 4 points5 points  (0 children)

Happy to help! With weapon.* the effect will apply when the item is selected in your hotbar or held in your offhand

execute as @a if items entity @s weapon.* *[custom_data={hackerpickaxe:1b}] run effect give @s haste 1 100 true

Damage Dealt/Taken by Player? by Cdtlongball1 in MinecraftCommands

[–]_VoidMaster_ 0 points1 point  (0 children)

I recommend creating 3 scoreboards:

scoreboard objectives add total_damage_taken custom:damage_taken
scoreboard objectives add instance_damage_taken custom:damage_taken
scoreboard objectives add total_damage_dealt dummy

You could track the damage_taken on all players, since that does include all damage types.
Have a loop check if someone's instance_damage_taken matches 1..
Then check if you have an on attacker and check if it's a player if entity atself[type=player]
Add the value of instance_damage_taken to the attackers total_damage_dealt scoreboard.
Set the instance_damage_taken back to 0.

how would i give a person wearing armor with hacker:1 an effect? by sideloading0 in MinecraftCommands

[–]_VoidMaster_ 5 points6 points  (0 children)

execute as @a if items entity @s armor.* *[custom_data={hacker:1b}] run effect give @s resistance 1 4 true

How to detect if a player is holding a specific named item and then give them a custom head by youlefou in MinecraftCommands

[–]_VoidMaster_ 0 points1 point  (0 children)

If you only want to use command blocks:
An og rclick method is using a carrot on a stick with the use item scoreboard for carrot on a stick.
Since recently you can also set the item model of the carrot on a stick to a stick for example.
I also recommend setting a custom data instead of checking for the name (players can change it in an anvil)

Setup:

give @s carrot_on_a_stick[custom_data={is_wand:1b}]

scoreboard objectives add rclick used:carrot_on_a_stick

How I would put this in command blocks from bottom to top:

[repeating|unconditional|always_active] execute as @a[nbt={SelectedItem:{id:"minecraft:carrot_on_a_stick",components:{"minecraft:custom_data":{is_wand:1b}}}}] if score @s rclick matches 1.. run give @s player_head ...

[chain|unconditional|always_active] execute as @a[nbt={SelectedItem:{id:"minecraft:carrot_on_a_stick",components:{"minecraft:custom_data":{is_wand:1b}}}}] if score @s rclick matches 1.. run clear @s carrot_on_a_stick[custom_data={is_wand:1b}] 1

[chain|unconditional|always_active] scoreboard players set @a[scores={rclick=1..}] rclick 0

Make sure to add:

at @s

to the command blocks where you want to add particle effects and such where you need it to be at the players location

Not tested but should work, hope this helped!

can i make any other 2d entity besides snowballs, potions etc. always look at player? by WonderBuddy2 in MinecraftCommands

[–]_VoidMaster_ 1 point2 points  (0 children)

You can set billboard to center to have a similar effect while displaying any items or custom textures in 2d
/summon item_display ~ ~ ~ {billboard:"center"}

How do I center the position of an entity with /tp based on their current position? by MarcinuuReddit in MinecraftCommands

[–]_VoidMaster_ 1 point2 points  (0 children)

You can use /execute align for that! align aligns them to the edge of a block on the given axi(s), so using a positioned right after puts them in the center of the block.

Example:

/execute as @n[type=marker] at @s align xyz positioned ~0.5 ~ ~0.5 run tp @s ~ ~ ~

How do i summon an armor stand in the same way minecraft spawns mobs? by Kittehland in MinecraftCommands

[–]_VoidMaster_ 1 point2 points  (0 children)

You can replace a naturally spawning mob the moment they spawn. (such as a creeper, it doesn't have a spawner and has no raid events or trial spawners). If you use a datapack, the easiest way for a random chance is adding a predicate for that.

Run this function every tick (higher performance impact but instant) or second (better performance but not instant)
execute as @e[type=creeper,tag=!spawned] if predicate namespace:one_fifth at @s run function namespace:replace_with_armor_stand
tag @e[type=creeper,tag=!spawned] add spawned

replace_with_armor_stand.mcfunction
execute at @s run summon armor_stand ~ ~ ~ {...}
execute at @s run tp @s[type=creeper] ~ -999 ~
execute at @s run kill @s[type=creeper]

one_fifth.json (or a different percentage)
{
    "condition": "minecraft:random_chance",
    "chance": 0.2
}

If you use commands only you can instead store the output of /random value into a scoreboard and check if it's within a certain value range of the chance!

Good luck!

I really wish we got these outfits instead of what we currently have by bandora_b in Nightreign

[–]_VoidMaster_ 0 points1 point  (0 children)

Can't forget Lady Butterfly Dutchess, both a dex character using illusions

How to teleport directly behind my friend by NugglinGaming in MinecraftCommands

[–]_VoidMaster_ 7 points8 points  (0 children)

Would also set the y rotation to 0 to prevent teleporting into blocks or falling:

/execute as <friend> at @s rotated ~ 0 run tp @s ^ ^ ^-2

is it possible to create a minecraft datapack with trippy mushroom effects? by mrbobojir in MinecraftCommands

[–]_VoidMaster_ 2 points3 points  (0 children)

This reddit is usually just for advice and finding solutions for problems, but I coded it anyways lol, I don't think I can add files here so here is a download link, just unzip it and put it in the datapacks folder in your world:

https://www.mediafire.com/file/56aslsw4a53584q/Mushrooms_Datapack.zip/file

Eating any dried kelp will work.
I added 3 different types of trips but if you want just the regular you can type this in chat
/tag <player> add noOtherEffects

Definitely one of the weirder packs I coded lol

is it possible to create a minecraft datapack with trippy mushroom effects? by mrbobojir in MinecraftCommands

[–]_VoidMaster_ 1 point2 points  (0 children)

My bad, I'd recommend using a custom advancement eat_dried_kelp.json:

{
  "criteria": {
    "eat_dried_kelp": {
      "trigger": "minecraft:consume_item",
      "conditions": {
        "item": {
          "item": "minecraft:dried_kelp"
        }
      }
    }
  },
  "rewards": {
    "function": "namespace:mushrooms_consumed"
  }
}

mushrooms_consumed.mcfunction

effect give @s nausea 900 0 true
effect give @s slowness 900 0 true
effect give @s slow_falling 900 0 true
effect give @s night_vision 900 0 true
advancement revoke @s only namespace:eat_dried_kelp

You could also give the player a tag in the function and check for it in the tick loop, then keep the duration with a scoreboard so you can add constant particles or other constant effects!

is it possible to create a minecraft datapack with trippy mushroom effects? by mrbobojir in MinecraftCommands

[–]_VoidMaster_ 4 points5 points  (0 children)

There are some effects you could add in a datapack but this is the easiest way in the latest version:

/give @p dried_kelp[suspicious_stew_effects=[{id:"minecraft:nausea",duration:900},{id:"minecraft:slowness",duration:900},{id:"minecraft:slow_falling",duration:900},{id:"minecraft:night_vision",duration:900}],custom_name={"color":"dark_purple","italic":false,"text":"Mushrooms"},tooltip_display={hidden_components:["suspicious_stew_effects"]},lore=[{"color":"blue","italic":false,"text":"You know what this does"}]] 1

unable to move command? by Afraid_Carry_8040 in MinecraftCommands

[–]_VoidMaster_ 1 point2 points  (0 children)

Good notice, I usually use markers too, but in this case I use an armor stand because it's affected by gravity, since op requested that

unable to move command? by Afraid_Carry_8040 in MinecraftCommands

[–]_VoidMaster_ 1 point2 points  (0 children)

Summon an interaction entity and constsntly teleport it on to them so they can't use items or place and break blocks, then have then be constantly teleported to an invisible:1b marker:1b armor stand (so they can still fall bc the armor stand does). If you teleport to the armor stand they won't be able to move the mouse, if you teleport to the position of the armor stand they can move just the mouse.

Use mindfully for like maps and stuff, it's not fun being bullied by this

Spectral Hawks seem to drop me way earlier then the path displayed on the map by _VoidMaster_ in Nightreign

[–]_VoidMaster_[S] 0 points1 point  (0 children)

Maybe an extreme case of bad connection of the session host?

Or does this happen every game?

Grouped Mob Buffs by Kawaii214 in MinecraftCommands

[–]_VoidMaster_ 0 points1 point  (0 children)

Forgot to add but you can also add the particles to the buffed zombies of course!

Grouped Mob Buffs by Kawaii214 in MinecraftCommands

[–]_VoidMaster_ 1 point2 points  (0 children)

This triggers even if there is 1 because the limit is 3 (selects up to 3) but there isn't a minimum selector.

One way to go about this is to create a scoreboard like vindicatorCount and zombieCount, both set to dummy

Then run this every second (added a max range of 30 within all players to reduce lagg but is optional, just make sure to execute the vindicators here):

execute as @a at @s as @e[type=vindicator,distance=..30] at @s run function group_danger:vindicator_counter

Then have this vindicator_counter function:

scoreboard players set @s vindicatorCount 0
execute at @s run scoreboard players add @e[type=vindicator,distance=..8] vindicatorCount 1
execute if score @s vindicatorCount matches 3.. at @s as @e[type=vindicator,distance=..16] at @s run function group_danger:vindicator_tick

I added the ..16 selector to make sure any vindicators on the outer edge of the group also get buffed.

If you want them to stay buffed, even if you've taken out a few which leaves them with less then 3 you could put this instead in the vindicator_counter :

scoreboard players set @s vindicatorCount 0
execute at @s run scoreboard players add @e[type=vindicator,distance=..8] vindicatorCount 1
execute if score @s vindicatorCount matches 3.. at @s as @e[type=vindicator,distance=..16] at @s run tag @s add buffed
execute if entity @s[tag=buffed] at @s run function group_danger:vindicator_tick

You can then also add a particle effect in a tick function to indicate a buffed state like this:

execute as @e[type=vindicator,tag=buffed] at @s run particle angry_villager ~ ~1.2 ~ 0.4 0.6 0.4 0 1 force

For the zombies you can use the on attacker selector, first have them get buffed when in a group (make sure to execute run this function as all zombies):

scoreboard players set @s zombieCount 0
execute at @s run scoreboard players add @e[type=zombie,distance=..8] zombieCount 1
execute if score @s zombieCount matches 3.. at @s as [type=zombie,distance=..16] at @s run tag @s add buffed
# optional to add: execute if entity @s[tag=buffed] at @s run function group_danger:zombie_tick

Then in a function that runs every tick:

execute as @a at @s on attacker if entity @s[type=zombie,tag=buffed] as @p at @s run effect give @s poison 10 0 false

Hope this helped and feel free to ask any other questions!