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

@ -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

@ -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);
}
}