#Change Default Placement State of modded Block

12 messages · Page 1 of 1 (latest)

wind gale
#

I'm using a mod where one of the features is Campfires place unlit, but modded campfires still place lit. I want to modify these blocks to place in their unlit state, how might I do this?

vernal wyvernBOT
#

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

versed halo
#

block place event, then modify their blockstate

wind gale
#

oh theres no way to actually change the placementstate?

wind gale
#

how do i keep the waterlogged state?

wind gale
#

????

versed halo
#

you're given the blockstate it's going to place.... get the properties, then change what you want and set them back

#
const someListOfBlocksToMod = ['mod:name', 'mod:name']
BlockEvents.placed(event => {
  let block = event.block
  let blockid = block.id
  if (someListOfBlocksToMod.includes(blockid) {
    let properties = block.properties
    // modify here

    // set block to new properties
    block.set(blockid, properties)
  }
})
wind gale
#

it appears as lit for a split second when placing, no way to fix this?

versed halo
#

not that I'm personally aware of

wind gale
#

damn

#

well thanks anyways