#Looking for ideas to prevent Silk Touch from dropping a block
1 messages · Page 1 of 1 (latest)
You can detect enchants, so you could just remove silk touch from all items
If it’s for a specific block, then just use on block break and check the player for silk touch, then remove the dropped item the same way as before, but by using the exact name.
not trying to remove silk touch from the game lol
so it seems like I just have to do the same thing
probably, or at least I can't think of a better way
BlockBreak,
getItem
Get enchants
Enxhant hasEnchantment silk
item kill
yeah, I've got all the way up to the item kill, is there an easier way to do it than just doing a /kill command?
guess not exactly easier, but more refined
so I can actually grab the item that the block drops instead of just killing any item with the same name in that location
cant u get the item stack of the item?
then just .kill() it
Don't think it's possible to specifically get the item dropped in a block break event
why exactly do u want to disable silk touch?
only trying to disable it for specific blocks
I have blocks that players need a certain scoreboard value or higher to mine
If a player has silk touch it completely bypasses the entire system
yeop
I'm not trying to remove Silk Touch from the game, just stop players from being able to use it on the blocks I need it to be on
I already have everything set up to do that, I'm just asking if anyone knows of a better method to destroy the items
tahn just a runCommandAsync to kill all in the same location
There isn't a better way
umm
u can use entity spawn
and get item stack
well
no
does entity hit work when mining?
entityHitBlock
mm... if I could store the location of the block being hit, then test location of entitySpawn and Id
would be way messier than just killing the item though
would probably be more accurate though
not so sure about that, only thing it does is avoids having to use a runCommandAsync