Tag switching (WIP)

This commit is contained in:
paulevsGitch 2021-05-26 17:13:36 +03:00
parent 0486d7d89c
commit 41df84404b
72 changed files with 303 additions and 628 deletions

View file

@ -17,6 +17,7 @@ import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.chunk.ChunkGenerator;
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
import net.minecraft.world.level.material.Material;
import ru.bclib.api.TagAPI;
import ru.bclib.sdf.PosInfo;
import ru.bclib.sdf.SDF;
import ru.bclib.sdf.operator.SDFDisplacement;
@ -27,7 +28,6 @@ import ru.bclib.sdf.primitive.SDFSphere;
import ru.bclib.util.MHelper;
import ru.bclib.util.SplineHelper;
import ru.betterend.integration.Integrations;
import ru.betterend.registry.EndTags;
import ru.betterend.util.BlocksHelper;
import ru.betterend.world.features.DefaultFeature;
@ -37,7 +37,7 @@ public class NightshadeRedwoodTreeFeature extends DefaultFeature {
@Override
public boolean place(WorldGenLevel world, ChunkGenerator chunkGenerator, Random random, BlockPos pos,
NoneFeatureConfiguration config) {
if (!world.getBlockState(pos.below()).getBlock().is(EndTags.END_GROUND))
if (!world.getBlockState(pos.below()).getBlock().is(TagAPI.END_GROUND))
return false;
BlockState log = Integrations.BYG.getDefaultState("nightshade_log");
@ -49,7 +49,7 @@ public class NightshadeRedwoodTreeFeature extends DefaultFeature {
return log;
};
Function<BlockState, Boolean> replace = (state) -> {
return state.is(EndTags.END_GROUND) || state.getMaterial().equals(Material.PLANT)
return state.is(TagAPI.END_GROUND) || state.getMaterial().equals(Material.PLANT)
|| state.getMaterial().isReplaceable();
};
Function<PosInfo, BlockState> post = (info) -> {