#Convert a item

1 messages · Page 1 of 1 (latest)

dreamy steeple
#

How do i convert a item to air without replacing the whole stack and without using /give?

elder bramble
#

/replaceitem command would do the job

willow flicker
willow flicker
cobalt trellis
willow flicker
#

And also you re doing double the work

#

You can ask everyone that knows scripts of commands are worth to use and you will always get the anseer “use them unless there isn’t a way to do so in script api”

cobalt trellis
#

Oh, I just meant with replaceitem specifically
I understand something like the execute command is quite inefficient
Or summon, playanimation etc especially

#

I just havent bothered to look for a better alternative for use of replaceitem

willow flicker
short portal
#

👀

cobalt trellis
#

Is there an alternative for the lock_in_inventory and lock_in_slot NBT data?

willow flicker
#

what's that

cobalt trellis
#

Cause thats literally the only reason for every time I ever use replaceite

short portal
#

ItemStack actually provides more functionality than /replaceitem or /give, but it just doesn't have a "data" field.

willow flicker
#

you mean the

short portal
#

as for the question... well just use setEquipment or setItem?

willow flicker
#

what was that

cobalt trellis
#

Thank you
I always forget that ItemStack is a class

valid bolt
#

uh

#

just write undefined

#

entity.setItem(0, undefined)

#

0 is the slot

#

undefined is the item.

#

😭

#

think yall are overcomplicating it

solid torrent
brazen flower
valid bolt
brazen flower
solid torrent
#

i think u can put air

valid bolt
#

no u cant

solid torrent
#

both work

valid bolt
#

air is defined

#

it wouldnt work

solid torrent
#

air is air tho

valid bolt
#

💀

solid torrent
#

it still sets item

valid bolt
#

u dont understand 😭 air isnt an item

#

air is the absence of an item

#

so set item to air

brazen flower
solid torrent
#

it still works

valid bolt
#

air isnt an item

brazen flower
valid bolt
#

no it isnt u cant just do new Itemstack('minecraft:air', 1)

brazen flower
valid bolt
#

just put undefined 😠 GRRRR

brazen flower
valid bolt
#

ik ik lmao

solid torrent
#

minectaft:air??

#

and yes it has worked in the past for me

valid bolt
#

having the same value of undefined

solid torrent
#

i said both work

valid bolt
#

ur sayying u can put undefined or any thing u want

valid bolt
solid torrent
#

?

valid bolt
#

im sayying IS U PUT AIR there will be tons of error messages

#

SAYYING it isnt defined but has the same value

#

end of conversation

solid torrent
valid bolt
#

GRRR 😠 the problem here is solved no more argueing

solid torrent
#

u can replaceitem with air

valid bolt
#

bRUh

solid torrent
#

so it is a "item"

#

same effect

valid bolt
#

he isnt using commands

#

.

solid torrent
#

ik with script

#

u can do same thing

valid bolt
#

therE IS NO AIR IN SCRIPT

brazen flower
#

yea u can

#

const air = new ItemStack("minecraft:air", 1)

#

inventory.container.setItem(3, air);

solid torrent
#

exactly

valid bolt
solid torrent
brazen flower
#

I'm gess not

valid bolt
brazen flower
#

yea

#

undefined works

valid bolt
#

💀 Bruh traye dont talk if u dont know

brazen flower
valid bolt
#

wrong information is worse than no information

solid torrent
#

it worked for me

brazen flower
valid bolt
#

no more argueing

#

lets just say that it got changed

#

in a newer update

#

...

#

icba the problem here is solved

brazen flower
solid torrent
#

dude it does work its just bugged

#

the item turns ghost

#

item

brazen flower
solid torrent
#

it dods

brazen flower
#

turning it into a ghost item doesnt help

solid torrent
#

it doesnt exist for playrr anymore

#

so it does work

brazen flower
solid torrent
#

check the itme u set it to

#

it just looks like it did nothing

#

but if u try dropping item

proud dome
solid torrent
#

it wont appear

valid bolt
#

bRUH WHaT DONT U UnderstAND STOP ARGUEING

#

HOW Are U STILL GOING ON

solid torrent
#

its a discussion

#

not a argument

valid bolt
#

what is ur ego that u cant except to use undefined

solid torrent
#

i still said both work

#

which is true

valid bolt
#

it don't.

brazen flower
solid torrent
#

it does tho???

#

undefined is better to use but air still works

valid bolt
#

-_- didnt i tell u that EARLIER

proud dome
#

leme pull up sth

brazen flower
solid torrent
valid bolt
solid torrent
#

it is just buggy

valid bolt
brazen flower
#

this dose not mean it works

solid torrent
#

it does???

#

u cant use the item

#

a ghost isnt real

brazen flower
proud dome
#

air ItemStack exists

brazen flower
proud dome
#

leme add sth c.setItem(0) is my preference

brazen flower
solid torrent
proud dome
solid torrent
#

see

proud dome
#

stiil, not "leagal"

#

;-;

solid torrent
#

leagal??

proud dome
#

unrecommended

solid torrent
#

yeah but it still works

#

was my point

proud dome
#

ye...

brazen flower
proud dome
#

just go with yer preference

valid bolt
proud dome
#

air item is like a zombie ItemStack

sinful coral
proud dome
#

shulker have 64, bundle depends on how much it has

#

its similar to amount

willow flicker
willow flicker
#

was that really that deep?