Skip to content

Commit af53421

Browse files
Add christmas tree sapling and bump version
1 parent efcd93e commit af53421

File tree

5 files changed

+66
-2
lines changed

5 files changed

+66
-2
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>parallelmc</groupId>
88
<artifactId>parallelutils</artifactId>
9-
<version>1.9.0</version>
9+
<version>1.9.1</version>
1010
<packaging>jar</packaging>
1111

1212
<name>Parallelutils</name>

src/main/java/parallelmc/parallelutils/Constants.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
public class Constants {
44

5-
public static final Version VERSION = new Version(1, 9, 0);
5+
public static final Version VERSION = new Version(1, 9, 1);
66
public static final String PLUGIN_NAME = "ParallelUtils";
77
public static final String DEFAULT_WORLD = "world";
88
}

src/main/java/parallelmc/parallelutils/modules/customtrees/TreeInitializer.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import com.eclipsekingdom.fractalforest.util.Scale;
99
import com.eclipsekingdom.fractalforest.util.X.FSapling;
1010
import com.eclipsekingdom.fractalforest.util.X.XMaterial;
11+
import parallelmc.parallelutils.modules.customtrees.genomes.ChristmasGenome;
1112
import parallelmc.parallelutils.modules.customtrees.habitats.MushroomHabitat;
1213
import parallelmc.parallelutils.modules.customtrees.habitats.NetherExtHabitat;
1314
import parallelmc.parallelutils.modules.customtrees.themes.*;
@@ -39,5 +40,8 @@ public void initialize() {
3940

4041
Species.addSpecies(new Species("RANDOM_TREE", Scale.MASSIVE, GenomeType.ELM.value(),
4142
FSapling.OAK_SAPLING, new RandomTheme(), new MushroomHabitat(), EffectType.FOREST.getEffects()));
43+
44+
Species.addSpecies(new Species("CHRISTMAS_TREE", Scale.BIG, new ChristmasGenome(),
45+
FSapling.SPRUCE_SAPLING, new ChristmasTheme(), HabitatType.FOREST.getHabitat(), EffectType.FOREST.getEffects()));
4246
}
4347
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
package parallelmc.parallelutils.modules.customtrees.genomes;
2+
3+
import com.eclipsekingdom.fractalforest.trees.gen.fractal.genome.Genome;
4+
import com.eclipsekingdom.fractalforest.trees.gen.fractal.genome.gene.*;
5+
import com.eclipsekingdom.fractalforest.util.math.functions.Exponential;
6+
import com.eclipsekingdom.fractalforest.util.math.range.Bounds;
7+
8+
public class ChristmasGenome extends Genome {
9+
public ChristmasGenome() {
10+
super(new ClumpGene(0.05D),
11+
new SplitGene(1, 2),
12+
new AngleGene(new Bounds(0.0D, 0.1D)),
13+
new DecayGene(new Bounds(0.2, 0.5)),
14+
new TrunkGene(new Bounds(1.0, 8.0), new Bounds(0.5, 0.9), new Bounds(-0.1, 0.1)),
15+
new LeafGene(1.0, 2.8),
16+
new RootGene(0, 1, new Exponential(1.0, 0.5), new Bounds(1.0, 1.0), new Bounds(0.0, 2.0)));
17+
}
18+
}
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
package parallelmc.parallelutils.modules.customtrees.themes;
2+
3+
import com.eclipsekingdom.fractalforest.util.X.FMaterial;
4+
import com.eclipsekingdom.fractalforest.util.theme.ITheme;
5+
import com.eclipsekingdom.fractalforest.util.theme.material.IMaterialFactory;
6+
import com.eclipsekingdom.fractalforest.util.theme.material.MaterialSingleton;
7+
import com.eclipsekingdom.fractalforest.util.theme.material.WeightedMaterialJumble;
8+
import org.bukkit.Material;
9+
10+
import java.util.Collections;
11+
import java.util.Set;
12+
13+
public class ChristmasTheme implements ITheme {
14+
@Override
15+
public IMaterialFactory getLeaf() {
16+
return new WeightedMaterialJumble().add(FMaterial.SPRUCE_LEAVES, 18)
17+
.add(FMaterial.RED_WOOL, 1)
18+
.add(FMaterial.YELLOW_WOOL, 1)
19+
.add(FMaterial.GREEN_WOOL, 1)
20+
.add(FMaterial.BLUE_WOOL, 1);
21+
}
22+
23+
@Override
24+
public IMaterialFactory getThickBranch() {
25+
return new MaterialSingleton(FMaterial.SPRUCE_WOOD);
26+
}
27+
28+
@Override
29+
public IMaterialFactory getThinBranch() {
30+
return new MaterialSingleton(FMaterial.SPRUCE_FENCE);
31+
}
32+
33+
@Override
34+
public IMaterialFactory getRoot() {
35+
return new MaterialSingleton(FMaterial.SPRUCE_WOOD);
36+
}
37+
38+
@Override
39+
public Set<Material> getSelfMaterials() {
40+
return Collections.EMPTY_SET;
41+
}
42+
}

0 commit comments

Comments
 (0)