Mobs pathfinding issues fix
This commit is contained in:
parent
2105988554
commit
0301be97af
5 changed files with 38 additions and 3 deletions
|
@ -23,6 +23,7 @@ public class BiomeShadowForest extends EndBiome {
|
|||
.addFeature(EndFeatures.SHADOW_PLANT)
|
||||
.addFeature(EndFeatures.MURKWEED)
|
||||
.addFeature(EndFeatures.NEEDLEGRASS)
|
||||
.addFeature(EndFeatures.SHADOW_BERRY)
|
||||
.addFeature(EndFeatures.TWISTED_VINE)
|
||||
.addStructureFeature(ConfiguredStructureFeatures.END_CITY)
|
||||
.addMobSpawn(EntityType.ENDERMAN, 80, 1, 4)
|
||||
|
|
|
@ -7,6 +7,7 @@ import net.minecraft.block.BlockState;
|
|||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.StructureWorldAccess;
|
||||
import ru.betterend.blocks.basis.BlockDoublePlant;
|
||||
import ru.betterend.blocks.basis.BlockPlantWithAge;
|
||||
import ru.betterend.util.BlocksHelper;
|
||||
|
||||
public class SinglePlantFeature extends ScatterFeature {
|
||||
|
@ -41,6 +42,11 @@ public class SinglePlantFeature extends ScatterFeature {
|
|||
BlocksHelper.setWithoutUpdate(world, blockPos, state);
|
||||
BlocksHelper.setWithoutUpdate(world, blockPos.up(), state.with(BlockDoublePlant.TOP, true));
|
||||
}
|
||||
else if (plant instanceof BlockPlantWithAge) {
|
||||
int age = random.nextInt(4);
|
||||
BlockState state = plant.getDefaultState().with(BlockPlantWithAge.AGE, age);
|
||||
BlocksHelper.setWithoutUpdate(world, blockPos, state);
|
||||
}
|
||||
else {
|
||||
BlocksHelper.setWithoutUpdate(world, blockPos, plant);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue