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
|
@Override
|
||||||
protected Feature<?> getFeature() {
|
protected Feature<?> getFeature() {
|
||||||
return EndFeatures.LUCERNIA.getFeature();
|
return EndFeatures.TENANEA.getFeature();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean canSurvive(BlockState state, LevelReader world, BlockPos pos) {
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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 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 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_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 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);
|
public static final WoodenMaterial LUCERNIA = new WoodenMaterial("lucernia", MaterialColor.COLOR_ORANGE, MaterialColor.COLOR_ORANGE);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue