Continue mapping migration
This commit is contained in:
parent
99ade39404
commit
f03fd03bd0
499 changed files with 12567 additions and 12723 deletions
|
@ -1,7 +1,6 @@
|
|||
package ru.betterend.world.features;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.world.level.WorldGenLevel;
|
||||
import net.minecraft.world.level.chunk.ChunkGenerator;
|
||||
|
@ -15,17 +14,17 @@ public class CavePumpkinFeature extends DefaultFeature {
|
|||
@Override
|
||||
public boolean place(WorldGenLevel world, ChunkGenerator chunkGenerator, Random random, BlockPos pos,
|
||||
NoneFeatureConfiguration config) {
|
||||
if (!world.getBlockState(pos.up()).isIn(EndTags.GEN_TERRAIN) || !world.isAir(pos)
|
||||
|| !world.isAir(pos.below())) {
|
||||
if (!world.getBlockState(pos.above()).is(EndTags.GEN_TERRAIN) || !world.isEmptyBlock(pos)
|
||||
|| !world.isEmptyBlock(pos.below())) {
|
||||
return false;
|
||||
}
|
||||
|
||||
int age = random.nextInt(4);
|
||||
BlocksHelper.setWithoutUpdate(world, pos,
|
||||
EndBlocks.CAVE_PUMPKIN_SEED.defaultBlockState().with(BlockProperties.AGE, age));
|
||||
EndBlocks.CAVE_PUMPKIN_SEED.defaultBlockState().setValue(BlockProperties.AGE, age));
|
||||
if (age > 1) {
|
||||
BlocksHelper.setWithoutUpdate(world, pos.below(),
|
||||
EndBlocks.CAVE_PUMPKIN.defaultBlockState().with(BlockProperties.SMALL, age < 3));
|
||||
EndBlocks.CAVE_PUMPKIN.defaultBlockState().setValue(BlockProperties.SMALL, age < 3));
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue