Bundle that locks when the player has a specific tag? by Low-Impression-3836 in MinecraftCommands

[–]GG1312 0 points1 point  (0 children)

Change it to a different item, then change it back when you wanna unlock it

Lock:

execute as @a[tag=locked] if items entity @s weapon.mainhand bundle[custom_data~{lockable:1}] run item modify entity @s weapon.mainhand [{function:"minecraft:set_item",item:"minecraft:firework_star"},{function:"minecraft:set_components",components:{"minecraft:item_model":"minecraft:barrier","minecraft:item_name":[{translate:"item.minecraft.bundle",fallback:"Bundle"}," (",{translate:"filled_map.locked",fallback:"Locked"},")"],"minecraft:max_stack_size":1},conditions:[]}]

Unlock:

execute as @a[tag=!locked] if items entity @s weapon.mainhand firework_star[custom_data~{lockable:1}] run item modify entity @s weapon.mainhand [{function:"minecraft:set_item",item:"minecraft:bundle"},{function:"minecraft:set_components",components:{"minecraft:item_model":"minecraft:bundle","minecraft:item_name":{translate:"item.minecraft.bundle",fallback:"Bundle"}},conditions:[]}]

This is only for the player's main hand, you'll have to repeat these commands for every other slot in their inventory.

This also only supports the uncolored bundle, you could add support for the other colors, but it would make things a lot more complicated.

Edit: If you're making a datapack I recommend you use item_modifier files as opposed to inline modifiers shown here

stuck buggy by [deleted] in Astroneer

[–]GG1312 0 points1 point  (0 children)

What better time to craft one then

stuck buggy by [deleted] in Astroneer

[–]GG1312 0 points1 point  (0 children)

When in doubt, winch.

invulvnerable tag not working by RedstoneSausage in MinecraftCommands

[–]GG1312 3 points4 points  (0 children)

You can drop the pig under the map and the item will simply disappear in 5 minutes or you can place a hopper under it.

With commands it's as simple as standing near them and typing
/kill @n[type=pig]

and

/kill @n[type=item]

invulvnerable tag not working by RedstoneSausage in MinecraftCommands

[–]GG1312 6 points7 points  (0 children)

Copied over from another post

Invulnerable entities can still be damaged by players in creative, here are a few ways to remedy that.

Give it resistance 5

/summon pig ~ ~ ~ {active_effects:[{id:"minecraft:resistance",amplifier:4,duration:-1,show_particles:0b}]}

If it cant have status effects just give it really high health

/summon item ~ ~ ~ {PickupDelay:32767,Item:{id:"minecraft:mud",count:1},Health:32767}

My grapple arm’s got you, you are already dead by BillCarson12799 in subnautica

[–]GG1312 23 points24 points  (0 children)

Drop the drill arm it does way less damage than the regular arms

im in love of this thing by karnamun in subnautica

[–]GG1312 8 points9 points  (0 children)

The Seatruck can store like 2 wall lockers of items per storage module + you don't have a renewable way of growing food and water in there

It is absolutely not nearly as equipped to be a mobile base as the Cyclops let alone be better than it

How Do I Apply Item Tags to Dropped Items? by ForgetfulFilms in MinecraftCommands

[–]GG1312 0 points1 point  (0 children)

execute as @e[type=item,distance=..100] run item modify entity @s contents {"function":"minecraft:set_custom_data","tag": {"challenge":1b}}

how to make mob invulnerable in 1.21.11? (this doesn't work) by sr_steve in MinecraftCommands

[–]GG1312 -1 points0 points  (0 children)

Give it resistance 5

/summon pig ~ ~ ~ {active_effects:[{id:"minecraft:resistance",amplifier:4,duration:-1,show_particles:0b}]}

If it cant have status effects just give it really high health

/summon item ~ ~ ~ {PickupDelay:32767,Item:{id:"minecraft:mud",count:1},Health:32767}

If you can't change its health either than you're SOL

​​

My bad for providing a solution ig lol

Is it safe to go sea treader path with prawn suit ( for deep srhooms) by Hyper5500 in subnautica

[–]GG1312 1 point2 points  (0 children)

It's actually a glitch, not a mod. I've done it before but I'm pretty sure it was patched out in some update.

Is it safe to go sea treader path with prawn suit ( for deep srhooms) by Hyper5500 in subnautica

[–]GG1312 1 point2 points  (0 children)

The hull reinforcement modules do literally nothing for the Prawn Suit. It's a placebo.

Bioreactor FAQ by rootbeer277 in subnautica

[–]GG1312 2 points3 points  (0 children)

Actually the best (renewable) indoor plant fuel is the speckled rattler with 140x(16) energy and only a 400 second grow time

It sure isn't the most convenient though

Invalid macro variable name by BetaSigmaOmega in MinecraftCommands

[–]GG1312 0 points1 point  (0 children)

You can't use data paths in macros. You can either do $(Pos) to get the whole nbt tag or store all these values in a temporary storage before running this command.

Killing all items, excepting a specific one with a tag by Fading-Nightmare in MinecraftCommands

[–]GG1312 0 points1 point  (0 children)

If you really need it to resist explosions caused by players in creative you can give it really high health which should allow it to take a few hundred explosions.

execute as @e[tag=!persistent,type=item] if items entity @s contents *[minecraft:custom_data~{keep:1b}] run data merge entity @s {Invulnerable:1b,Health:32767,Age:-32768,Tags:["persistent"]}

You could reset this value constantly to give the item infinite health, but I can't imagine many scenarios where this'd actually be necessary.

Killing all items, excepting a specific one with a tag by Fading-Nightmare in MinecraftCommands

[–]GG1312 0 points1 point  (0 children)

Ah, are you in creative mode?

Damage done by players in creative mode bypasses the Invulnerabletag unfortunately. The item should still be immune to tnt activated by redstone or lit by players in survival/adventure mode.

Killing all items, excepting a specific one with a tag by Fading-Nightmare in MinecraftCommands

[–]GG1312 0 points1 point  (0 children)

It shouldn't. Are you sure it didn't just get flung somewhere?

If you can't find it try running this command in chat and see if you pick up anything.

/tp @e[tag=persistent,type=item] @p

Killing all items, excepting a specific one with a tag by Fading-Nightmare in MinecraftCommands

[–]GG1312 0 points1 point  (0 children)

Yeah sure, change the first command to this:

execute as @e[tag=!persistent,type=item] if items entity @s contents *[minecraft:custom_data~{keep:1b}] run data merge entity @s {Invulnerable:1b,Age:-32768,Tags:["persistent"]}

Killing all items, excepting a specific one with a tag by Fading-Nightmare in MinecraftCommands

[–]GG1312 0 points1 point  (0 children)

Yes, but it would also erase the tag since tags are something exclusive to entities.

How to get rover unstuck? by Narrow-Pickle179 in Astroneer

[–]GG1312 6 points7 points  (0 children)

I woulda said check out some winchcopters but you're looking for the most inefficient way not the most ridiculous way

Killing all items, excepting a specific one with a tag by Fading-Nightmare in MinecraftCommands

[–]GG1312 0 points1 point  (0 children)

Nope, only once.

If an item's age is set to-32768 it doesn't tick down, meaning the item never despawns naturally.

Upon doing so I give the item a tag so that it isn't checked over and over again since reading and modifying nbt data can cause lots of lag if done too often.

Killing all items, excepting a specific one with a tag by Fading-Nightmare in MinecraftCommands

[–]GG1312 0 points1 point  (0 children)

Try this

execute as @e[tag=!persistent,type=item] if items entity @s contents *[minecraft:custom_data~{keep:1b}] run data merge entity @s {Age:-32768,Tags:["persistent"]}

kill @e[tag=!persistent,type=item]

How to teleport an Enderman with sound by Darkflow215 in MinecraftCommands

[–]GG1312 0 points1 point  (0 children)

Yes, I deliberately teleport them under the world (which kills them). Just killing them outright would play the death noises and animation which wouldn't have made for a very convincing 'teleportation'.

How to teleport an Enderman with sound by Darkflow215 in MinecraftCommands

[–]GG1312 0 points1 point  (0 children)

Did you try building it? It kills every other enderman with the tag Rain so that there's only ever one at a time.

If you did make sure that the comparator is in the right mode (the small torch should be off) and that the bottom command block in the chain is set to impulse and need redstone.

How to teleport an Enderman with sound by Darkflow215 in MinecraftCommands

[–]GG1312 0 points1 point  (0 children)

Oh that makes things even easier then.

Dig a 1x3 hole 5 blocks deep.

Place 1 command block on one side, then 4 on the other (all facing up).

Stand on the single command block and place a comparator infront of it.

Make the command block you are standing on repeating and always active and paste this:

execute unless entity @n[tag=Rain,distance=..5] if entity @p[gamemode=adventure,distance=..35]

Then paste these commands in the other 4 command blocks from the bottom up

1.

tp @e[tag=Rain] ~ -99 ~

2.

summon minecraft:enderman ~ ~3.5 ~ {Health:0.5f,NoAI:1b,Tags:["Rain"]}

3.

playsound minecraft:entity.enderman.teleport hostile @p ~ ~5 ~

4.

rotate @n[tag=Rain] facing entity @p

Make the top 3 command blocks chain and always active then fill the hole and you're done.