Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ private void commonSetup(final FMLCommonSetupEvent event) {

// Add custom blocks to nether cave carver
event.enqueueWork(() -> {
Set<Block> newCarvableBlocks = Stream.of(IEBlocks.DULLSTONE.get(), IEBlocks.DIMSTONE.get(), Blocks.GLOWSTONE, IEBlocks.GLOWDUST_SAND.get(), IEBlocks.GLOWDUST.get()).collect(Collectors.toCollection(HashSet::new));
Set<Block> newCarvableBlocks = Stream.of(IEBlocks.DULLSTONE.get(), IEBlocks.DIMSTONE.get(), Blocks.GLOWSTONE, IEBlocks.SHIMMER_SAND.get(), IEBlocks.SHIMMER_SHEET.get()).collect(Collectors.toCollection(HashSet::new));

newCarvableBlocks.addAll(((WorldCarverAccessor) WorldCarver.NETHER_CAVE).getCarvableBlocks());
((WorldCarverAccessor) WorldCarver.NETHER_CAVE).setCarvableBlocks(newCarvableBlocks);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public BlockState getStateForPlacement(BlockItemUseContext context) {
if (i < 7) {
return blockstate.with(LAYERS, Integer.valueOf(Math.min(8, i + 1)));
} else {
return IEBlocks.GLOWDUST_SAND.get().getDefaultState();
return IEBlocks.SHIMMER_SAND.get().getDefaultState();
}
} else {
return super.getStateForPlacement(context);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public boolean hasTileEntity(BlockState state) {
@Override
protected boolean isValidGround(BlockState state, IBlockReader worldIn, BlockPos pos) {
return
state.matchesBlock(IEBlocks.GLOWDUST_SAND.get()) || state.matchesBlock(Blocks.SAND) || state.matchesBlock(Blocks.RED_SAND)
state.matchesBlock(IEBlocks.SHIMMER_SAND.get()) || state.matchesBlock(Blocks.SAND) || state.matchesBlock(Blocks.RED_SAND)
|| state.matchesBlock(Blocks.GRASS) || state.matchesBlock(Blocks.GRASS_BLOCK) ||
state.matchesBlock(Blocks.DIRT) || state.matchesBlock(Blocks.COARSE_DIRT) || state.matchesBlock(Blocks.FARMLAND) ||
state.matchesBlock(Blocks.PODZOL) || state.matchesBlock(Blocks.MYCELIUM) ||
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public void onEntityWalk(World world, BlockPos pos, Entity entity) {
for (int x = -updateRadius; x <= updateRadius; x++) {
for (int y = -updateRadius; y <= updateRadius; y++) {
for (int z = -updateRadius; z <= updateRadius; z++) {
if (world.getBlockState(pos.add(x, y, z)) == IEBlocks.TRAPPED_GLOWDUST_SAND.get().getDefaultState()) {
if (world.getBlockState(pos.add(x, y, z)) == IEBlocks.GLIMMER_GRAVEL.get().getDefaultState()) {
((TrappedGlowSandBlock) world.getBlockState(pos.add(x, y, z)).getBlock()).startFalling((ServerWorld) world, pos.add(x, y, z));
}
}
Expand Down
72 changes: 36 additions & 36 deletions src/main/java/org/infernalstudios/infernalexp/init/IEBlocks.java

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ public class IEConfiguredFeatures {
public static final RuleTest BASALT = new BlockMatchRuleTest(Blocks.BASALT);
public static final RuleTest SOUL_SOIL = new BlockMatchRuleTest(Blocks.SOUL_SOIL);

public static ConfiguredFeature<?, ?> GLOWDUST_LAYER = registerConfiguredFeature("glowdust_layer", IEFeatures.GLOWDUST_LAYER.withConfiguration(IFeatureConfig.NO_FEATURE_CONFIG));
public static ConfiguredFeature<?, ?> SHIMMER_SHEET_LAYER = registerConfiguredFeature("shimmer_sheet_layer", IEFeatures.SHIMMER_SHEET_LAYER.withConfiguration(IFeatureConfig.NO_FEATURE_CONFIG));
public static ConfiguredFeature<?, ?> GLOWSPIKE = registerConfiguredFeature("glowspike", IEFeatures.GLOWSPIKE.withConfiguration(new GlowSpikeFeatureConfig(3, 5, 8, 24, 7, 7, 0.3f, true)).withPlacement(Features.Placements.PATCH_PLACEMENT.count(30)));
public static ConfiguredFeature<?, ?> GLOWSPIKELARGE = registerConfiguredFeature("glowspikelarge", IEFeatures.GLOWSPIKE.withConfiguration(new GlowSpikeFeatureConfig(4, 7, 12, 98, 12, 12, 0.2f, false)).withPlacement(Features.Placements.PATCH_PLACEMENT.count(30)));
public static ConfiguredFeature<?, ?> DULLTHORN_TREE_PLANTED = registerConfiguredFeature("dullthorn_tree_planted", Feature.HUGE_FUNGUS.withConfiguration(new HugeFungusConfig(IEBlocks.GLOWDUST_SAND.get().getDefaultState(), IEBlocks.DULLTHORNS_BLOCK.get().getDefaultState(), IEBlocks.LUMINOUS_WART_BLOCK.get().getDefaultState(), IEBlocks.LUMINOUS_WART_BLOCK.get().getDefaultState(), true)));
public static ConfiguredFeature<?, ?> DULLTHORN_TREE_PLANTED = registerConfiguredFeature("dullthorn_tree_planted", Feature.HUGE_FUNGUS.withConfiguration(new HugeFungusConfig(IEBlocks.SHIMMER_SAND.get().getDefaultState(), IEBlocks.DULLTHORNS_BLOCK.get().getDefaultState(), IEBlocks.LUMINOUS_WART_BLOCK.get().getDefaultState(), IEBlocks.LUMINOUS_WART_BLOCK.get().getDefaultState(), true)));
public static ConfiguredFeature<?, ?> GLOWSTONE_RAVINE = registerConfiguredFeature("glowstone_ravine", IEFeatures.GLOWSTONE_RAVINE.withConfiguration(IFeatureConfig.NO_FEATURE_CONFIG).withPlacement(Features.Placements.PATCH_PLACEMENT.count(120)));
public static ConfiguredFeature<?, ?> HANGING_GIANT_BROWN_MUSHROOM = registerConfiguredFeature("hanging_giant_brown_mushroom", IEFeatures.HANGING_GIANT_BROWN_MUSHROOM.withConfiguration(IFeatureConfig.NO_FEATURE_CONFIG).withPlacement(Features.Placements.PATCH_PLACEMENT.count(120)));
public static ConfiguredFeature<?, ?> DULLSTONE_DEATH_PIT = registerConfiguredFeature("dullstone_death_pit", IEFeatures.DULLSTONE_DEATH_PIT.withConfiguration(IFeatureConfig.NO_FEATURE_CONFIG).withPlacement(Features.Placements.PATCH_PLACEMENT.count(90)));
Expand All @@ -67,7 +67,7 @@ public class IEConfiguredFeatures {
public static ConfiguredFeature<?, ?> ORE_GLOWSILK_COCOON = registerConfiguredFeature("ore_glowsilk_cocoon", Feature.NO_SURFACE_ORE.withConfiguration(new OreFeatureConfig(OreFeatureConfig.FillerBlockType.BASE_STONE_NETHER, IEBlocks.GLOWSILK_COCOON.get().getDefaultState(), 2)).withPlacement(Placement.DEPTH_AVERAGE.configure(new DepthAverageConfig(20, 10))).square());
public static ConfiguredFeature<?, ?> ORE_BASALT_IRON_BASALT_DELTA = registerConfiguredFeature("ore_basalt_iron_basalt_deltas", Feature.ORE.withConfiguration(new OreFeatureConfig(BASALT, IEBlocks.BASALT_IRON_ORE.get().getDefaultState(), 8)).withPlacement(Features.Placements.NETHER_SPRING_ORE_PLACEMENT).square().count(18));
public static ConfiguredFeature<?, ?> ORE_BASALT_IRON_DELTA_SHORES = registerConfiguredFeature("ore_basalt_iron_delta_shores", Feature.ORE.withConfiguration(new OreFeatureConfig(BASALT, IEBlocks.BASALT_IRON_ORE.get().getDefaultState(), 8)).withPlacement(Features.Placements.NETHER_SPRING_ORE_PLACEMENT).square().count(8));
public static ConfiguredFeature<?, ?> PATCH_GLOW_FIRE = registerConfiguredFeature("patch_glow_fire", Feature.RANDOM_PATCH.withConfiguration((new BlockClusterFeatureConfig.Builder(new SimpleBlockStateProvider(IEBlocks.GLOW_FIRE.get().getDefaultState()), SimpleBlockPlacer.PLACER)).tries(64).whitelist(ImmutableSet.of(IEBlocks.GLOWDUST_SAND.get())).preventProjection().build()).withPlacement(Features.Placements.FIRE_PLACEMENT));
public static ConfiguredFeature<?, ?> PATCH_GLOW_FIRE = registerConfiguredFeature("patch_glow_fire", Feature.RANDOM_PATCH.withConfiguration((new BlockClusterFeatureConfig.Builder(new SimpleBlockStateProvider(IEBlocks.GLOW_FIRE.get().getDefaultState()), SimpleBlockPlacer.PLACER)).tries(64).whitelist(ImmutableSet.of(IEBlocks.SHIMMER_SAND.get())).preventProjection().build()).withPlacement(Features.Placements.FIRE_PLACEMENT));
public static ConfiguredFeature<?, ?> BASALTIC_MAGMA = registerConfiguredFeature("basaltic_magma", Feature.ORE.withConfiguration(new OreFeatureConfig(BASALT, IEBlocks.BASALTIC_MAGMA.get().getDefaultState(), 10)).withPlacement(Features.Placements.NETHER_SPRING_ORE_PLACEMENT).square().count(8));
public static ConfiguredFeature<?, ?> PATCH_WARPED_CAP = registerConfiguredFeature("patch_warped_cap", Feature.RANDOM_PATCH.withConfiguration((new BlockClusterFeatureConfig.Builder(new SimpleBlockStateProvider(IEBlocks.WARPED_FUNGUS_CAP.get().getDefaultState()), new SimpleBlockPlacer())).tries(64).whitelist(ImmutableSet.of(Blocks.WARPED_NYLIUM.getBlock())).preventProjection().build()).range(128).chance(16));
public static ConfiguredFeature<?, ?> PATCH_CRIMSON_CAP = registerConfiguredFeature("patch_crimson_cap", Feature.RANDOM_PATCH.withConfiguration((new BlockClusterFeatureConfig.Builder(new SimpleBlockStateProvider(IEBlocks.CRIMSON_FUNGUS_CAP.get().getDefaultState()), new SimpleBlockPlacer())).tries(64).whitelist(ImmutableSet.of(Blocks.WARPED_NYLIUM.getBlock())).preventProjection().build()).range(128).chance(16));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,14 @@ public class IEFeatures {

public static List<Feature<?>> features = new ArrayList<>();

public static final Feature<NoFeatureConfig> GLOWDUST_LAYER = registerFeature("glowdust_layer", new GlowLayerFeature(NoFeatureConfig.CODEC));
public static final Feature<NoFeatureConfig> SHIMMER_SHEET_LAYER = registerFeature("shimmer_sheet_layer", new GlowLayerFeature(NoFeatureConfig.CODEC));
public static final Feature<GlowSpikeFeatureConfig> GLOWSPIKE = registerFeature("glowspike", new GlowSpikeFeature(GlowSpikeFeatureConfig.CODEC));
public static final Feature<NoFeatureConfig> GLOWSTONE_RAVINE = registerFeature("glowstone_ravine", new GlowstoneRavineFeature(NoFeatureConfig.CODEC));
public static final Feature<NoFeatureConfig> HANGING_GIANT_BROWN_MUSHROOM = registerFeature("hanging_giant_brown_mushroom", new HangingGiantBrownMushroomFeature(NoFeatureConfig.CODEC));
public static final Feature<NoFeatureConfig> LUMINOUS_FUNGUS = registerFeature("luminous_fungus", new LuminousFungusFeature(NoFeatureConfig.CODEC));
public static final Feature<NoFeatureConfig> DULLTHORNS = registerFeature("dullthorns", new DullthornsFeature(NoFeatureConfig.CODEC));
public static final Feature<BlockStateFeatureConfig> BOULDER = registerFeature("blackstone_boulder", new BoulderFeature(BlockStateFeatureConfig.CODEC));
public static final Feature<NoFeatureConfig> DULLSTONE_DEATH_PIT = registerFeature("glowdust_sink_hole", new SinkHoleFeature(NoFeatureConfig.CODEC));
public static final Feature<NoFeatureConfig> DULLSTONE_DEATH_PIT = registerFeature("shimmer_sheet_sink_hole", new SinkHoleFeature(NoFeatureConfig.CODEC));
public static final Feature<NoFeatureConfig> SHROOMLIGHT_TEAR = registerFeature("shroomlight_tear", new ShroomlightTearFeature(NoFeatureConfig.CODEC));
public static final Feature<PlantedQuartzFeatureConfig> PATCH_PLANTED_QUARTZ = registerFeature("planted_quartz_patch", new PlantedQuartzFeature(PlantedQuartzFeatureConfig.CODEC));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ public class IESurfaceBuilders {
// Surface Builder Configs
public static class ModSurfaceBuilderConfig {
public static final SurfaceBuilderConfig GLOWSTONE_CANYON_CONFIG = new SurfaceBuilderConfig(
IEBlocks.GLOWDUST_SAND.get().getDefaultState(),
IEBlocks.GLOWDUST_STONE.get().getDefaultState(),
IEBlocks.SHIMMER_SAND.get().getDefaultState(),
IEBlocks.SHIMMER_STONE.get().getDefaultState(),
Blocks.GLOWSTONE.getDefaultState());

public static final SurfaceBuilderConfig DELTA_SHORES_CONFIG = new SurfaceBuilderConfig(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ protected void configureGeneration(BiomeGenerationSettings.Builder generation) {
generation.withFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, Features.SPRING_CLOSED_DOUBLE);
generation.withFeature(GenerationStage.Decoration.UNDERGROUND_ORES, IEConfiguredFeatures.ORE_GLOWSILK_COCOON);
generation.withFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, IEConfiguredFeatures.PATCH_GLOW_FIRE);
generation.withFeature(GenerationStage.Decoration.TOP_LAYER_MODIFICATION, IEConfiguredFeatures.GLOWDUST_LAYER);
generation.withFeature(GenerationStage.Decoration.TOP_LAYER_MODIFICATION, IEConfiguredFeatures.SHIMMER_SHEET_LAYER);

DefaultBiomeFeatures.withCommonNetherBlocks(generation);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public class GlowstoneRavineCarver extends CanyonWorldCarver {

public GlowstoneRavineCarver(Codec<ProbabilityConfig> p_i231916_1_) {
super(p_i231916_1_);
this.carvableBlocks = ImmutableSet.of(Blocks.BLACKSTONE, Blocks.GLOWSTONE, IEBlocks.DULLSTONE.get(), IEBlocks.DIMSTONE.get(), IEBlocks.GLOWDUST_SAND.get(), IEBlocks.GLOWDUST_STONE.get(), IEBlocks.GLOWDUST.get(), IEBlocks.CRUMBLING_BLACKSTONE.get());
this.carvableBlocks = ImmutableSet.of(Blocks.BLACKSTONE, Blocks.GLOWSTONE, IEBlocks.DULLSTONE.get(), IEBlocks.DIMSTONE.get(), IEBlocks.SHIMMER_SAND.get(), IEBlocks.SHIMMER_STONE.get(), IEBlocks.SHIMMER_SHEET.get(), IEBlocks.CRUMBLING_BLACKSTONE.get());
}

private final float[] heightToHorizontalStretchFactor = new float[256];
Expand Down Expand Up @@ -121,7 +121,7 @@ private double findYPos(IChunk chunk, Random random, double x, double z) {

// If there are multiple levels in current part of biome, add some randomness to which level the ravine generates on with a bias towards generating on the bottom levels
if (random.nextInt(3) != 0) {
if (chunk.getBlockState(new BlockPos(x, yCheck, z)) == IEBlocks.GLOWDUST_SAND.get().getDefaultState()) {
if (chunk.getBlockState(new BlockPos(x, yCheck, z)) == IEBlocks.SHIMMER_SAND.get().getDefaultState()) {
return yCheck - 5;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public BoulderFeature(Codec<BlockStateFeatureConfig> codec) {
public boolean generate(ISeedReader world, ChunkGenerator generator, Random random, BlockPos pos, BlockStateFeatureConfig config) {
int radius = new int[]{1, 1, 2, 2, 2, 2, 3}[random.nextInt(7)];

if (!world.isAirBlock(pos) || world.getBlockState(pos.down()).getBlock() != IEBlocks.GLOWDUST_SAND.get() || world.isAirBlock(pos.down(radius)) || random.nextInt(3) == 2) {
if (!world.isAirBlock(pos) || world.getBlockState(pos.down()).getBlock() != IEBlocks.SHIMMER_SAND.get() || world.isAirBlock(pos.down(radius)) || random.nextInt(3) == 2) {
return false;
} else {
placeSphere(world, random, pos.down(Math.floorDiv(radius, 3)), radius, config);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public boolean generate(ISeedReader worldIn, ChunkGenerator generator, Random ra
int height = random.nextInt(9) + 1;
int top = 0;

if (!worldIn.isAirBlock(pos) || worldIn.getBlockState(pos.down()).getBlock() != IEBlocks.GLOWDUST_SAND.get()) {
if (!worldIn.isAirBlock(pos) || worldIn.getBlockState(pos.down()).getBlock() != IEBlocks.SHIMMER_SAND.get()) {
return false;
} else {
// Generate dullthorns up "height" blocks unless there is something in the way
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public boolean generate(ISeedReader world, ChunkGenerator generator, Random rand
for (int z = minimumRange; z < maxRange; z++) {

// Only check between top land and sealevel.
// Prevents glowdust in caves below sealevel and better performance if player removes ceiling of Nether with datapack.
// Prevents shimmer_sheet in caves below sealevel and better performance if player removes ceiling of Nether with datapack.
int maxY = generator.getHeight(pos.getX() + x, pos.getZ() + z, Heightmap.Type.MOTION_BLOCKING);
for (int y = maxY; y > generator.getSeaLevel(); y--) {
mutableBlockPos.setPos(pos).move(x, y, z);
Expand All @@ -61,15 +61,15 @@ public boolean generate(ISeedReader world, ChunkGenerator generator, Random rand
cachedChunk = world.getChunk(mutableBlockPos);
}

// Checks for if we are at glowdust sand and moves up to check for air space.
// Checks for if we are at shimmer_sheet sand and moves up to check for air space.
BlockState currentBlock = cachedChunk.getBlockState(mutableBlockPos);
if (currentBlock.matchesBlock(IEBlocks.GLOWDUST_SAND.get()) &&
if (currentBlock.matchesBlock(IEBlocks.SHIMMER_SAND.get()) &&
cachedChunk.getBlockState(mutableBlockPos.move(Direction.UP)).isAir()) {
// we are now in the air space above Glowdust sand. Check if any of the 8 blocks around it is glowdust sand
// we are now in the air space above Glowdust sand. Check if any of the 8 blocks around it is shimmer_sheet sand
// maximum return is 8.
int glowdustLayerHeight = numberOfGlowdustSandNearby(world, mutableBlockPos, mutableBlockPosNeighbors);
if (glowdustLayerHeight > 0) {
world.setBlockState(mutableBlockPos, IEBlocks.GLOWDUST.get().getDefaultState().with(GlowdustBlock.LAYERS, glowdustLayerHeight), 3);
int shimmer_sheetLayerHeight = numberOfGlowdustSandNearby(world, mutableBlockPos, mutableBlockPosNeighbors);
if (shimmer_sheetLayerHeight > 0) {
world.setBlockState(mutableBlockPos, IEBlocks.SHIMMER_SHEET.get().getDefaultState().with(GlowdustBlock.LAYERS, shimmer_sheetLayerHeight), 3);
}
}
}
Expand Down Expand Up @@ -103,7 +103,7 @@ private boolean isMultipleBiomesInChunk(ISeedReader world, BlockPos pos, BlockPo
}

private int numberOfGlowdustSandNearby(ISeedReader world, BlockPos.Mutable mutableBlockPos, BlockPos.Mutable mutableBlockPosNeighbors) {
int glowdustSandCount = 0;
int shimmer_sheetSandCount = 0;
int radius = 2;
for (int x = -radius; x <= radius; x++) {
for (int z = -radius; z <= radius; z++) {
Expand All @@ -112,17 +112,17 @@ private int numberOfGlowdustSandNearby(ISeedReader world, BlockPos.Mutable mutab
mutableBlockPosNeighbors.setPos(mutableBlockPos).move(x, 0, z);
BlockState neighborBlock = world.getBlockState(mutableBlockPosNeighbors);
// Do not use .isSolid check because Glowdust Sand is marked notSolid (cause it uses Glowstone properties)
if (neighborBlock.matchesBlock(IEBlocks.GLOWDUST_SAND.get())) {
glowdustSandCount++;
if (neighborBlock.matchesBlock(IEBlocks.SHIMMER_SAND.get())) {
shimmer_sheetSandCount++;
}
}
}
// changes the shape and height of layers. Modify the algorithm for neat effects

// change radius to 1 and use this version for only 1 layer high glowdust layer right next to ledges
//return Math.min(glowdustSandCount, 1);
// change radius to 1 and use this version for only 1 layer high shimmer_sheet layer right next to ledges
//return Math.min(shimmer_sheetSandCount, 1);

// change radius to 2 and use this version for 2x2 barely sloping dust that looks neat
return Math.min((int) Math.ceil((glowdustSandCount) / 6D), 8);
return Math.min((int) Math.ceil((shimmer_sheetSandCount) / 6D), 8);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public GlowSpikeFeature(Codec<GlowSpikeFeatureConfig> codec) {
@Override
public boolean generate(ISeedReader world, ChunkGenerator generator, Random random, BlockPos pos, GlowSpikeFeatureConfig config) {

if ((world.isAirBlock(pos) || world.getBlockState(pos.down()).getBlock() == IEBlocks.GLOWDUST_SAND.get()) || (world.getBlockState(pos).getBlock() == Blocks.LAVA && world.getBlockState(pos.down()).getBlock() != Blocks.LAVA)) {
if ((world.isAirBlock(pos) || world.getBlockState(pos.down()).getBlock() == IEBlocks.SHIMMER_SAND.get()) || (world.getBlockState(pos).getBlock() == Blocks.LAVA && world.getBlockState(pos.down()).getBlock() != Blocks.LAVA)) {
// Generate a random height, diameter and offset
int height = config.minHeight + random.nextInt(config.maxHeight - config.minHeight);
int diameter = config.minDiameter + random.nextInt(config.maxDiameter - config.minDiameter);
Expand Down
Loading