Sapling fix (#155)

This commit is contained in:
paulevsGitch 2021-05-05 03:07:50 +03:00
parent 9678969d4a
commit 05d6eaf8c8
3 changed files with 28 additions and 3 deletions

View 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);
}
}

View file

@ -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);
}
}

View file

@ -148,7 +148,7 @@ public class EndBlocks {
public static final Block JELLYSHROOM_CAP_PURPLE = registerBlock("jellyshroom_cap_purple", new JellyshroomCapBlock(217, 142, 255, 164, 0, 255));
public static final WoodenMaterial JELLYSHROOM = new WoodenMaterial("jellyshroom", MaterialColor.COLOR_PURPLE, MaterialColor.COLOR_LIGHT_BLUE);
public static final Block LUCERNIA_SAPLING = registerBlock("lucernia_sapling", new TenaneaSaplingBlock());
public static final Block LUCERNIA_SAPLING = registerBlock("lucernia_sapling", new LucerniaSaplingBlock());
public static final Block LUCERNIA_LEAVES = registerBlock("lucernia_leaves", new EndLeavesBlock(LUCERNIA_SAPLING, MaterialColor.COLOR_ORANGE));
public static final Block LUCERNIA_OUTER_LEAVES = registerBlock("lucernia_outer_leaves", new FurBlock(LUCERNIA_SAPLING, 32));
public static final WoodenMaterial LUCERNIA = new WoodenMaterial("lucernia", MaterialColor.COLOR_ORANGE, MaterialColor.COLOR_ORANGE);