Reformatted Code

This commit is contained in:
Frank 2023-12-19 21:02:54 +01:00
parent 2b21b0472f
commit b95e3ccdef
10 changed files with 21 additions and 16 deletions

View file

@ -32,7 +32,7 @@ public class BuddingSmaragdantCrystalBlock extends LitPillarBlock implements Beh
.randomTicks()
.pushReaction(PushReaction.DESTROY));
}
@Override
public List<ItemStack> getDrops(BlockState state, LootParams.Builder builder) {
return Collections.emptyList();

View file

@ -35,7 +35,7 @@ public class EndstoneDustBlock extends FallingBlock implements TagProvider, Beha
protected MapCodec<? extends EndstoneDustBlock> codec() {
return CODEC;
}
private static final int COLOR = ColorUtil.color(226, 239, 168);
public EndstoneDustBlock() {

View file

@ -1,6 +1,5 @@
package org.betterx.betterend.client;
import org.betterx.betterend.BetterEnd;
import org.betterx.betterend.client.render.BetterEndSkyRenderer;
import org.betterx.betterend.events.ItemTooltipCallback;
import org.betterx.betterend.interfaces.MultiModelItem;

View file

@ -1,6 +1,5 @@
package org.betterx.betterend.entity.model;
import org.betterx.betterend.BetterEnd;
import org.betterx.betterend.entity.SilkMothEntity;
import com.mojang.blaze3d.vertex.PoseStack;

View file

@ -23,7 +23,7 @@ public abstract class ServerPlayerMixin extends Player {
public ServerPlayerMixin(Level level, BlockPos blockPos, float f, GameProfile gameProfile) {
super(level, blockPos, f, gameProfile);
}
@Inject(method = "createEndPlatform", at = @At("HEAD"), cancellable = true)
private void be_createEndSpawnPlatform(ServerLevel world, BlockPos centerPos, CallbackInfo info) {
if (!GeneratorOptions.generateObsidianPlatform()) {

View file

@ -16,7 +16,7 @@ public class EndProcessors {
public static final ResourceKey<StructureProcessorList> END_STREET =
ProcessorHelper.createKey(BetterEnd.makeID("end_street"));
public static final ResourceKey<StructureProcessorList> CRYING_10_PERCENT =
ProcessorHelper.createKey(BetterEnd.makeID("crying_10_percent"));
}

View file

@ -10,13 +10,13 @@ import org.betterx.worlds.together.tag.v3.CommonBlockTags;
import net.minecraft.core.BlockPos;
import net.minecraft.core.BlockPos.MutableBlockPos;
import net.minecraft.core.Direction;
import net.minecraft.util.RandomSource;
import net.minecraft.world.level.WorldGenLevel;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.block.state.properties.BlockStateProperties;
import net.minecraft.world.level.levelgen.feature.FeaturePlaceContext;
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
import net.minecraft.core.Direction;
import net.minecraft.world.level.material.Fluids;
public class SmaragdantCrystalFeature extends DefaultFeature {
@ -56,10 +56,17 @@ public class SmaragdantCrystalFeature extends DefaultFeature {
BlockState sideState = world.getBlockState(sidePos);
if (BuddingSmaragdantCrystalBlock.canShardGrowAtState(sideState)) {
if (random.nextBoolean()) {
BlockState attachedShard = EndBlocks.SMARAGDANT_CRYSTAL_SHARD.defaultBlockState()
.setValue(SmaragdantCrystalShardBlock.WATERLOGGED,
sideState.getFluidState().getType() == Fluids.WATER)
.setValue(SmaragdantCrystalShardBlock.FACING, k);
BlockState attachedShard = EndBlocks.SMARAGDANT_CRYSTAL_SHARD
.defaultBlockState()
.setValue(
SmaragdantCrystalShardBlock.WATERLOGGED,
sideState.getFluidState()
.getType() == Fluids.WATER
)
.setValue(
SmaragdantCrystalShardBlock.FACING,
k
);
BlocksHelper.setWithoutUpdate(world, sidePos, attachedShard);
}
}

View file

@ -38,7 +38,7 @@ public class StalactiteFeature extends Feature<StalactiteFeatureConfig> {
for (int i = 1; i <= height; i++) {
mut.setY(pos.getY() + i * dir);
BlockState state = world.getBlockState(mut);
if (!state.canBeReplaced()){
if (!state.canBeReplaced()) {
stalagnate = state.is(CommonBlockTags.GEN_END_STONES);
height = i;
break;

View file

@ -63,7 +63,7 @@ public class SulphurHillFeature extends DefaultFeature {
int d = x2 + z2;
mut.setY(pos.getY());
BlockState state = world.getBlockState(mut);
if (state.canBeReplaced() || state.is(EndBlocks.HYDROTHERMAL_VENT)){
if (state.canBeReplaced() || state.is(EndBlocks.HYDROTHERMAL_VENT)) {
if (d < r2 * r2) {
BlocksHelper.setWithoutUpdate(world, mut, Blocks.WATER);
mut.move(Direction.DOWN);
@ -76,7 +76,7 @@ public class SulphurHillFeature extends DefaultFeature {
state = world.getBlockState(mut);
int maxIt = MHelper.floor(10 - Math.sqrt(d)) + random.nextInt(1);
for (int i = 0; i < maxIt && state.canBeReplaced();
i++){
i++) {
BlocksHelper.setWithoutUpdate(world, mut, rock);
mut.move(Direction.DOWN);
}
@ -86,7 +86,7 @@ public class SulphurHillFeature extends DefaultFeature {
state = world.getBlockState(mut);
int maxIt = MHelper.floor(10 - Math.sqrt(d)) + random.nextInt(1);
for (int i = 0; i < maxIt && state.canBeReplaced();
i++){
i++) {
BlocksHelper.setWithoutUpdate(world, mut, rock);
mut.move(Direction.DOWN);
}

View file

@ -80,7 +80,7 @@ public class CavePiece extends BasePiece {
BlocksHelper.setWithoutUpdate(world, pos, CAVE_AIR);
}
} else if (dist < r * r) {
if (world.getBlockState(pos).canBeReplaced()){
if (world.getBlockState(pos).canBeReplaced()) {
BlocksHelper.setWithoutUpdate(world, pos, Blocks.END_STONE);
}
}