[Fix] Hydralux Sapling is missing survival description (#228)
This commit is contained in:
parent
c6cee74377
commit
7fc1c96a2b
2 changed files with 25 additions and 3 deletions
|
@ -4,6 +4,7 @@ import org.betterx.bclib.behaviours.interfaces.BehaviourWaterPlantSapling;
|
|||
import org.betterx.bclib.blocks.UnderwaterPlantWithAgeBlock;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
import org.betterx.bclib.util.MHelper;
|
||||
import org.betterx.betterend.interfaces.survives.SurvivesOnSulphuricRock;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
|
@ -13,7 +14,7 @@ import net.minecraft.world.level.WorldGenLevel;
|
|||
import net.minecraft.world.level.block.Blocks;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
|
||||
public class HydraluxSaplingBlock extends UnderwaterPlantWithAgeBlock implements BehaviourWaterPlantSapling {
|
||||
public class HydraluxSaplingBlock extends UnderwaterPlantWithAgeBlock implements BehaviourWaterPlantSapling, SurvivesOnSulphuricRock {
|
||||
|
||||
@Override
|
||||
public void grow(WorldGenLevel world, RandomSource random, BlockPos pos) {
|
||||
|
@ -70,7 +71,11 @@ public class HydraluxSaplingBlock extends UnderwaterPlantWithAgeBlock implements
|
|||
}
|
||||
|
||||
@Override
|
||||
protected boolean isTerrain(BlockState state) {
|
||||
return state.is(EndBlocks.SULPHURIC_ROCK.stone);
|
||||
public boolean isTerrain(BlockState state) {
|
||||
return SurvivesOnSulphuricRock.super.isTerrain(state);
|
||||
}
|
||||
|
||||
public String prefixComponent() {
|
||||
return "tooltip.bclib.place_underwater_on";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
package org.betterx.betterend.interfaces.survives;
|
||||
|
||||
import org.betterx.bclib.interfaces.SurvivesOnBlocks;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
import net.minecraft.world.level.block.Block;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface SurvivesOnSulphuricRock extends SurvivesOnBlocks {
|
||||
List<Block> BLOCKS = List.of(EndBlocks.SULPHURIC_ROCK.stone);
|
||||
|
||||
@Override
|
||||
default List<Block> getSurvivableBlocks() {
|
||||
return BLOCKS;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue