#1.20 Prevent Skeletons turning into Strays

14 messages · Page 1 of 1 (latest)

rancid folio
#

is it possible to prevent skeletons from turning into strays?
ive tried to use .setTicksFrozen(0) but it does not stop it

onyx riverBOT
#

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

winged stump
# rancid folio is it possible to prevent skeletons from turning into strays? ive tried to use ....

try this, here we use forges LivingConversionEvent.Pre event to reset the convertion timer, preventing the skeletons conversion time reaching 0 and converting ```js
ForgeEvents.onEvent("net.minecraftforge.event.entity.living.LivingConversionEvent$Pre", event => global.convert(event))
/**
*

  • @param {Internal.LivingConversionEvent} event
    */
    global.convert = event => {
    if (event.entity.type == "minecraft:skeleton") {
    event.setConversionTimer(100)
    }
    }```
rancid folio
#

what type of script is that?

winged stump
#

startup script

#

another option would be to do this in a tick event js entity.setIsInPowderSnow(false) though that's not as intended of a use as just using the conversion event

rancid folio
winged stump
#

really

#

alright ill test it in my own instance and see whats going on

#

ok for some reason its not even firing the event hmmm

winged stump
#

your other option would be to either iterate over every single skeleton in a level tick event and set them not in powdered snow or you can download EntityJS addon mod and modify the entity's tick method and do the same directly
Startup Event: ```js
EntityJSEvents.modifyEntity(event => {
event.modify("minecraft:skeleton", modifyBuilder => {
modifyBuilder.tick(entity => global.tick(entity))
})
})
/**
*

  • @param {Internal.Skeleton} entity
  • @returns
    */
    global.tick = entity => {
    entity.setFreezeConverting(false)

}```

#

this i can confirm works

proper sealBOT
#

EntityJS is an addon that allows you to create custom entities with KubeJS.

rancid folio
#

yep that works thanks