#Registry override not working?

8 messages · Page 1 of 1 (latest)

fair coral
#

I wanted to rewrite torchflower block to act as a dead bush (so it can be placed on sand and generate in deserts).

I found some mention that registry override doesn't work, but didn't pay much attention to it.

let $MapColor  = Java.loadClass("net.minecraft.world.level.material.MapColor")
let $PushReaction  = Java.loadClass("net.minecraft.world.level.material.PushReaction")
let $BlockBehaviour$OffsetType  = Java.loadClass("net.minecraft.world.level.block.state.BlockBehaviour$OffsetType")
let $SoundType  = Java.loadClass("net.minecraft.world.level.block.SoundType")
let $BlockBehaviour$Properties  = Java.loadClass("net.minecraft.world.level.block.state.BlockBehaviour$Properties")
let $DeadBushBlock = Java.loadClass("net.minecraft.world.level.block.DeadBushBlock")
StartupEvents.registry("block", event => {
    event.createCustom("minecraft:torchflower", () => {
        let flower = new $DeadBushBlock(
            $BlockBehaviour$Properties.of().lightLevel((bl) => 15).noCollission().instabreak().sound($SoundType.GRASS).offsetType($BlockBehaviour$OffsetType.XZ).pushReaction($PushReaction.DESTROY)["mapColor(net.minecraft.world.level.material.MapColor)"]($MapColor.PLANT)
        );
        return flower;
    });
});

nothing has changed, but also the game didn't crash or give an error?

drifting jungleBOT
#

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

fair coral
#

how those co-exist???

#

now I don't know how to remap the item to my new torchflower

#

and also how to fix the texture

fair coral
#

I decided to just recreate the block in any way I can