This commit is contained in:
Adubbz 2019-12-26 17:42:37 +11:00
parent cf8c7233d4
commit b0d6aaa504
47 changed files with 168 additions and 262 deletions

1
.gitignore vendored
View file

@ -24,3 +24,4 @@ mappings/mcp/
mappings/build/
mappings/*.csv
mappings/.project
mappings/last_updated.json

View file

@ -1,14 +1,31 @@
import csv
import hashlib
import json
import os
import shutil
import sys
def sha256sum(filename):
h = hashlib.sha256()
b = bytearray(128*1024)
mv = memoryview(b)
with open(filename, 'rb', buffering=0) as f:
for n in iter(lambda : f.readinto(mv), 0):
h.update(mv[:n])
return h.hexdigest()
entries = {
'fields.csv': [],
'methods.csv': [],
'params.csv': []
}
hashes = {}
if os.path.isfile('last_updated.json'):
with open('last_updated.json', 'r') as f:
hashes = json.load(f)
for key in entries.keys():
mcp_file = 'mcp/{}'.format(key)
patch_file = 'custom/{}'.format(key)
@ -18,6 +35,15 @@ for key in entries.keys():
shutil.copyfile(mcp_file, key)
continue
# Check for changes in the patch file
hash = sha256sum(patch_file)
if os.path.isfile(key) and key in hashes.keys() and hashes[key] == hash:
print('No changes found in {}'.format(patch_file))
continue
else:
hashes[key] = hash
print('Patching {}...'.format(key))
header_row = []
@ -65,3 +91,7 @@ for key in entries.keys():
writer.writerow(row)
print('Created {}'.format(key))
# Save hashes
with open('last_updated.json', 'w') as f:
json.dump(hashes, f)

View file

@ -21,7 +21,7 @@ import net.minecraft.world.gen.feature.TreeFeatureConfig;
import javax.annotation.Nullable;
import java.util.Random;
public abstract class AgnosticBigTree extends BigTree
public abstract class BigTreeNoConfig extends BigTree
{
@Override
@Nullable

View file

@ -1,14 +1,11 @@
package biomesoplenty.common.block.trees;
import biomesoplenty.common.world.gen.feature.BOPBiomeFeatures;
import net.minecraft.block.trees.Tree;
import net.minecraft.world.biome.DefaultBiomeFeatures;
import net.minecraft.world.gen.feature.*;
import javax.annotation.Nullable;
import java.util.Random;
public class DeadTree extends AgnosticTree
public class DeadTree extends TreeNoConfig
{
@Override
protected Feature<?> getFeature(Random random)

View file

@ -1,14 +1,11 @@
package biomesoplenty.common.block.trees;
import biomesoplenty.common.world.gen.feature.BOPBiomeFeatures;
import net.minecraft.block.trees.BigTree;
import net.minecraft.world.biome.DefaultBiomeFeatures;
import net.minecraft.world.gen.feature.*;
import javax.annotation.Nullable;
import java.util.Random;
public class FirTree extends AgnosticBigTree
public class FirTree extends BigTreeNoConfig
{
@Override
protected Feature<?> getFeature(Random random)

View file

@ -1,14 +1,11 @@
package biomesoplenty.common.block.trees;
import biomesoplenty.common.world.gen.feature.BOPBiomeFeatures;
import net.minecraft.block.trees.Tree;
import net.minecraft.world.biome.DefaultBiomeFeatures;
import net.minecraft.world.gen.feature.*;
import javax.annotation.Nullable;
import java.util.Random;
public class FloweringOakTree extends AgnosticTree
public class FloweringOakTree extends TreeNoConfig
{
@Override
protected Feature<?> getFeature(Random random)

View file

@ -1,14 +1,11 @@
package biomesoplenty.common.block.trees;
import biomesoplenty.common.world.gen.feature.BOPBiomeFeatures;
import net.minecraft.block.trees.Tree;
import net.minecraft.world.biome.DefaultBiomeFeatures;
import net.minecraft.world.gen.feature.*;
import javax.annotation.Nullable;
import java.util.Random;
public class HellbarkTree extends AgnosticTree
public class HellbarkTree extends TreeNoConfig
{
@Override
protected Feature<?> getFeature(Random random)

View file

@ -1,14 +1,11 @@
package biomesoplenty.common.block.trees;
import biomesoplenty.common.world.gen.feature.BOPBiomeFeatures;
import net.minecraft.block.trees.Tree;
import net.minecraft.world.biome.DefaultBiomeFeatures;
import net.minecraft.world.gen.feature.*;
import javax.annotation.Nullable;
import java.util.Random;
public class JacarandaTree extends AgnosticTree
public class JacarandaTree extends TreeNoConfig
{
@Override
protected Feature<?> getFeature(Random random)

View file

@ -1,14 +1,11 @@
package biomesoplenty.common.block.trees;
import biomesoplenty.common.world.gen.feature.BOPBiomeFeatures;
import net.minecraft.block.trees.Tree;
import net.minecraft.world.biome.DefaultBiomeFeatures;
import net.minecraft.world.gen.feature.*;
import javax.annotation.Nullable;
import java.util.Random;
public class MagicTree extends AgnosticTree
public class MagicTree extends TreeNoConfig
{
@Override
protected Feature<?> getFeature(Random random)

View file

@ -1,14 +1,11 @@
package biomesoplenty.common.block.trees;
import biomesoplenty.common.world.gen.feature.BOPBiomeFeatures;
import net.minecraft.block.trees.Tree;
import net.minecraft.world.biome.DefaultBiomeFeatures;
import net.minecraft.world.gen.feature.*;
import javax.annotation.Nullable;
import java.util.Random;
public class MahoganyTree extends AgnosticTree
public class MahoganyTree extends TreeNoConfig
{
@Override
protected Feature<?> getFeature(Random random)

View file

@ -1,14 +1,11 @@
package biomesoplenty.common.block.trees;
import biomesoplenty.common.world.gen.feature.BOPBiomeFeatures;
import net.minecraft.block.trees.Tree;
import net.minecraft.world.biome.DefaultBiomeFeatures;
import net.minecraft.world.gen.feature.*;
import javax.annotation.Nullable;
import java.util.Random;
public class MapleTree extends AgnosticTree
public class MapleTree extends TreeNoConfig
{
@Override
protected Feature<?> getFeature(Random random)

View file

@ -1,14 +1,11 @@
package biomesoplenty.common.block.trees;
import biomesoplenty.common.world.gen.feature.BOPBiomeFeatures;
import net.minecraft.block.trees.Tree;
import net.minecraft.world.biome.DefaultBiomeFeatures;
import net.minecraft.world.gen.feature.*;
import javax.annotation.Nullable;
import java.util.Random;
public class OrangeAutumnTree extends AgnosticTree
public class OrangeAutumnTree extends TreeNoConfig
{
@Override
protected Feature<?> getFeature(Random random)

View file

@ -1,14 +1,11 @@
package biomesoplenty.common.block.trees;
import biomesoplenty.common.world.gen.feature.BOPBiomeFeatures;
import net.minecraft.block.trees.Tree;
import net.minecraft.world.biome.DefaultBiomeFeatures;
import net.minecraft.world.gen.feature.*;
import javax.annotation.Nullable;
import java.util.Random;
public class OriginTree extends AgnosticTree
public class OriginTree extends TreeNoConfig
{
@Override
protected Feature<?> getFeature(Random random)

View file

@ -1,14 +1,11 @@
package biomesoplenty.common.block.trees;
import biomesoplenty.common.world.gen.feature.BOPBiomeFeatures;
import net.minecraft.block.trees.Tree;
import net.minecraft.world.biome.DefaultBiomeFeatures;
import net.minecraft.world.gen.feature.*;
import javax.annotation.Nullable;
import java.util.Random;
public class PalmTree extends AgnosticTree
public class PalmTree extends TreeNoConfig
{
@Override
protected Feature<?> getFeature(Random random)

View file

@ -1,14 +1,11 @@
package biomesoplenty.common.block.trees;
import biomesoplenty.common.world.gen.feature.BOPBiomeFeatures;
import net.minecraft.block.trees.Tree;
import net.minecraft.world.biome.DefaultBiomeFeatures;
import net.minecraft.world.gen.feature.*;
import javax.annotation.Nullable;
import java.util.Random;
public class PinkCherryTree extends AgnosticTree
public class PinkCherryTree extends TreeNoConfig
{
@Override
protected Feature<?> getFeature(Random random)

View file

@ -1,14 +1,11 @@
package biomesoplenty.common.block.trees;
import biomesoplenty.common.world.gen.feature.BOPBiomeFeatures;
import net.minecraft.block.trees.BigTree;
import net.minecraft.world.biome.DefaultBiomeFeatures;
import net.minecraft.world.gen.feature.*;
import javax.annotation.Nullable;
import java.util.Random;
public class RedwoodTree extends AgnosticBigTree
public class RedwoodTree extends BigTreeNoConfig
{
@Override
protected Feature<?> getFeature(Random random)

View file

@ -18,7 +18,7 @@ import net.minecraft.world.gen.feature.*;
import javax.annotation.Nullable;
import java.util.Random;
public abstract class AgnosticTree extends Tree
public abstract class TreeNoConfig extends Tree
{
@Override
@Nullable

View file

@ -1,14 +1,11 @@
package biomesoplenty.common.block.trees;
import biomesoplenty.common.world.gen.feature.BOPBiomeFeatures;
import net.minecraft.block.trees.BigTree;
import net.minecraft.world.biome.DefaultBiomeFeatures;
import net.minecraft.world.gen.feature.*;
import javax.annotation.Nullable;
import java.util.Random;
public class UmbranTree extends AgnosticBigTree
public class UmbranTree extends BigTreeNoConfig
{
@Override
protected Feature<?> getFeature(Random random)

View file

@ -1,14 +1,11 @@
package biomesoplenty.common.block.trees;
import biomesoplenty.common.world.gen.feature.BOPBiomeFeatures;
import net.minecraft.block.trees.Tree;
import net.minecraft.world.biome.DefaultBiomeFeatures;
import net.minecraft.world.gen.feature.*;
import javax.annotation.Nullable;
import java.util.Random;
public class WhiteCherryTree extends AgnosticTree
public class WhiteCherryTree extends TreeNoConfig
{
@Override
protected Feature<?> getFeature(Random random)

View file

@ -1,14 +1,11 @@
package biomesoplenty.common.block.trees;
import biomesoplenty.common.world.gen.feature.BOPBiomeFeatures;
import net.minecraft.block.trees.Tree;
import net.minecraft.world.biome.DefaultBiomeFeatures;
import net.minecraft.world.gen.feature.*;
import javax.annotation.Nullable;
import java.util.Random;
public class WillowTree extends AgnosticTree
public class WillowTree extends TreeNoConfig
{
@Override
protected Feature<?> getFeature(Random random)

View file

@ -1,14 +1,11 @@
package biomesoplenty.common.block.trees;
import biomesoplenty.common.world.gen.feature.BOPBiomeFeatures;
import net.minecraft.block.trees.Tree;
import net.minecraft.world.biome.DefaultBiomeFeatures;
import net.minecraft.world.gen.feature.*;
import javax.annotation.Nullable;
import java.util.Random;
public class YellowAutumnTree extends AgnosticTree
public class YellowAutumnTree extends TreeNoConfig
{
@Override
protected Feature<?> getFeature(Random random)

View file

@ -129,26 +129,26 @@ public class BOPBiomeFeatures
public static final Feature<NoFeatureConfig> GLOWSTONE_SPIKES = new GlowstoneSpikesFeature(NoFeatureConfig::deserialize);
//Flowers
public static final FlowersFeature CHAPARRAL_FLOWERS = new ChaparralFlowersFeature(BlockClusterFeatureConfig::deserialize);
public static final FlowersFeature CHERRY_BLOSSOM_GROVE_FLOWERS = new CherryBlossomGroveFlowersFeature(BlockClusterFeatureConfig::deserialize);
public static final FlowersFeature CONIFEROUS_FOREST_FLOWERS = new ConiferousForestFlowersFeature(BlockClusterFeatureConfig::deserialize);
public static final FlowersFeature EXTENDED_FLOWERS = new ExtendedFlowersFeature(BlockClusterFeatureConfig::deserialize);
public static final FlowersFeature FLOWER_MEADOW_FLOWERS = new FlowerMeadowFlowersFeature(BlockClusterFeatureConfig::deserialize);
public static final FlowersFeature JUNGLE_FLOWERS = new JungleFlowersFeature(BlockClusterFeatureConfig::deserialize);
public static final FlowersFeature LAVENDER_FLOWERS = new LavenderFlowersFeature(BlockClusterFeatureConfig::deserialize);
public static final FlowersFeature LUSH_GRASSLAND_FLOWERS = new LushGrasslandFlowersFeature(BlockClusterFeatureConfig::deserialize);
public static final FlowersFeature LUSH_SWAMP_FLOWERS = new LushSwampFlowersFeature(BlockClusterFeatureConfig::deserialize);
public static final FlowersFeature MEADOW_FLOWERS = new MeadowFlowersFeature(BlockClusterFeatureConfig::deserialize);
public static final FlowersFeature MOOR_FLOWERS = new MoorFlowersFeature(BlockClusterFeatureConfig::deserialize);
public static final FlowersFeature MYSTIC_GROVE_FLOWERS = new MysticGroveFlowersFeature(BlockClusterFeatureConfig::deserialize);
public static final FlowersFeature OMINOUS_WOODS_FLOWERS = new OminousWoodsFlowersFeature(BlockClusterFeatureConfig::deserialize);
public static final FlowersFeature ORIGIN_FLOWERS = new OriginFlowersFeature(BlockClusterFeatureConfig::deserialize);
public static final FlowersFeature RAINFOREST_FLOWERS = new RainforestFlowersFeature(BlockClusterFeatureConfig::deserialize);
public static final FlowersFeature SHRUBLAND_FLOWERS = new ShrublandFlowersFeature(BlockClusterFeatureConfig::deserialize);
public static final FlowersFeature SNOWY_FLOWERS = new SnowyFlowersFeature(BlockClusterFeatureConfig::deserialize);
public static final FlowersFeature TROPICS_FLOWERS = new TropicsFlowersFeature(BlockClusterFeatureConfig::deserialize);
public static final FlowersFeature WASTELAND_FLOWERS = new WastelandFlowersFeature(BlockClusterFeatureConfig::deserialize);
public static final FlowersFeature WETLAND_FLOWERS = new WetlandFlowersFeature(BlockClusterFeatureConfig::deserialize);
public static final FlowersFeature CHAPARRAL_FLOWERS = new ChaparralFlowersFeature();
public static final FlowersFeature CHERRY_BLOSSOM_GROVE_FLOWERS = new CherryBlossomGroveFlowersFeature();
public static final FlowersFeature CONIFEROUS_FOREST_FLOWERS = new ConiferousForestFlowersFeature();
public static final FlowersFeature EXTENDED_FLOWERS = new ExtendedFlowersFeature();
public static final FlowersFeature FLOWER_MEADOW_FLOWERS = new FlowerMeadowFlowersFeature();
public static final FlowersFeature JUNGLE_FLOWERS = new JungleFlowersFeature();
public static final FlowersFeature LAVENDER_FLOWERS = new LavenderFlowersFeature();
public static final FlowersFeature LUSH_GRASSLAND_FLOWERS = new LushGrasslandFlowersFeature();
public static final FlowersFeature LUSH_SWAMP_FLOWERS = new LushSwampFlowersFeature();
public static final FlowersFeature MEADOW_FLOWERS = new MeadowFlowersFeature();
public static final FlowersFeature MOOR_FLOWERS = new MoorFlowersFeature();
public static final FlowersFeature MYSTIC_GROVE_FLOWERS = new MysticGroveFlowersFeature();
public static final FlowersFeature OMINOUS_WOODS_FLOWERS = new OminousWoodsFlowersFeature();
public static final FlowersFeature ORIGIN_FLOWERS = new OriginFlowersFeature();
public static final FlowersFeature RAINFOREST_FLOWERS = new RainforestFlowersFeature();
public static final FlowersFeature SHRUBLAND_FLOWERS = new ShrublandFlowersFeature();
public static final FlowersFeature SNOWY_FLOWERS = new SnowyFlowersFeature();
public static final FlowersFeature TROPICS_FLOWERS = new TropicsFlowersFeature();
public static final FlowersFeature WASTELAND_FLOWERS = new WastelandFlowersFeature();
public static final FlowersFeature WETLAND_FLOWERS = new WetlandFlowersFeature();
//Surfaces
public static final SurfaceBuilder<SurfaceBuilderConfig> BOG_SURFACE_BUILDER = new BogSurfaceBuilder(SurfaceBuilderConfig::deserialize);
@ -174,7 +174,7 @@ public class BOPBiomeFeatures
public static final SurfaceBuilderConfig DRIED_SAND_GRAVEL_SURFACE = new SurfaceBuilderConfig(BOPBlocks.dried_sand.getDefaultState(), BOPBlocks.dried_sand.getDefaultState(), BOPBlocks.dried_sand.getDefaultState());
//Vanilla Biomes Features
public static final FlowersFeature VIOLET_FEATURE = new VioletFeature(BlockClusterFeatureConfig::deserialize);
public static final FlowersFeature ORANGE_COSMOS_FEATURE = new OrangeCosmosFeature(BlockClusterFeatureConfig::deserialize);
public static final FlowersFeature WILDFLOWER_FEATURE = new WildflowerFeature(BlockClusterFeatureConfig::deserialize);
public static final FlowersFeature VIOLET_FEATURE = new VioletFeature();
public static final FlowersFeature ORANGE_COSMOS_FEATURE = new OrangeCosmosFeature();
public static final FlowersFeature WILDFLOWER_FEATURE = new WildflowerFeature();
}

View file

@ -23,17 +23,12 @@ import net.minecraft.world.gen.feature.NoFeatureConfig;
import java.util.Random;
import java.util.function.Function;
public class ChaparralFlowersFeature extends DefaultFlowersFeature
public class ChaparralFlowersFeature extends DefaultFlowersFeatureNoConfig
{
private static final Block[] FLOWERS = new Block[]{BOPBlocks.wildflower, Blocks.AZURE_BLUET, Blocks.DANDELION, Blocks.POPPY};
public ChaparralFlowersFeature(Function<Dynamic<?>, ? extends BlockClusterFeatureConfig> deserializer)
{
super(deserializer);
}
@Override
public BlockState getRandomFlower(Random p_202355_1_, BlockPos p_202355_2_, BlockClusterFeatureConfig config)
public BlockState getRandomFlower(Random p_202355_1_, BlockPos p_202355_2_, NoFeatureConfig config)
{
double d0 = MathHelper.clamp((1.0D + Biome.INFO_NOISE.noiseAt((double)p_202355_2_.getX() / 48.0D, (double)p_202355_2_.getZ() / 48.0D, false)) / 2.0D, 0.0D, 0.9999D);
Block block = FLOWERS[(int)(d0 * (double)FLOWERS.length)];

View file

@ -20,15 +20,10 @@ import net.minecraft.world.gen.feature.NoFeatureConfig;
import java.util.Random;
import java.util.function.Function;
public class CherryBlossomGroveFlowersFeature extends DefaultFlowersFeature
public class CherryBlossomGroveFlowersFeature extends DefaultFlowersFeatureNoConfig
{
public CherryBlossomGroveFlowersFeature(Function<Dynamic<?>, ? extends BlockClusterFeatureConfig> deserializer)
{
super(deserializer);
}
@Override
public BlockState getRandomFlower(Random p_202355_1_, BlockPos p_202355_2_, BlockClusterFeatureConfig config)
public BlockState getRandomFlower(Random p_202355_1_, BlockPos p_202355_2_, NoFeatureConfig config)
{
int j = p_202355_1_.nextInt(2);
switch(j)

View file

@ -19,15 +19,10 @@ import net.minecraft.world.gen.feature.NoFeatureConfig;
import java.util.Random;
import java.util.function.Function;
public class ConiferousForestFlowersFeature extends DefaultFlowersFeature
public class ConiferousForestFlowersFeature extends DefaultFlowersFeatureNoConfig
{
public ConiferousForestFlowersFeature(Function<Dynamic<?>, ? extends BlockClusterFeatureConfig> deserializer)
{
super(deserializer);
}
@Override
public BlockState getRandomFlower(Random p_202355_1_, BlockPos p_202355_2_, BlockClusterFeatureConfig config)
public BlockState getRandomFlower(Random p_202355_1_, BlockPos p_202355_2_, NoFeatureConfig config)
{
int j = p_202355_1_.nextInt(4);
switch(j)

View file

@ -0,0 +1,46 @@
/*******************************************************************************
* Copyright 2014-2019, the Biomes O' Plenty Team
*
* This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License.
*
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
******************************************************************************/
package biomesoplenty.common.world.gen.feature;
import com.mojang.datafixers.Dynamic;
import net.minecraft.block.BlockState;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IWorld;
import net.minecraft.world.gen.feature.BlockClusterFeatureConfig;
import net.minecraft.world.gen.feature.FlowersFeature;
import net.minecraft.world.gen.feature.IFeatureConfig;
import net.minecraft.world.gen.feature.NoFeatureConfig;
import java.util.Random;
import java.util.function.Function;
public abstract class DefaultFlowersFeatureNoConfig extends FlowersFeature<NoFeatureConfig>
{
public DefaultFlowersFeatureNoConfig()
{
super(NoFeatureConfig::deserialize);
}
@Override
public boolean isValid(IWorld world, BlockPos p_225559_2_, NoFeatureConfig config)
{
return true;
}
@Override
public int getCount(NoFeatureConfig config)
{
return 64;
}
@Override
public BlockPos getPos(Random random, BlockPos pos, NoFeatureConfig config)
{
return pos.add(random.nextInt(7) - random.nextInt(7), random.nextInt(3) - random.nextInt(3), random.nextInt(7) - random.nextInt(7));
}
}

View file

@ -19,15 +19,10 @@ import net.minecraft.world.gen.feature.NoFeatureConfig;
import java.util.Random;
import java.util.function.Function;
public class ExtendedFlowersFeature extends DefaultFlowersFeature
public class ExtendedFlowersFeature extends DefaultFlowersFeatureNoConfig
{
public ExtendedFlowersFeature(Function<Dynamic<?>, ? extends BlockClusterFeatureConfig> deserializer)
{
super(deserializer);
}
@Override
public BlockState getRandomFlower(Random p_202355_1_, BlockPos p_202355_2_, BlockClusterFeatureConfig config)
public BlockState getRandomFlower(Random p_202355_1_, BlockPos p_202355_2_, NoFeatureConfig config)
{
int j = p_202355_1_.nextInt(3);
switch(j)

View file

@ -22,17 +22,12 @@ import net.minecraft.world.gen.feature.NoFeatureConfig;
import java.util.Random;
import java.util.function.Function;
public class FlowerMeadowFlowersFeature extends DefaultFlowersFeature
public class FlowerMeadowFlowersFeature extends DefaultFlowersFeatureNoConfig
{
private static final Block[] FLOWERS = new Block[]{Blocks.ORANGE_TULIP, Blocks.WHITE_TULIP, Blocks.PINK_TULIP, Blocks.RED_TULIP};
public FlowerMeadowFlowersFeature(Function<Dynamic<?>, ? extends BlockClusterFeatureConfig> deserializer)
{
super(deserializer);
}
@Override
public BlockState getRandomFlower(Random p_202355_1_, BlockPos p_202355_2_, BlockClusterFeatureConfig config)
public BlockState getRandomFlower(Random p_202355_1_, BlockPos p_202355_2_, NoFeatureConfig config)
{
double d0 = MathHelper.clamp((1.0D + Biome.INFO_NOISE.noiseAt((double)p_202355_2_.getX() / 48.0D, (double)p_202355_2_.getZ() / 48.0D, false)) / 2.0D, 0.0D, 0.9999D);
Block block = FLOWERS[(int)(d0 * (double)FLOWERS.length)];

View file

@ -20,15 +20,10 @@ import net.minecraft.world.gen.feature.NoFeatureConfig;
import java.util.Random;
import java.util.function.Function;
public class JungleFlowersFeature extends DefaultFlowersFeature
public class JungleFlowersFeature extends DefaultFlowersFeatureNoConfig
{
public JungleFlowersFeature(Function<Dynamic<?>, ? extends BlockClusterFeatureConfig> deserializer)
{
super(deserializer);
}
@Override
public BlockState getRandomFlower(Random p_202355_1_, BlockPos p_202355_2_, BlockClusterFeatureConfig config)
public BlockState getRandomFlower(Random p_202355_1_, BlockPos p_202355_2_, NoFeatureConfig config)
{
int j = p_202355_1_.nextInt(3);
switch(j)

View file

@ -22,17 +22,12 @@ import net.minecraft.world.gen.feature.NoFeatureConfig;
import java.util.Random;
import java.util.function.Function;
public class LavenderFlowersFeature extends DefaultFlowersFeature
public class LavenderFlowersFeature extends DefaultFlowersFeatureNoConfig
{
private static final Block[] FLOWERS = new Block[]{BOPBlocks.lavender};
public LavenderFlowersFeature(Function<Dynamic<?>, ? extends BlockClusterFeatureConfig> deserializer)
{
super(deserializer);
}
@Override
public BlockState getRandomFlower(Random p_202355_1_, BlockPos p_202355_2_, BlockClusterFeatureConfig config)
public BlockState getRandomFlower(Random p_202355_1_, BlockPos p_202355_2_, NoFeatureConfig config)
{
double d0 = MathHelper.clamp((1.0D + Biome.INFO_NOISE.noiseAt((double)p_202355_2_.getX() / 48.0D, (double)p_202355_2_.getZ() / 48.0D, false)) / 2.0D, 0.0D, 0.9999D);
Block block = FLOWERS[(int)(d0 * (double)FLOWERS.length)];

View file

@ -20,15 +20,10 @@ import net.minecraft.world.gen.feature.NoFeatureConfig;
import java.util.Random;
import java.util.function.Function;
public class LushGrasslandFlowersFeature extends DefaultFlowersFeature
public class LushGrasslandFlowersFeature extends DefaultFlowersFeatureNoConfig
{
public LushGrasslandFlowersFeature(Function<Dynamic<?>, ? extends BlockClusterFeatureConfig> deserializer)
{
super(deserializer);
}
@Override
public BlockState getRandomFlower(Random p_202355_1_, BlockPos p_202355_2_, BlockClusterFeatureConfig config)
public BlockState getRandomFlower(Random p_202355_1_, BlockPos p_202355_2_, NoFeatureConfig config)
{
int j = p_202355_1_.nextInt(2);
switch(j)

View file

@ -22,17 +22,12 @@ import net.minecraft.world.gen.feature.NoFeatureConfig;
import java.util.Random;
import java.util.function.Function;
public class LushSwampFlowersFeature extends DefaultFlowersFeature
public class LushSwampFlowersFeature extends DefaultFlowersFeatureNoConfig
{
private static final Block[] FLOWERS = new Block[]{Blocks.BLUE_ORCHID, Blocks.AZURE_BLUET, Blocks.DANDELION, Blocks.POPPY};
public LushSwampFlowersFeature(Function<Dynamic<?>, ? extends BlockClusterFeatureConfig> deserializer)
{
super(deserializer);
}
@Override
public BlockState getRandomFlower(Random p_202355_1_, BlockPos p_202355_2_, BlockClusterFeatureConfig config)
public BlockState getRandomFlower(Random p_202355_1_, BlockPos p_202355_2_, NoFeatureConfig config)
{
double d0 = MathHelper.clamp((1.0D + Biome.INFO_NOISE.noiseAt((double)p_202355_2_.getX() / 48.0D, (double)p_202355_2_.getZ() / 48.0D, false)) / 2.0D, 0.0D, 0.9999D);
Block block = FLOWERS[(int)(d0 * (double)FLOWERS.length)];

View file

@ -22,17 +22,12 @@ import net.minecraft.world.gen.feature.NoFeatureConfig;
import java.util.Random;
import java.util.function.Function;
public class MeadowFlowersFeature extends DefaultFlowersFeature
public class MeadowFlowersFeature extends DefaultFlowersFeatureNoConfig
{
private static final Block[] FLOWERS = new Block[]{Blocks.LILY_OF_THE_VALLEY, Blocks.AZURE_BLUET, Blocks.DANDELION, Blocks.POPPY};
public MeadowFlowersFeature(Function<Dynamic<?>, ? extends BlockClusterFeatureConfig> deserializer)
{
super(deserializer);
}
@Override
public BlockState getRandomFlower(Random p_202355_1_, BlockPos p_202355_2_, BlockClusterFeatureConfig config)
public BlockState getRandomFlower(Random p_202355_1_, BlockPos p_202355_2_, NoFeatureConfig config)
{
double d0 = MathHelper.clamp((1.0D + Biome.INFO_NOISE.noiseAt((double)p_202355_2_.getX() / 48.0D, (double)p_202355_2_.getZ() / 48.0D, false)) / 2.0D, 0.0D, 0.9999D);
Block block = FLOWERS[(int)(d0 * (double)FLOWERS.length)];

View file

@ -20,15 +20,10 @@ import net.minecraft.world.gen.feature.NoFeatureConfig;
import java.util.Random;
import java.util.function.Function;
public class MoorFlowersFeature extends DefaultFlowersFeature
public class MoorFlowersFeature extends DefaultFlowersFeatureNoConfig
{
public MoorFlowersFeature(Function<Dynamic<?>, ? extends BlockClusterFeatureConfig> deserializer)
{
super(deserializer);
}
@Override
public BlockState getRandomFlower(Random p_202355_1_, BlockPos p_202355_2_, BlockClusterFeatureConfig config)
public BlockState getRandomFlower(Random p_202355_1_, BlockPos p_202355_2_, NoFeatureConfig config)
{
int j = p_202355_1_.nextInt(2);
switch(j)

View file

@ -23,17 +23,12 @@ import net.minecraft.world.gen.feature.NoFeatureConfig;
import java.util.Random;
import java.util.function.Function;
public class MysticGroveFlowersFeature extends DefaultFlowersFeature
public class MysticGroveFlowersFeature extends DefaultFlowersFeatureNoConfig
{
private static final Block[] FLOWERS = new Block[]{BOPBlocks.glowflower, BOPBlocks.pink_daffodil, Blocks.OXEYE_DAISY, Blocks.LILY_OF_THE_VALLEY, Blocks.ALLIUM};
public MysticGroveFlowersFeature(Function<Dynamic<?>, ? extends BlockClusterFeatureConfig> deserializer)
{
super(deserializer);
}
@Override
public BlockState getRandomFlower(Random p_202355_1_, BlockPos p_202355_2_, BlockClusterFeatureConfig config)
public BlockState getRandomFlower(Random p_202355_1_, BlockPos p_202355_2_, NoFeatureConfig config)
{
double d0 = MathHelper.clamp((1.0D + Biome.INFO_NOISE.noiseAt((double)p_202355_2_.getX() / 48.0D, (double)p_202355_2_.getZ() / 48.0D, false)) / 2.0D, 0.0D, 0.9999D);
Block block = FLOWERS[(int)(d0 * (double)FLOWERS.length)];

View file

@ -22,17 +22,12 @@ import net.minecraft.world.gen.feature.NoFeatureConfig;
import java.util.Random;
import java.util.function.Function;
public class OminousWoodsFlowersFeature extends DefaultFlowersFeature
public class OminousWoodsFlowersFeature extends DefaultFlowersFeatureNoConfig
{
private static final Block[] FLOWERS = new Block[]{Blocks.WITHER_ROSE};
public OminousWoodsFlowersFeature(Function<Dynamic<?>, ? extends BlockClusterFeatureConfig> deserializer)
{
super(deserializer);
}
@Override
public BlockState getRandomFlower(Random p_202355_1_, BlockPos p_202355_2_, BlockClusterFeatureConfig config)
public BlockState getRandomFlower(Random p_202355_1_, BlockPos p_202355_2_, NoFeatureConfig config)
{
double d0 = MathHelper.clamp((1.0D + Biome.INFO_NOISE.noiseAt((double)p_202355_2_.getX() / 48.0D, (double)p_202355_2_.getZ() / 48.0D, false)) / 2.0D, 0.0D, 0.9999D);
Block block = FLOWERS[(int)(d0 * (double)FLOWERS.length)];

View file

@ -22,17 +22,12 @@ import net.minecraft.world.gen.feature.NoFeatureConfig;
import java.util.Random;
import java.util.function.Function;
public class OrangeCosmosFeature extends DefaultFlowersFeature
public class OrangeCosmosFeature extends DefaultFlowersFeatureNoConfig
{
private static final Block[] FLOWERS = new Block[]{BOPBlocks.orange_cosmos};
public OrangeCosmosFeature(Function<Dynamic<?>, ? extends BlockClusterFeatureConfig> deserializer)
{
super(deserializer);
}
@Override
public BlockState getRandomFlower(Random p_202355_1_, BlockPos p_202355_2_, BlockClusterFeatureConfig config)
public BlockState getRandomFlower(Random p_202355_1_, BlockPos p_202355_2_, NoFeatureConfig config)
{
double d0 = MathHelper.clamp((1.0D + Biome.INFO_NOISE.noiseAt((double)p_202355_2_.getX() / 48.0D, (double)p_202355_2_.getZ() / 48.0D, false)) / 2.0D, 0.0D, 0.9999D);
Block block = FLOWERS[(int)(d0 * (double)FLOWERS.length)];

View file

@ -20,15 +20,10 @@ import net.minecraft.world.gen.feature.NoFeatureConfig;
import java.util.Random;
import java.util.function.Function;
public class OriginFlowersFeature extends DefaultFlowersFeature
public class OriginFlowersFeature extends DefaultFlowersFeatureNoConfig
{
public OriginFlowersFeature(Function<Dynamic<?>, ? extends BlockClusterFeatureConfig> deserializer)
{
super(deserializer);
}
@Override
public BlockState getRandomFlower(Random p_202355_1_, BlockPos p_202355_2_, BlockClusterFeatureConfig config)
public BlockState getRandomFlower(Random p_202355_1_, BlockPos p_202355_2_, NoFeatureConfig config)
{
return p_202355_1_.nextFloat() > 0.6666667F ? Blocks.DANDELION.getDefaultState() : BOPBlocks.rose.getDefaultState();
}

View file

@ -23,17 +23,12 @@ import net.minecraft.world.gen.feature.NoFeatureConfig;
import java.util.Random;
import java.util.function.Function;
public class RainforestFlowersFeature extends DefaultFlowersFeature
public class RainforestFlowersFeature extends DefaultFlowersFeatureNoConfig
{
private static final Block[] FLOWERS = new Block[]{BOPBlocks.pink_daffodil, Blocks.BLUE_ORCHID, Blocks.OXEYE_DAISY, Blocks.DANDELION, Blocks.POPPY};
public RainforestFlowersFeature(Function<Dynamic<?>, ? extends BlockClusterFeatureConfig> deserializer)
{
super(deserializer);
}
@Override
public BlockState getRandomFlower(Random p_202355_1_, BlockPos p_202355_2_, BlockClusterFeatureConfig config)
public BlockState getRandomFlower(Random p_202355_1_, BlockPos p_202355_2_, NoFeatureConfig config)
{
double d0 = MathHelper.clamp((1.0D + Biome.INFO_NOISE.noiseAt((double)p_202355_2_.getX() / 48.0D, (double)p_202355_2_.getZ() / 48.0D, false)) / 2.0D, 0.0D, 0.9999D);
Block block = FLOWERS[(int)(d0 * (double)FLOWERS.length)];

View file

@ -22,17 +22,12 @@ import net.minecraft.world.gen.feature.NoFeatureConfig;
import java.util.Random;
import java.util.function.Function;
public class ShrublandFlowersFeature extends DefaultFlowersFeature
public class ShrublandFlowersFeature extends DefaultFlowersFeatureNoConfig
{
private static final Block[] FLOWERS = new Block[]{Blocks.ALLIUM};
public ShrublandFlowersFeature(Function<Dynamic<?>, ? extends BlockClusterFeatureConfig> deserializer)
{
super(deserializer);
}
@Override
public BlockState getRandomFlower(Random p_202355_1_, BlockPos p_202355_2_, BlockClusterFeatureConfig config)
public BlockState getRandomFlower(Random p_202355_1_, BlockPos p_202355_2_, NoFeatureConfig config)
{
double d0 = MathHelper.clamp((1.0D + Biome.INFO_NOISE.noiseAt((double)p_202355_2_.getX() / 48.0D, (double)p_202355_2_.getZ() / 48.0D, false)) / 2.0D, 0.0D, 0.9999D);
Block block = FLOWERS[(int)(d0 * (double)FLOWERS.length)];

View file

@ -20,15 +20,10 @@ import net.minecraft.world.gen.feature.NoFeatureConfig;
import java.util.Random;
import java.util.function.Function;
public class SnowyFlowersFeature extends DefaultFlowersFeature
public class SnowyFlowersFeature extends DefaultFlowersFeatureNoConfig
{
public SnowyFlowersFeature(Function<Dynamic<?>, ? extends BlockClusterFeatureConfig> deserializer)
{
super(deserializer);
}
@Override
public BlockState getRandomFlower(Random p_202355_1_, BlockPos p_202355_2_, BlockClusterFeatureConfig config)
public BlockState getRandomFlower(Random p_202355_1_, BlockPos p_202355_2_, NoFeatureConfig config)
{
int j = p_202355_1_.nextInt(3);
switch(j)

View file

@ -23,17 +23,12 @@ import net.minecraft.world.gen.feature.NoFeatureConfig;
import java.util.Random;
import java.util.function.Function;
public class TropicsFlowersFeature extends DefaultFlowersFeature
public class TropicsFlowersFeature extends DefaultFlowersFeatureNoConfig
{
private static final Block[] FLOWERS = new Block[]{BOPBlocks.pink_hibiscus, Blocks.DANDELION, Blocks.POPPY};
public TropicsFlowersFeature(Function<Dynamic<?>, ? extends BlockClusterFeatureConfig> deserializer)
{
super(deserializer);
}
@Override
public BlockState getRandomFlower(Random p_202355_1_, BlockPos p_202355_2_, BlockClusterFeatureConfig config)
public BlockState getRandomFlower(Random p_202355_1_, BlockPos p_202355_2_, NoFeatureConfig config)
{
double d0 = MathHelper.clamp((1.0D + Biome.INFO_NOISE.noiseAt((double)p_202355_2_.getX() / 48.0D, (double)p_202355_2_.getZ() / 48.0D, false)) / 2.0D, 0.0D, 0.9999D);
Block block = FLOWERS[(int)(d0 * (double)FLOWERS.length)];

View file

@ -22,17 +22,12 @@ import net.minecraft.world.gen.feature.NoFeatureConfig;
import java.util.Random;
import java.util.function.Function;
public class VioletFeature extends DefaultFlowersFeature
public class VioletFeature extends DefaultFlowersFeatureNoConfig
{
private static final Block[] FLOWERS = new Block[]{BOPBlocks.violet};
public VioletFeature(Function<Dynamic<?>, ? extends BlockClusterFeatureConfig> deserializer)
{
super(deserializer);
}
@Override
public BlockState getRandomFlower(Random p_202355_1_, BlockPos p_202355_2_, BlockClusterFeatureConfig config)
public BlockState getRandomFlower(Random p_202355_1_, BlockPos p_202355_2_, NoFeatureConfig config)
{
double d0 = MathHelper.clamp((1.0D + Biome.INFO_NOISE.noiseAt((double)p_202355_2_.getX() / 48.0D, (double)p_202355_2_.getZ() / 48.0D, false)) / 2.0D, 0.0D, 0.9999D);
Block block = FLOWERS[(int)(d0 * (double)FLOWERS.length)];

View file

@ -22,17 +22,12 @@ import net.minecraft.world.gen.feature.NoFeatureConfig;
import java.util.Random;
import java.util.function.Function;
public class WastelandFlowersFeature extends DefaultFlowersFeature
public class WastelandFlowersFeature extends DefaultFlowersFeatureNoConfig
{
private static final Block[] FLOWERS = new Block[]{BOPBlocks.wilted_lily};
public WastelandFlowersFeature(Function<Dynamic<?>, ? extends BlockClusterFeatureConfig> deserializer)
{
super(deserializer);
}
@Override
public BlockState getRandomFlower(Random p_202355_1_, BlockPos p_202355_2_, BlockClusterFeatureConfig config)
public BlockState getRandomFlower(Random p_202355_1_, BlockPos p_202355_2_, NoFeatureConfig config)
{
double d0 = MathHelper.clamp((1.0D + Biome.INFO_NOISE.noiseAt((double)p_202355_2_.getX() / 48.0D, (double)p_202355_2_.getZ() / 48.0D, false)) / 2.0D, 0.0D, 0.9999D);
Block block = FLOWERS[(int)(d0 * (double)FLOWERS.length)];

View file

@ -22,17 +22,12 @@ import net.minecraft.world.gen.feature.NoFeatureConfig;
import java.util.Random;
import java.util.function.Function;
public class WetlandFlowersFeature extends DefaultFlowersFeature
public class WetlandFlowersFeature extends DefaultFlowersFeatureNoConfig
{
private static final Block[] FLOWERS = new Block[]{Blocks.BLUE_ORCHID, Blocks.DANDELION, Blocks.POPPY};
public WetlandFlowersFeature(Function<Dynamic<?>, ? extends BlockClusterFeatureConfig> deserializer)
{
super(deserializer);
}
@Override
public BlockState getRandomFlower(Random p_202355_1_, BlockPos p_202355_2_, BlockClusterFeatureConfig config)
public BlockState getRandomFlower(Random p_202355_1_, BlockPos p_202355_2_, NoFeatureConfig config)
{
double d0 = MathHelper.clamp((1.0D + Biome.INFO_NOISE.noiseAt((double)p_202355_2_.getX() / 48.0D, (double)p_202355_2_.getZ() / 48.0D, false)) / 2.0D, 0.0D, 0.9999D);
Block block = FLOWERS[(int)(d0 * (double)FLOWERS.length)];

View file

@ -22,17 +22,12 @@ import net.minecraft.world.gen.feature.NoFeatureConfig;
import java.util.Random;
import java.util.function.Function;
public class WildflowerFeature extends DefaultFlowersFeature
public class WildflowerFeature extends DefaultFlowersFeatureNoConfig
{
private static final Block[] FLOWERS = new Block[]{BOPBlocks.wildflower};
public WildflowerFeature(Function<Dynamic<?>, ? extends BlockClusterFeatureConfig> deserializer)
{
super(deserializer);
}
@Override
public BlockState getRandomFlower(Random p_202355_1_, BlockPos p_202355_2_, BlockClusterFeatureConfig config)
public BlockState getRandomFlower(Random p_202355_1_, BlockPos p_202355_2_, NoFeatureConfig config)
{
double d0 = MathHelper.clamp((1.0D + Biome.INFO_NOISE.noiseAt((double)p_202355_2_.getX() / 48.0D, (double)p_202355_2_.getZ() / 48.0D, false)) / 2.0D, 0.0D, 0.9999D);
Block block = FLOWERS[(int)(d0 * (double)FLOWERS.length)];

View file

@ -22,17 +22,12 @@ import net.minecraft.world.gen.feature.NoFeatureConfig;
import java.util.Random;
import java.util.function.Function;
public class XericShrublandFlowersFeature extends DefaultFlowersFeature
public class XericShrublandFlowersFeature extends DefaultFlowersFeatureNoConfig
{
private static final Block[] FLOWERS = new Block[]{BOPBlocks.wildflower};
public XericShrublandFlowersFeature(Function<Dynamic<?>, ? extends BlockClusterFeatureConfig> deserializer)
{
super(deserializer);
}
@Override
public BlockState getRandomFlower(Random p_202355_1_, BlockPos p_202355_2_, BlockClusterFeatureConfig config)
public BlockState getRandomFlower(Random p_202355_1_, BlockPos p_202355_2_, NoFeatureConfig config)
{
double d0 = MathHelper.clamp((1.0D + Biome.INFO_NOISE.noiseAt((double)p_202355_2_.getX() / 48.0D, (double)p_202355_2_.getZ() / 48.0D, false)) / 2.0D, 0.0D, 0.9999D);
Block block = FLOWERS[(int)(d0 * (double)FLOWERS.length)];