Sapling fix (#155)
This commit is contained in:
parent
9678969d4a
commit
05d6eaf8c8
3 changed files with 28 additions and 3 deletions
25
src/main/java/ru/betterend/blocks/LucerniaSaplingBlock.java
Normal file
25
src/main/java/ru/betterend/blocks/LucerniaSaplingBlock.java
Normal file
|
@ -0,0 +1,25 @@
|
|||
package ru.betterend.blocks;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.world.level.LevelReader;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.levelgen.feature.Feature;
|
||||
import ru.betterend.blocks.basis.FeatureSaplingBlock;
|
||||
import ru.betterend.registry.EndBlocks;
|
||||
import ru.betterend.registry.EndFeatures;
|
||||
|
||||
public class LucerniaSaplingBlock extends FeatureSaplingBlock {
|
||||
public LucerniaSaplingBlock() {
|
||||
super();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Feature<?> getFeature() {
|
||||
return EndFeatures.LUCERNIA.getFeature();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canSurvive(BlockState state, LevelReader world, BlockPos pos) {
|
||||
return world.getBlockState(pos.below()).is(EndBlocks.RUTISCUS);
|
||||
}
|
||||
}
|
|
@ -15,11 +15,11 @@ public class TenaneaSaplingBlock extends FeatureSaplingBlock {
|
|||
|
||||
@Override
|
||||
protected Feature<?> getFeature() {
|
||||
return EndFeatures.LUCERNIA.getFeature();
|
||||
return EndFeatures.TENANEA.getFeature();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canSurvive(BlockState state, LevelReader world, BlockPos pos) {
|
||||
return world.getBlockState(pos.below()).is(EndBlocks.RUTISCUS);
|
||||
return world.getBlockState(pos.below()).is(EndBlocks.PINK_MOSS);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue