Jump to content

TheSkullyKO

Members
  • Posts

    2
  • Joined

  • Last visited

TheSkullyKO's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. Cactus Flowers in vanilla can be placed on #minecraft:dirt, minecraft:farmland, or anything that is face sturdy upwards. Forge has added a line of code that works for other classes that extend VegetationBlock, but because CactusFlowerBlock has special placement, it has broken it. CactusFlowerBlock code @Override protected boolean mayPlaceOn(BlockState p_395694_, BlockGetter p_391810_, BlockPos p_391352_) { BlockState blockstate = p_391810_.getBlockState(p_391352_); return blockstate.is(Blocks.CACTUS) || blockstate.is(Blocks.FARMLAND) || blockstate.isFaceSturdy(p_391810_, p_391352_, Direction.UP, SupportType.CENTER); } VegetationBlock code that broke it @Override protected boolean canSurvive(BlockState p_397664_, LevelReader p_395119_, BlockPos p_393561_) { BlockPos blockpos = p_393561_.below(); if (p_397664_.getBlock() == this) { //Forge: This function is called during world gen and placement, before this block is set, so if we are not 'here' then assume it's the pre-check. return p_395119_.getBlockState(blockpos).canSustainPlant(p_395119_, blockpos, Direction.UP, this); } return this.mayPlaceOn(p_395119_.getBlockState(blockpos), p_395119_, blockpos); }
  2. I think it would be useful to have a LightningStrikeEvent for when lightning strikes a block. In the event it would have data for the block struck, the lightning entity, and maybe the source of the lightning (either from weather, command, trident, etc.)
×
×
  • Create New...

Important Information

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