77import com .google .gson .JsonObject ;
88import com .mcmoddev .orespawn .api .IFeature ;
99import com .mcmoddev .orespawn .api .SpawnEntry ;
10- import com .mcmoddev .orespawn .impl .features .DefaultFeatureGenerator ;
1110
1211import net .minecraft .block .state .IBlockState ;
1312import net .minecraft .world .biome .Biome ;
@@ -18,55 +17,6 @@ public class SpawnEntryImpl implements SpawnEntry {
1817 private final List <Biome > biomes ;
1918 private final IFeature generator ;
2019 private final IBlockState blockRep ;
21- private final static String sz = "size" ;
22- private final static String var = "variation" ;
23- private final static String freq = "frequency" ;
24- private final static String mny = "minHeight" ;
25- private final static String mxy = "maxHeight" ;
26-
27- public SpawnEntryImpl (IBlockState state , int size , int variation , float frequency , int minHeight , int maxHeight , Biome [] biomes ) {
28- this .paramStore = new JsonObject ();
29- this .paramStore .addProperty (sz , size );
30- this .paramStore .addProperty (var , variation );
31- this .paramStore .addProperty (freq , frequency );
32- this .paramStore .addProperty (mny , minHeight );
33- this .paramStore .addProperty (mxy , maxHeight );
34- this .state = state ;
35- this .blockRep = null ;
36-
37- if ( biomes == null || biomes .length == 0 ) {
38- this .biomes = Collections .<Biome >emptyList ();;
39- } else {
40- this .biomes = new ArrayList <>();
41- for ( Biome b : biomes ) {
42- this .biomes .add (b );
43- }
44- }
45- this .generator = new DefaultFeatureGenerator ();
46- // OreSpawn.LOGGER.fatal("OreSpawnAPI: registering block "+state.getBlock()+" for generation");
47- }
48-
49- public SpawnEntryImpl (IBlockState state , int size , int variation , float frequency , int minHeight , int maxHeight ,
50- Biome [] biomes , IFeature featureGen , IBlockState blockRep ) {
51- this .paramStore = new JsonObject ();
52- this .paramStore .addProperty (sz , size );
53- this .paramStore .addProperty (var , variation );
54- this .paramStore .addProperty (freq , frequency );
55- this .paramStore .addProperty (mny , minHeight );
56- this .paramStore .addProperty (mxy , maxHeight );
57- this .generator = featureGen ;
58- this .blockRep = blockRep ;
59- this .state = state ;
60-
61- if ( biomes == null || biomes .length == 0 ) {
62- this .biomes = Collections .<Biome >emptyList ();
63- } else {
64- this .biomes = new ArrayList <>();
65- for ( Biome b : biomes ) {
66- this .biomes .add (b );
67- }
68- }
69- }
7020
7121 public SpawnEntryImpl (IBlockState state , JsonObject parameters , Biome [] biomes , IFeature featureGen ,
7222 IBlockState blockRep ) {
@@ -90,31 +40,6 @@ public IBlockState getState() {
9040 return this .state ;
9141 }
9242
93- @ Override
94- public int getSize () {
95- return this .paramStore .get (sz ).getAsInt ();
96- }
97-
98- @ Override
99- public int getVariation () {
100- return this .paramStore .get (var ).getAsInt ();
101- }
102-
103- @ Override
104- public float getFrequency () {
105- return this .paramStore .get (freq ).getAsFloat ();
106- }
107-
108- @ Override
109- public int getMinHeight () {
110- return this .paramStore .get (mny ).getAsInt ();
111- }
112-
113- @ Override
114- public int getMaxHeight () {
115- return this .paramStore .get (mxy ).getAsInt ();
116- }
117-
11843 @ Override
11944 public List <Biome > getBiomes () {
12045 return Collections .unmodifiableList (this .biomes );
0 commit comments