Jump to content
Search In
  • More options...
Find results that contain...
Find results in...


  • Posts

  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

FREyebeans2506's Achievements

Tree Puncher

Tree Puncher (2/8)



  1. i have tried several things to get it to change when the day changes to night i can only get it to be lit up if i place it at night package com.freyebeans2506.faltthethe.contentfeatures.blocks; import net.minecraft.block.BedBlock; import net.minecraft.block.Block; import net.minecraft.block.BlockState; import net.minecraft.block.Blocks; import net.minecraft.fluid.Fluids; import net.minecraft.item.BlockItemUseContext; import net.minecraft.state.BooleanProperty; import net.minecraft.state.StateContainer; import net.minecraft.state.properties.BlockStateProperties; import net.minecraft.util.Direction; import net.minecraft.util.math.BlockPos; import net.minecraft.world.IWorld; import net.minecraft.world.LightType; import net.minecraft.world.World; import net.minecraft.world.server.ServerWorld; import javax.annotation.Nullable; import java.util.Random; public class ABBlock extends Block { public static final BooleanProperty LIT = BlockStateProperties.LIT; public ABBlock(Properties properties) { super(properties); this.registerDefaultState(this.stateDefinition.any().setValue(LIT, Boolean.valueOf(false))); } @Nullable public BlockState getStateForPlacement(BlockItemUseContext p_196258_1_) { return this.defaultBlockState().setValue(LIT, Boolean.valueOf(p_196258_1_.getLevel().isNight())); } protected void createBlockStateDefinition(StateContainer.Builder<Block, BlockState> p_206840_1_) { p_206840_1_.add(LIT); } } this has been causing me pain for the past 3 hours
  2. so i just thought for a few more minutes and managed to get it to work with .with(AXIS, state.get(AXIS)) thank you guys so much for the help
  3. does this make the stripped stem and the stem the same block
  4. I've been working on a mod for about a week and have made a block strippable but the log points up when stripped and I dont know how to fix it here's some of my code StrippableStem class public class StrippableStem extends RotatedPillarBlock { private final BlockState stripped; public StrippableStem(BlockState state, Properties properties) { super(properties); this.stripped = state; } @Override @Nullable public BlockState getToolModifiedState(BlockState state, World world, BlockPos pos, PlayerEntity player, ItemStack stack, ToolType toolType) { return toolType == ToolType.AXE ? stripped : null; } } the logs register public static final RegistryObject<Block> MUSHROOM_STEM = BLOCKS.register("mushroom_stem", ()-> new StrippableStem(STRIPPED_MUSHROOM_STEM.get().getDefaultState(), AbstractBlock.Properties.create(Material.WOOD) .hardnessAndResistance(0.5f,2.0f) .harvestTool(ToolType.AXE) .harvestLevel(0) .sound(SoundType.HYPHAE) )); I'm assuming the issue is .getDefaultState but I'm not sure if this is the issue or how to fix the issue
  5. I’ll try that also by semi-transparent I mean 50% opacity
  6. i can only seem to get blocks to render semi transparent with x ray or opaque with out x ray here is the code ive tried RenderTypeLookup.setRenderLayer(RegistryHandler.ROUGH_GLASS.get(), RenderType.getTranslucent()); RenderTypeLookup.setRenderLayer(RegistryHandler.ROUGH_GLASS.get(), RenderType.getCutout()); RenderTypeLookup.setRenderLayer(RegistryHandler.ROUGH_GLASS.get(), RenderType.getCutoutMipped()); how can i make it semi transparent and not x ray
  7. I managed to get it to work using my knowledge of voxel shape so thanks foonicular
  8. im very new to modding and was just curious about how to make a block transparent i also would need code instead of terms because i dont understand most syntax yet
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.