orangejuice21314 Posted August 22, 2021 Posted August 22, 2021 To get the blockstate of the stair, I am just using .get() and then .defaultBlockState() BlockState blockstate = BlockInit.BLUE_STAIR.get().defaultBlockState(); I did hear about a method that does give you the full-block version of a stair blockstate, but I do not believe I am using that method. Quote
orangejuice21314 Posted August 22, 2021 Author Posted August 22, 2021 if (item.is(ItemInit.BLUE_PAINTBRUSH.get())) { p_60506_.swing(p_60507_); BlockState blockstate = BlockInit.BLUE_STAIR.get().defaultBlockState(); PaintStair(p_60503_, p_60504_, p_60505_, blockstate, p_60506_); } heres the PaintStair method I made: static void PaintStair (BlockState p_60503_, Level p_60504_, BlockPos p_60505_, BlockState blockstate, Player p_60506_) { p_60504_.setBlock(p_60505_, blockstate, blockstate.getHarvestLevel()); } and here is the stair in BlockInit public static final RegistryObject<wallpaperstairs> BLUE_STAIR = BLOCKS.register("blue_stair", () -> new wallpaperstairs(BlockInit.WALLPAPER_BLOCK.get().defaultBlockState(), Block.Properties.copy(BlockInit.WALLPAPER_BLOCK.get()))); Quote
orangejuice21314 Posted August 22, 2021 Author Posted August 22, 2021 just renamed them thankyou for the tip Quote
orangejuice21314 Posted August 22, 2021 Author Posted August 22, 2021 (edited) i think it might be a problem with how im creating the block // blue public static final RegistryObject<wallpaperstairs> BLUE_STAIR = BLOCKS.register("blue_stair", () -> new wallpaperstairs(BlockInit.WALLPAPER_BLOCK.get().defaultBlockState(), Block.Properties.copy(BlockInit.WALLPAPER_BLOCK.get()))); however when i change the BlockInit.WALLPAPER_BLOCK to WALLPAPER_STAIR (which is a stair block, the one that is supposed to change into the blue stair) it does the same thing (heres the wallpaper stair) public static final RegistryObject<wallpaperstairs> WALLPAPER_STAIR = BLOCKS.register("wallpaper_stair", () -> new wallpaperstairs(BlockInit.WALLPAPER_BLOCK.get().defaultBlockState(), Block.Properties.copy(BlockInit.WALLPAPER_BLOCK.get()))); Edited August 22, 2021 by orangejuice21314 Quote
orangejuice21314 Posted August 22, 2021 Author Posted August 22, 2021 found the problem. the BlueStair was copying properties from the WallpaperStair, and the WallpaperStair was copying properties from WallpaperBlock, so when I right-clicked the stair, it was doing what the wallpaperblock was doing Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.