#Block modification 1.20.1

65 messages · Page 1 of 1 (latest)

gusty flame
#

Waystone still drops when mined with wooden tools

ServerEvents.tags("block", (event) => {
event.remove("minecraft:needs_wooden_tool", "waystones:sandy_waystone","waystones:mossy_waystone","waystones:waystone");
event.add("minecraft:needs_diamond_tool", "waystones:sandy_waystone","waystones:mossy_waystone","waystones:waystone");
});

Tried to make starlit mineable but it doesn't work gives errors

BlockEvents.modification(event => {
event.modify('celestisynth:starlit_factory', block => {
block.tagBlock('minecraft:mineable/pickaxe');
block.tagBlock('minecraft:needs_diamond_tool');
});
});

Please help :c

atomic moonBOT
#

Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!

gusty flame
#

okie supportbot, will do o7

#

@rustic cypress sorry for pinging but i was told you could help :3

dreamy wyvernBOT
#

You can write your code in a codeblock by typing it between the codeblock delimiters:
Note that these are backticks, not apostrophes

```js :arrow_left:

ServerEvents.recipes(event => {
event.smelting('minecraft:glass', '#forge:sand').xp(.1)
})

``` :arrow_left:

This example will look like this:

ServerEvents.recipes(event => {
  event.smelting('minecraft:glass', '#forge:sand').xp(.1)
})
rustic cypress
#

I dont think you can add/remove all the waystones at once to the tag

#

definitely not like this

#

you can try

event.remove("minecraft:needs_wooden_tool",["waystones:sandy_waystone","waystones:mossy_waystone","waystones:waystone"]);
gusty flame
#

okie, will do as soon as i get home o7

#

what about the factory? is there anything to be done about that?

rustic cypress
#

I dont know what that does

#

is it not mineable like bedrock?

smoky ember
#

from which mod is the starlit factory ?

rustic cypress
#

well my guess is on celestisynth

gusty flame
#

its just not mineable

rustic cypress
#

seems like the vanilla tags dont work on waystones

gusty flame
#

mb

rustic cypress
#
BlockEvents.modification(event => {
    event.modify('celestisynth:starlit_factory', block => {
      block.destroySpeed = 1
    })
  })

Try this

gusty flame
#

thank you, will get back to you after i was able to test it!!

#

ur a hero

rustic cypress
#

idk if that will work lol

gusty flame
#

okay so, some news

#

the waystone i only want to be mineable with netherite pic, the factory only with diamond and up

#

the factory now breaks even with fist, but does not drop

#

could you work around this please?

#

if you have the time ofc

gusty flame
#

nvm got the waystone to work

still would like some help with the factory 🥺

gusty flame
#

this doesn't drop the starlit factory

LootJS.modifiers((event) => {
event.addBlockLootModifier('celestisynth:starlit_factory')
.addLootPool(pool => pool.addEntry('celestisynth:starlit_factory'));
});

and this doesn't work and gives an error

BlockEvents.modification(event => {
event.modify('celestisynth:starlit_factory', block => {
block.destroySpeed = 0.2
.tagBlock('minecraft:needs_netherite_tool')
.tagBlock('minecraft:mineable/pickaxe')
.requiresTool(true)
})
})

@rustic cypress please ima buy you a beer 🥺

smoky ember
#

the only thing you can do, try to overwrite the original .json

#

this doesn't work because they don't have it in the original file:

.tagBlock('minecraft:needs_netherite_tool')
      .tagBlock('minecraft:mineable/pickaxe')
      .requiresTool(true)
gusty flame
#

@candid perch can you please take a look at this? if u have time ofc

#

@coarse sorrel pliz help 🥹

dreamy wyvernBOT
#

pingsock Rule 3: Don't ping, reply to or DM people for no reason.

smoky ember
#

just wait if anyone reply if they can help you

gusty flame
#

well.. could you help me?

#

ServerEvents.tags('block', event => {
event.remove('minecraft:needs_wooden_tool', [
"waystones:sandy_waystone",
"waystones:mossy_waystone",
"waystones:waystone"
])
event.add('minecraft:needs_netherite_tool', [
"waystones:sandy_waystone",
"waystones:mossy_waystone",
"waystones:waystone"
])
})

any idea why this isnt a way to do it?

#

or am i just dumb

smoky ember
#

if i wrote this:

ServerEvents.tags("block", (event) => {
  event.remove("minecraft:needs_wooden_tool", [
    "waystones:sandy_waystone",
    "waystones:mossy_waystone",
    "waystones:waystone",
  ]);
  event.add("minecraft:needs_diamond_tool", [
    "waystones:sandy_waystone",
    "waystones:mossy_waystone",
    "waystones:waystone",
  ]);
});

only the top block shows the change because the waystone in the world are made of two blocks

gusty flame
#

gonna test

#

o7

#

still can be broken with hands-

#

any ideas about that?

steady bolt
#

also add 'minecraft:mineable/pickaxe' if it doesn't ahve it

gusty flame
# steady bolt also add 'minecraft:mineable/pickaxe' if it doesn't ahve it

starlit won't drop

LootJS.modifiers((event) => {
event.addBlockLootModifier('celestisynth:starlit_factory')
.addLootPool(pool => pool.addEntry('celestisynth:starlit_factory'));
});

breakeable but doesn't drop anything and i wanna make it require netherite pickaxe but won't work

BlockEvents.modification(event => {
event.modify('celestisynth:starlit_factory', block => {
block.destroySpeed = 0.2
})
})

waystones broken by bare hands instead of needing netherite or diamond pickaxe

ServerEvents.tags('block', event => {
event.remove('minecraft:needs_wooden_tool', [
"waystones:sandy_waystone",
"waystones:mossy_waystone",
"waystones:waystone"
]);
event.add('minecraft:needs_diamond_tool', [
"waystones:sandy_waystone",
"waystones:mossy_waystone",
"waystones:waystone"
]);
})

where do i add the minecraft:mineable/pickaxe exactly?

dreamy wyvernBOT
#

You can write your code in a codeblock by typing it between the codeblock delimiters:
Note that these are backticks, not apostrophes

```js :arrow_left:

ServerEvents.recipes(event => {
event.smelting('minecraft:glass', '#forge:sand').xp(.1)
})

``` :arrow_left:

This example will look like this:

ServerEvents.recipes(event => {
  event.smelting('minecraft:glass', '#forge:sand').xp(.1)
})
steady bolt
#
event.add('minecraft:mineable/pickaxe', [
    "waystones:sandy_waystone", 
    "waystones:mossy_waystone", 
    "waystones:waystone"
  ]);
#

and you can use similar for the starlight factory

#

that might be needed

#

check the tags that is has already by looking at it in the f3 menu

#

see hwat tool is currently needed to mine it

gusty flame
#

testing it rn o7

#

still can be broken with hands..

steady bolt
#

i really don't know then, might be an oddity with waystones

gusty flame
#

:c

#

is there any way to like

#

event remove mineable/fist

#

or smt like that?

coarse sorrel
#

you can cancel the block breaking event as a workaround if the player isn't using a pickaxe

#
BlockEvents.broken("waystones:waystone", event => {
    const {player, block} = event
    const item = player.getMainHandItem()
    // if the player is not holding a netherite pickaxe... 
    if (item.id != "minecraft:netherite_pickaxe") {
        event.cancel() // do not break the block
    }
})
#

you may also be able to modify the block registry and add requiresTool(true) if items are dropping when they shouldn't be

dusk flare