Reformatted Code
This commit is contained in:
parent
2b21b0472f
commit
b95e3ccdef
10 changed files with 21 additions and 16 deletions
|
@ -32,7 +32,7 @@ public class BuddingSmaragdantCrystalBlock extends LitPillarBlock implements Beh
|
||||||
.randomTicks()
|
.randomTicks()
|
||||||
.pushReaction(PushReaction.DESTROY));
|
.pushReaction(PushReaction.DESTROY));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ItemStack> getDrops(BlockState state, LootParams.Builder builder) {
|
public List<ItemStack> getDrops(BlockState state, LootParams.Builder builder) {
|
||||||
return Collections.emptyList();
|
return Collections.emptyList();
|
||||||
|
|
|
@ -35,7 +35,7 @@ public class EndstoneDustBlock extends FallingBlock implements TagProvider, Beha
|
||||||
protected MapCodec<? extends EndstoneDustBlock> codec() {
|
protected MapCodec<? extends EndstoneDustBlock> codec() {
|
||||||
return CODEC;
|
return CODEC;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final int COLOR = ColorUtil.color(226, 239, 168);
|
private static final int COLOR = ColorUtil.color(226, 239, 168);
|
||||||
|
|
||||||
public EndstoneDustBlock() {
|
public EndstoneDustBlock() {
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
package org.betterx.betterend.client;
|
package org.betterx.betterend.client;
|
||||||
|
|
||||||
import org.betterx.betterend.BetterEnd;
|
|
||||||
import org.betterx.betterend.client.render.BetterEndSkyRenderer;
|
import org.betterx.betterend.client.render.BetterEndSkyRenderer;
|
||||||
import org.betterx.betterend.events.ItemTooltipCallback;
|
import org.betterx.betterend.events.ItemTooltipCallback;
|
||||||
import org.betterx.betterend.interfaces.MultiModelItem;
|
import org.betterx.betterend.interfaces.MultiModelItem;
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
package org.betterx.betterend.entity.model;
|
package org.betterx.betterend.entity.model;
|
||||||
|
|
||||||
import org.betterx.betterend.BetterEnd;
|
|
||||||
import org.betterx.betterend.entity.SilkMothEntity;
|
import org.betterx.betterend.entity.SilkMothEntity;
|
||||||
|
|
||||||
import com.mojang.blaze3d.vertex.PoseStack;
|
import com.mojang.blaze3d.vertex.PoseStack;
|
||||||
|
|
|
@ -23,7 +23,7 @@ public abstract class ServerPlayerMixin extends Player {
|
||||||
public ServerPlayerMixin(Level level, BlockPos blockPos, float f, GameProfile gameProfile) {
|
public ServerPlayerMixin(Level level, BlockPos blockPos, float f, GameProfile gameProfile) {
|
||||||
super(level, blockPos, f, gameProfile);
|
super(level, blockPos, f, gameProfile);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Inject(method = "createEndPlatform", at = @At("HEAD"), cancellable = true)
|
@Inject(method = "createEndPlatform", at = @At("HEAD"), cancellable = true)
|
||||||
private void be_createEndSpawnPlatform(ServerLevel world, BlockPos centerPos, CallbackInfo info) {
|
private void be_createEndSpawnPlatform(ServerLevel world, BlockPos centerPos, CallbackInfo info) {
|
||||||
if (!GeneratorOptions.generateObsidianPlatform()) {
|
if (!GeneratorOptions.generateObsidianPlatform()) {
|
||||||
|
|
|
@ -16,7 +16,7 @@ public class EndProcessors {
|
||||||
|
|
||||||
public static final ResourceKey<StructureProcessorList> END_STREET =
|
public static final ResourceKey<StructureProcessorList> END_STREET =
|
||||||
ProcessorHelper.createKey(BetterEnd.makeID("end_street"));
|
ProcessorHelper.createKey(BetterEnd.makeID("end_street"));
|
||||||
|
|
||||||
public static final ResourceKey<StructureProcessorList> CRYING_10_PERCENT =
|
public static final ResourceKey<StructureProcessorList> CRYING_10_PERCENT =
|
||||||
ProcessorHelper.createKey(BetterEnd.makeID("crying_10_percent"));
|
ProcessorHelper.createKey(BetterEnd.makeID("crying_10_percent"));
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,13 +10,13 @@ import org.betterx.worlds.together.tag.v3.CommonBlockTags;
|
||||||
|
|
||||||
import net.minecraft.core.BlockPos;
|
import net.minecraft.core.BlockPos;
|
||||||
import net.minecraft.core.BlockPos.MutableBlockPos;
|
import net.minecraft.core.BlockPos.MutableBlockPos;
|
||||||
|
import net.minecraft.core.Direction;
|
||||||
import net.minecraft.util.RandomSource;
|
import net.minecraft.util.RandomSource;
|
||||||
import net.minecraft.world.level.WorldGenLevel;
|
import net.minecraft.world.level.WorldGenLevel;
|
||||||
import net.minecraft.world.level.block.state.BlockState;
|
import net.minecraft.world.level.block.state.BlockState;
|
||||||
import net.minecraft.world.level.block.state.properties.BlockStateProperties;
|
import net.minecraft.world.level.block.state.properties.BlockStateProperties;
|
||||||
import net.minecraft.world.level.levelgen.feature.FeaturePlaceContext;
|
import net.minecraft.world.level.levelgen.feature.FeaturePlaceContext;
|
||||||
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
|
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
|
||||||
import net.minecraft.core.Direction;
|
|
||||||
import net.minecraft.world.level.material.Fluids;
|
import net.minecraft.world.level.material.Fluids;
|
||||||
|
|
||||||
public class SmaragdantCrystalFeature extends DefaultFeature {
|
public class SmaragdantCrystalFeature extends DefaultFeature {
|
||||||
|
@ -56,10 +56,17 @@ public class SmaragdantCrystalFeature extends DefaultFeature {
|
||||||
BlockState sideState = world.getBlockState(sidePos);
|
BlockState sideState = world.getBlockState(sidePos);
|
||||||
if (BuddingSmaragdantCrystalBlock.canShardGrowAtState(sideState)) {
|
if (BuddingSmaragdantCrystalBlock.canShardGrowAtState(sideState)) {
|
||||||
if (random.nextBoolean()) {
|
if (random.nextBoolean()) {
|
||||||
BlockState attachedShard = EndBlocks.SMARAGDANT_CRYSTAL_SHARD.defaultBlockState()
|
BlockState attachedShard = EndBlocks.SMARAGDANT_CRYSTAL_SHARD
|
||||||
.setValue(SmaragdantCrystalShardBlock.WATERLOGGED,
|
.defaultBlockState()
|
||||||
sideState.getFluidState().getType() == Fluids.WATER)
|
.setValue(
|
||||||
.setValue(SmaragdantCrystalShardBlock.FACING, k);
|
SmaragdantCrystalShardBlock.WATERLOGGED,
|
||||||
|
sideState.getFluidState()
|
||||||
|
.getType() == Fluids.WATER
|
||||||
|
)
|
||||||
|
.setValue(
|
||||||
|
SmaragdantCrystalShardBlock.FACING,
|
||||||
|
k
|
||||||
|
);
|
||||||
BlocksHelper.setWithoutUpdate(world, sidePos, attachedShard);
|
BlocksHelper.setWithoutUpdate(world, sidePos, attachedShard);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,7 +38,7 @@ public class StalactiteFeature extends Feature<StalactiteFeatureConfig> {
|
||||||
for (int i = 1; i <= height; i++) {
|
for (int i = 1; i <= height; i++) {
|
||||||
mut.setY(pos.getY() + i * dir);
|
mut.setY(pos.getY() + i * dir);
|
||||||
BlockState state = world.getBlockState(mut);
|
BlockState state = world.getBlockState(mut);
|
||||||
if (!state.canBeReplaced()){
|
if (!state.canBeReplaced()) {
|
||||||
stalagnate = state.is(CommonBlockTags.GEN_END_STONES);
|
stalagnate = state.is(CommonBlockTags.GEN_END_STONES);
|
||||||
height = i;
|
height = i;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -63,7 +63,7 @@ public class SulphurHillFeature extends DefaultFeature {
|
||||||
int d = x2 + z2;
|
int d = x2 + z2;
|
||||||
mut.setY(pos.getY());
|
mut.setY(pos.getY());
|
||||||
BlockState state = world.getBlockState(mut);
|
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) {
|
if (d < r2 * r2) {
|
||||||
BlocksHelper.setWithoutUpdate(world, mut, Blocks.WATER);
|
BlocksHelper.setWithoutUpdate(world, mut, Blocks.WATER);
|
||||||
mut.move(Direction.DOWN);
|
mut.move(Direction.DOWN);
|
||||||
|
@ -76,7 +76,7 @@ public class SulphurHillFeature extends DefaultFeature {
|
||||||
state = world.getBlockState(mut);
|
state = world.getBlockState(mut);
|
||||||
int maxIt = MHelper.floor(10 - Math.sqrt(d)) + random.nextInt(1);
|
int maxIt = MHelper.floor(10 - Math.sqrt(d)) + random.nextInt(1);
|
||||||
for (int i = 0; i < maxIt && state.canBeReplaced();
|
for (int i = 0; i < maxIt && state.canBeReplaced();
|
||||||
i++){
|
i++) {
|
||||||
BlocksHelper.setWithoutUpdate(world, mut, rock);
|
BlocksHelper.setWithoutUpdate(world, mut, rock);
|
||||||
mut.move(Direction.DOWN);
|
mut.move(Direction.DOWN);
|
||||||
}
|
}
|
||||||
|
@ -86,7 +86,7 @@ public class SulphurHillFeature extends DefaultFeature {
|
||||||
state = world.getBlockState(mut);
|
state = world.getBlockState(mut);
|
||||||
int maxIt = MHelper.floor(10 - Math.sqrt(d)) + random.nextInt(1);
|
int maxIt = MHelper.floor(10 - Math.sqrt(d)) + random.nextInt(1);
|
||||||
for (int i = 0; i < maxIt && state.canBeReplaced();
|
for (int i = 0; i < maxIt && state.canBeReplaced();
|
||||||
i++){
|
i++) {
|
||||||
BlocksHelper.setWithoutUpdate(world, mut, rock);
|
BlocksHelper.setWithoutUpdate(world, mut, rock);
|
||||||
mut.move(Direction.DOWN);
|
mut.move(Direction.DOWN);
|
||||||
}
|
}
|
||||||
|
|
|
@ -80,7 +80,7 @@ public class CavePiece extends BasePiece {
|
||||||
BlocksHelper.setWithoutUpdate(world, pos, CAVE_AIR);
|
BlocksHelper.setWithoutUpdate(world, pos, CAVE_AIR);
|
||||||
}
|
}
|
||||||
} else if (dist < r * r) {
|
} else if (dist < r * r) {
|
||||||
if (world.getBlockState(pos).canBeReplaced()){
|
if (world.getBlockState(pos).canBeReplaced()) {
|
||||||
BlocksHelper.setWithoutUpdate(world, pos, Blocks.END_STONE);
|
BlocksHelper.setWithoutUpdate(world, pos, Blocks.END_STONE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue