#IS there any way to Destroy Trial spawner fast
1 messages · Page 1 of 1 (latest)
<@&1201956957406109788>
💬 While you wait, take this time to provide more context and details.
🙇 If nobody has answered you by <t:1722173424:t>, feel free to use the Summon Helpers button to ping our helper team.
✅ Once your question has been resolved (or you no longer need it), please click Resolve Question or run /resolve
You can make an enchantment that detects if you click on a trial spawner and instantly breaks it.
How can I detect a Block Breaking.
a command will break the block for you. That means you can add whatever you want in that same function.
so how will that command detect my left click... Which command ?
That's what the custom enchantment is for. There is a enchantment effect called hit_block it triggers the defined effects as soon as you left-click on a block.
You can combine this with a replace_block effect to replace the block you left-clicked on with another block (air)
how to I detect a Trial spawner on cooldown ?
you can add a location check predicate to the enchantment and check if the cooldown_ends_at nbt is not 0
like this:
{
"description": "a",
"supported_items": "#minecraft:pickaxes",
"weight": 1,
"max_level": 1,
"min_cost": {
"base": 0,
"per_level_above_first": 0
},
"max_cost": {
"base": 0,
"per_level_above_first": 0
},
"anvil_cost": 0,
"slots": [],
"effects": {
"minecraft:hit_block": [
{
"effect": {
"type": "minecraft:replace_block",
"block_state": {
"type": "minecraft:simple_state_provider",
"state": {
"Name": "minecraft:air"
}
}
},
"requirements": {
"condition": "minecraft:inverted",
"term": {
"condition": "minecraft:location_check",
"predicate": {
"block": {
"blocks": "minecraft:trial_spawner",
"nbt": "{cooldown_ends_at:0}"
}
}
}
}
}
]
}
}
you can easily creat your own enchantments on misode
misode.github.io is the most popular site for JSON datapack generators. This site has generators for commonly used files such as advancements, recipes, and more, as well as datapack changelogs, debug inspectors, and more.
can you just create only cooldown thingy.. Remove that block breaking/ hit block
Is this enchantement ?
.
how can I use this. I have never used Enchantments before in datapacks. I use advancements and commands
Trial spawners are also slow to mine because there is no proper tool to mine them with. If you want all pickaxes to mine them quickly, you can add trial spawners to the ‘minecraft:mineable/pickaxe’ block tag
like for advancements/functions/... you have to make a new folder called enchantment where you put the json file.
That's basically it.
You can then enchant items with via command with that enchnatment.
There are some tags that you can add your custom enchantments to if you want to get them through trades/fishing/enchantment table
So this is Logic....
I detect facing a block,.
then enchant that pickaxe with this custm encahnt and this will break the block and remove the enchantement when block broken.
No, you would need to detect if a player holds any pickaxe and enchant it once. You can make it a hidden enchantment that neither adds the glint to the tool nor shows up in the item tooltip.
There is no need to remove it afterwards.
But then it will work on every block ?
no, the predicate only allows it to work on trial spawners that are on cooldown.
ok
hello I need to put position of block here or here
you don't need to set a position
that's only if you want to overwrite the current position
the current position is the block that you hit
My block will only present at 0 60 0
you can set a position if you want then but it is not necessary
upper of lower part ?
Position is a fixed coordinate and offset is just the current position moved by the given amount.
I added in enchantment folder but not showing in game
What does the log say?
is it correct ?
what do you mean by not showing up? When using /enchant or in the enchantment table?
yes "a" not showing in game
that's not a yes/no question
Not showing in both command and table
ah
typo ?
What does the log say? Are there any errors?
no
I tried Putting Preset of Sharpness Enchant also but gamerz_riot:[sharpness] not showing
1.21
ok
Are U online ?
hello ?
I also added a custom enchant datapack from aytuber video and its enchant aslo not showing ..
Could you send the link to the pack?
The issue was I need to restart the World 🥹
now ok
so everything works now?
yes But the pick Breaks the Spawner before it goes to cooldown
heloo ?
chill
I'm not all knowing, I have to test something
you don't have to ping me every 2 minutes
There, fixed:
{
"description": "a",
"supported_items": "#minecraft:pickaxes",
"weight": 1,
"max_level": 1,
"min_cost": {
"base": 0,
"per_level_above_first": 0
},
"max_cost": {
"base": 0,
"per_level_above_first": 0
},
"anvil_cost": 0,
"slots": [],
"effects": {
"minecraft:hit_block": [
{
"effect": {
"type": "minecraft:replace_block",
"block_state": {
"type": "minecraft:simple_state_provider",
"state": {
"Name": "minecraft:air"
}
}
},
"requirements": {
"condition": "minecraft:location_check",
"predicate": {
"block": {
"blocks": "minecraft:trial_spawner",
"state": {
"trial_spawner_state": "cooldown"
}
}
}
}
}
]
}
}
It now checks for the blockstate instead of the nbt
it works now
I didn't know that it also shows in the blockstate. That's what I had to find out just now.
U are my god Bro. Thx very very much
If your question is resolved, that's great to hear! Make sure to run /resolve or click the Resolve Question button. Otherwise, feel free to continue asking for help! :D