More pottable plants & config save/load

This commit is contained in:
paulevsGitch 2021-07-11 23:05:07 +03:00
parent e41fd592c7
commit 797db9d2d4
17 changed files with 310 additions and 28 deletions

View file

@ -2,13 +2,15 @@ package ru.betterend.blocks;
import net.minecraft.core.BlockPos;
import net.minecraft.world.level.LevelReader;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.levelgen.feature.Feature;
import ru.bclib.blocks.FeatureSaplingBlock;
import ru.betterend.blocks.basis.PottableFeatureSapling;
import ru.betterend.registry.EndBlocks;
import ru.betterend.registry.EndFeatures;
public class LacugroveSaplingBlock extends FeatureSaplingBlock {
public class LacugroveSaplingBlock extends PottableFeatureSapling {
public LacugroveSaplingBlock() {
super();
}
@ -22,4 +24,9 @@ public class LacugroveSaplingBlock extends FeatureSaplingBlock {
public boolean canSurvive(BlockState state, LevelReader world, BlockPos pos) {
return world.getBlockState(pos.below()).is(EndBlocks.END_MOSS) || world.getBlockState(pos.below()).is(EndBlocks.ENDSTONE_DUST);
}
@Override
public boolean canPlantOn(Block block) {
return block == EndBlocks.END_MOSS;
}
}