Migrating to BCLib (WIP)

This commit is contained in:
Aleksey 2021-06-11 15:47:04 +03:00
parent 61d4a33cf6
commit 3668a4694a
184 changed files with 802 additions and 4348 deletions

View file

@ -1,7 +1,5 @@
package ru.betterend.world.features.terrain;
import java.util.Random;
import net.minecraft.core.BlockPos;
import net.minecraft.core.BlockPos.MutableBlockPos;
import net.minecraft.util.Mth;
@ -12,9 +10,11 @@ import net.minecraft.world.level.block.state.properties.BlockStateProperties;
import net.minecraft.world.level.chunk.ChunkGenerator;
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
import ru.bclib.api.TagAPI;
import ru.bclib.blocks.StalactiteBlock;
import ru.bclib.util.BlocksHelper;
import ru.bclib.world.features.DefaultFeature;
import ru.betterend.blocks.basis.StalactiteBlock;
import java.util.Random;
public class StalactiteFeature extends DefaultFeature {
private final boolean ceiling;

View file

@ -10,10 +10,11 @@ import net.minecraft.world.level.block.Blocks;
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 ru.bclib.blocks.BlockProperties;
import ru.bclib.util.BlocksHelper;
import ru.bclib.util.MHelper;
import ru.bclib.world.features.DefaultFeature;
import ru.betterend.blocks.BlockProperties;
import ru.betterend.blocks.EndBlockProperties;
import ru.betterend.noise.OpenSimplexNoise;
import ru.betterend.registry.EndBlocks;

View file

@ -20,7 +20,7 @@ import ru.bclib.api.TagAPI;
import ru.bclib.util.BlocksHelper;
import ru.bclib.util.MHelper;
import ru.bclib.world.features.DefaultFeature;
import ru.betterend.blocks.BlockProperties;
import ru.betterend.blocks.EndBlockProperties;
import ru.betterend.blocks.SulphurCrystalBlock;
import ru.betterend.noise.OpenSimplexNoise;
import ru.betterend.registry.EndBlocks;
@ -177,7 +177,7 @@ public class SulphuricCaveFeature extends DefaultFeature {
private void placeBrimstone(WorldGenLevel world, BlockPos pos, Random random) {
BlockState state = getBrimstone(world, pos);
BlocksHelper.setWithoutUpdate(world, pos, state);
if (state.getValue(BlockProperties.ACTIVE)) {
if (state.getValue(EndBlockProperties.ACTIVE)) {
makeShards(world, pos, random);
}
}
@ -185,7 +185,7 @@ public class SulphuricCaveFeature extends DefaultFeature {
private BlockState getBrimstone(WorldGenLevel world, BlockPos pos) {
for (Direction dir : BlocksHelper.DIRECTIONS) {
if (world.getBlockState(pos.relative(dir)).is(Blocks.WATER)) {
return EndBlocks.BRIMSTONE.defaultBlockState().setValue(BlockProperties.ACTIVE, true);
return EndBlocks.BRIMSTONE.defaultBlockState().setValue(EndBlockProperties.ACTIVE, true);
}
}
return EndBlocks.BRIMSTONE.defaultBlockState();

View file

@ -18,7 +18,7 @@ import ru.bclib.api.TagAPI;
import ru.bclib.util.BlocksHelper;
import ru.bclib.util.MHelper;
import ru.bclib.world.features.DefaultFeature;
import ru.betterend.blocks.BlockProperties;
import ru.betterend.blocks.EndBlockProperties;
import ru.betterend.blocks.SulphurCrystalBlock;
import ru.betterend.noise.OpenSimplexNoise;
import ru.betterend.registry.EndBlocks;
@ -173,7 +173,7 @@ public class SulphuricLakeFeature extends DefaultFeature {
private void placeBrimstone(WorldGenLevel world, BlockPos pos, Random random) {
BlockState state = getBrimstone(world, pos);
BlocksHelper.setWithoutUpdate(world, pos, state);
if (state.getValue(BlockProperties.ACTIVE)) {
if (state.getValue(EndBlockProperties.ACTIVE)) {
makeShards(world, pos, random);
}
}
@ -181,7 +181,7 @@ public class SulphuricLakeFeature extends DefaultFeature {
private BlockState getBrimstone(WorldGenLevel world, BlockPos pos) {
for (Direction dir : BlocksHelper.DIRECTIONS) {
if (world.getBlockState(pos.relative(dir)).is(Blocks.WATER)) {
return EndBlocks.BRIMSTONE.defaultBlockState().setValue(BlockProperties.ACTIVE, true);
return EndBlocks.BRIMSTONE.defaultBlockState().setValue(EndBlockProperties.ACTIVE, true);
}
}
return EndBlocks.BRIMSTONE.defaultBlockState();