Jump to content

blinky000

Members
  • Posts

    265
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by blinky000

  1. if i have two events : public static void onRegisterBlocks(RegistryEvent.Register<Block> event) { } @SubscribeEvent public static void onRegisterBlocks(RegistryEvent.Register<Block> event) { String doubleList[] = {"brick_plaster", "bricks_dark_oak_wains", "rock_wall_dark_oak_wains", "rock_wall_plaster", "stone_brick_dark_oak_wains"}; for(String sl : doubleList) { event.getRegistry().register(new BlockStdHorz(PROP_STONE),"singleblock/"+sl)); } } @SubscribeEvent public static void onRegisterItems(RegistryEvent.Register<Item> event) { } How would i get the registered blocks into the Register<Item >event }
  2. Ok i got the project uploaded to git, in blinky000/yabm5, the mods i was having issues with are in blinky000/mods still looiking for a file free file hoster
  3. Where is the SnowLayerBlock located, it's not i blocks or items
  4. I create a static list of blocks, and i use this list to register my blocks. I understand this is not the correct way do do this. Every example i see about the correct way, individually names every block. Since i have over a hundred blocks, i really don't want to do that. So there questions is, is there a way to correctly register the without having to name them all.
  5. github blinky000/yabm5. i can't upload my final jar, its too big
  6. Never used git, trying to get it setup
  7. Do you mean using .notSolid() property ? how would i make just one face not solid
  8. is there a way to NOT let snow on my block?
  9. Yes, sorta, not sure mods can interact with that code, except maybe the other code loading after mine and overloaded something?
  10. I found it was a conflict with another mod for(Block grassBlockList : BlockList.GRASS_BLOCK_COLOR) { // No Item event.getBlockColors().register((x, reader, pos, u) -> reader != null && pos != null ? BiomeColors.getGrassColor(reader, pos) : GrassColors.get(0.5D, 1.0D), grassBlockList); } for(Block grassBlockList : BlockList.GRASS_BLOCK) { // Have Item event.getBlockColors().register((x, reader, pos, u) -> reader != null && pos != null ? BiomeColors.getGrassColor(reader, pos) : GrassColors.get(0.5D, 1.0D), grassBlockList); } . here is the color handler
  11. In my modding environment , my custom grass changes shade to match the biome . after i build add put it in the real game, the shades no longer match. I'm using the same resource pack in both places, and the forge-client.toml match (using the experimentalForgeLightPipelineEnabled = true) Any ideas?
  12. doing some more playing around i got a basic block,. thanks for you help
  13. Maybe an import problem, i can't get this to work private static final Properties PROP_WOOD = Properties.create(Material.WOOD, MaterialColor.WOOD).hardnessAndResistance(2.0F, 3.0F).sound(SoundType.WOOD); i have tried all the import suggested. So its seems more then just names and I have having other problems from my code from 1.16 , and I thought i saw a web site addressing changes
  14. I was looking at a site that had information changes from 1.16, but i can't find it again. Anybody have any ideas?
  15. thank very much, that work fine
  16. I'm trying to create a new 1.17.1 eclipse project, when i run the examplemod i get an error: Could not create the Java Virtual Machine. the console shows :Unrecognized option: -p. I tried the increase the JAVA_OPTIONS: -Xmx512M . didn't not help, and caused my 1.16 project to never open thanks for any help
  17. 98% sure i got it. The SeaPickleBlock was a better example . Pickle Rick!!!!!!!
  18. trying to water log an obj model. so far I have been either make it permanently waterlogged or not water on land , but under water it will sometimes leave a side of air on the model. placing another block next to it will correct it , and when that block is removed, the model stays under water correctly. public class WaterShape extends YabmBlock implements IWaterLoggable { public static final DirectionProperty FACING = HorizontalBlock.HORIZONTAL_FACING; public static final BooleanProperty WATERLOGGED = BlockStateProperties.WATERLOGGED; public WaterShape(Properties properties) { super(properties); setDefaultState(stateContainer.getBaseState().with(BlockStateProperties.WATERLOGGED, false).with(FACING, Direction.SOUTH)); } @Override protected void fillStateContainer(StateContainer.Builder<Block, BlockState> builder) { builder.add(BlockStateProperties.HORIZONTAL_FACING).add(BlockStateProperties.WATERLOGGED); } @Override public FluidState getFluidState(BlockState state) { return state.get(WATERLOGGED) ? Fluids.WATER.getStillFluidState(false) : super.getFluidState(state); } @Override public BlockState getStateForPlacement(BlockItemUseContext context) { return this.getDefaultState().with(FACING, context.getPlacementHorizontalFacing()); } public static Direction getDirection(BlockState state) { return state.get(FACING); } @Override public VoxelShape getCollisionShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) { return BOX; } @Override public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) { return BOX; } @SuppressWarnings("deprecation") @Override public BlockState updatePostPlacement(BlockState stateIn, Direction facing, BlockState facingState, IWorld worldIn, BlockPos currentPos, BlockPos facingPos) { // this resets the block correctly when another block added on any side if (!stateIn.get(BlockStateProperties.WATERLOGGED)) { this.receiveFluid(worldIn, currentPos, stateIn, Fluids.WATER.getStillFluidState(false)); } //worldIn.getPendingFluidTicks().scheduleTick(currentPos, Fluids.WATER, Fluids.WATER.getTickRate(worldIn)); return super.updatePostPlacement(stateIn, facing, facingState, worldIn, currentPos, facingPos); //return stateIn; } public void onBlockAdded(BlockState state, World worldIn, BlockPos pos, BlockState oldState, boolean isMoving) { worldIn.getPendingFluidTicks().scheduleTick(pos, Fluids.WATER, Fluids.WATER.getTickRate(worldIn)); } } // this resets the block correctly when another block added on any side if (!stateIn.get(BlockStateProperties.WATERLOGGED)) { this.receiveFluid(worldIn, currentPos, stateIn, Fluids.WATER.getStillFluidState(false)); } return super.updatePostPlacement(stateIn, facing, facingState, worldIn, currentPos, facingPos); }
  19. waterlogged obj model block sometimes leaves a side of airPlace another block next to it, corrects it. that maybe a force update would fix it' starting another post about WATERLOGGED
  20. how can i force a block to update?
  21. running out of ideas. Try turning off smooth lighting. long shot: check if any models UV is > 1x1x1
  22. so no single model is > 1 x 1 x 1 ?
  23. if the model size must be between 0 - 1, if it gets bigger then that , minecraft lighting will have problems.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.