Code Cleanup
This commit is contained in:
@@ -9,7 +9,6 @@ import net.minecraft.world.IWorld;
|
||||
import net.minecraft.world.gen.ChunkGenerator;
|
||||
import net.minecraft.world.gen.feature.structure.IStructurePieceType;
|
||||
import net.minecraft.world.gen.feature.structure.ScatteredStructurePiece;
|
||||
import net.minecraft.world.gen.feature.structure.StructurePiece;
|
||||
import net.minecraft.world.gen.feature.template.TemplateManager;
|
||||
|
||||
public class MeteoritePiece extends ScatteredStructurePiece {
|
||||
|
||||
@@ -18,7 +18,8 @@
|
||||
|
||||
package appeng.worldgen;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockState;
|
||||
@@ -47,7 +48,6 @@ import appeng.worldgen.meteorite.Fallout;
|
||||
import appeng.worldgen.meteorite.FalloutCopy;
|
||||
import appeng.worldgen.meteorite.FalloutSand;
|
||||
import appeng.worldgen.meteorite.FalloutSnow;
|
||||
import appeng.worldgen.meteorite.IMeteoriteWorld;
|
||||
import appeng.worldgen.meteorite.MeteoriteBlockPutter;
|
||||
|
||||
public final class MeteoritePlacer {
|
||||
|
||||
@@ -12,9 +12,6 @@ import net.minecraft.world.IWorldReader;
|
||||
|
||||
import appeng.api.AEApi;
|
||||
import appeng.api.definitions.IBlocks;
|
||||
import appeng.core.AEConfig;
|
||||
import appeng.worldgen.meteorite.IMeteoriteWorld;
|
||||
import appeng.worldgen.meteorite.StandardWorld;
|
||||
|
||||
/**
|
||||
* Makes decisions about spawning meteorites in the world.
|
||||
|
||||
@@ -29,7 +29,6 @@ import net.minecraft.world.gen.ChunkGenerator;
|
||||
import net.minecraft.world.gen.GenerationSettings;
|
||||
import net.minecraft.world.gen.feature.Feature;
|
||||
import net.minecraft.world.gen.feature.NoFeatureConfig;
|
||||
import net.minecraft.world.server.ServerWorld;
|
||||
|
||||
import appeng.api.features.AEFeature;
|
||||
import appeng.api.features.IWorldGen.WorldGenType;
|
||||
|
||||
@@ -1,12 +1,8 @@
|
||||
package appeng.worldgen;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.nbt.NBTUtil;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraftforge.common.util.INBTSerializable;
|
||||
|
||||
public final class PlacedMeteoriteSettings {
|
||||
|
||||
|
||||
@@ -68,28 +68,28 @@ public final class QuartzWorldGen extends ReplaceBlockFeature {
|
||||
ReplaceBlockConfig config) {
|
||||
/*
|
||||
* if( this.oreNormal == null && this.oreCharged == null ) { return false; }
|
||||
*
|
||||
*
|
||||
* World w = worldIn.getWorld();
|
||||
*
|
||||
*
|
||||
* int seaLevel = w.getSeaLevel();
|
||||
*
|
||||
*
|
||||
* ChunkPos chunkPos = new ChunkPos( pos );
|
||||
*
|
||||
*
|
||||
* if( seaLevel < 20 ) { final int x = ( chunkPos.x << 4 ) + 8; final int z = (
|
||||
* chunkPos.z << 4 ) + 8; seaLevel = w.getHeight( Heightmap.Type.WORLD_SURFACE,
|
||||
* x, z ); }
|
||||
*
|
||||
*
|
||||
* final int oreDepthMultiplier =
|
||||
* AEConfig.instance().getQuartzOresClusterAmount() * seaLevel / 64; final int
|
||||
* scale = (int) Math.round( r.nextGaussian() * Math.sqrt( oreDepthMultiplier )
|
||||
* + oreDepthMultiplier );
|
||||
*
|
||||
*
|
||||
* for( int cnt = 0; cnt < ( r.nextBoolean() ? scale * 2 : scale ) / 2; ++cnt )
|
||||
* { boolean isCharged = false;
|
||||
*
|
||||
*
|
||||
* if( this.oreCharged != null ) { isCharged = r.nextFloat() >
|
||||
* AEConfig.instance().getSpawnChargedChance(); }
|
||||
*
|
||||
*
|
||||
* final WorldGenMinable whichOre = isCharged ? this.oreCharged :
|
||||
* this.oreNormal; if( whichOre != null && shouldGenerate( isCharged, w ) ) {
|
||||
* final int cx = chunkPos.x * 16 + r.nextInt( 16 ); final int cy = r.nextInt(
|
||||
|
||||
@@ -22,8 +22,6 @@ import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IWorld;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.chunk.Chunk;
|
||||
import net.minecraft.world.chunk.IChunk;
|
||||
|
||||
import appeng.util.Platform;
|
||||
|
||||
@@ -18,15 +18,11 @@
|
||||
|
||||
package appeng.worldgen.meteorite;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.Blocks;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IWorld;
|
||||
|
||||
import appeng.api.definitions.IBlockDefinition;
|
||||
import appeng.util.Platform;
|
||||
|
||||
public class FalloutCopy extends Fallout {
|
||||
private static final double SPECIFIED_BLOCK_THRESHOLD = 0.9;
|
||||
private static final double AIR_BLOCK_THRESHOLD = 0.8;
|
||||
|
||||
@@ -23,8 +23,6 @@ import net.minecraft.block.Blocks;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IWorld;
|
||||
|
||||
import appeng.api.definitions.IBlockDefinition;
|
||||
|
||||
public class FalloutSand extends FalloutCopy {
|
||||
private static final double GLASS_THRESHOLD = 0.66;
|
||||
private final MeteoriteBlockPutter putter;
|
||||
|
||||
@@ -23,8 +23,6 @@ import net.minecraft.block.Blocks;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IWorld;
|
||||
|
||||
import appeng.api.definitions.IBlockDefinition;
|
||||
|
||||
public class FalloutSnow extends FalloutCopy {
|
||||
private static final double SNOW_THRESHOLD = 0.7;
|
||||
private static final double ICE_THRESHOLD = 0.5;
|
||||
|
||||
@@ -23,7 +23,6 @@ import net.minecraft.block.BlockState;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IWorld;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public interface IMeteoriteWorld {
|
||||
int minX(int in);
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
|
||||
package appeng.worldgen.meteorite;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.Blocks;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
|
||||
@@ -24,7 +24,6 @@ import net.minecraft.block.Blocks;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IWorld;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import appeng.util.Platform;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user