- add default biome structures to biome variants

- fix more trees that had persistent leaves
This commit is contained in:
dags- 2020-04-02 23:14:50 +01:00
parent 5121a235f0
commit a79456aef6
32 changed files with 161 additions and 41 deletions

View File

@ -33,27 +33,30 @@ import net.minecraft.world.IWorldReader;
import net.minecraft.world.biome.Biome;
import net.minecraft.world.biome.Biomes;
import net.minecraft.world.biome.DefaultBiomeFeatures;
import net.minecraft.world.gen.feature.Feature;
import net.minecraft.world.gen.feature.IFeatureConfig;
import net.minecraft.world.gen.feature.structure.MineshaftConfig;
import net.minecraft.world.gen.feature.structure.MineshaftStructure;
import net.minecraft.world.gen.feature.structure.VillageConfig;
import net.minecraft.world.gen.surfacebuilders.SurfaceBuilder;
public class ColdSteppe extends BiomeVariant {
public ColdSteppe() {
super((new Biome.Builder()).surfaceBuilder(SurfaceBuilder.GIANT_TREE_TAIGA, SurfaceBuilder.GRASS_DIRT_GRAVEL_CONFIG).precipitation(RainType.SNOW).category(Biome.Category.TAIGA).depth(0.2F).scale(0.25F).temperature(0.2F).downfall(0.1F).waterColor(4159204).waterFogColor(329011).parent((String) null));
this.addStructure(Feature.VILLAGE.withConfiguration(new VillageConfig("village/taiga/town_centers", 6)));
this.addStructure(Feature.PILLAGER_OUTPOST.withConfiguration(IFeatureConfig.NO_FEATURE_CONFIG));
this.addStructure(Feature.MINESHAFT.withConfiguration(new MineshaftConfig(0.004D, MineshaftStructure.Type.NORMAL)));
this.addStructure(Feature.STRONGHOLD.withConfiguration(IFeatureConfig.NO_FEATURE_CONFIG));
DefaultBiomeFeatures.addCarvers(this);
DefaultBiomeFeatures.addStructures(this);
// DefaultBiomeFeatures.addLakes(this);
DefaultBiomeFeatures.addMonsterRooms(this);
DefaultBiomeFeatures.addTaigaLargeFerns(this);
DefaultBiomeFeatures.addStoneVariants(this);
DefaultBiomeFeatures.addOres(this);
DefaultBiomeFeatures.addSedimentDisks(this);
// DefaultBiomeFeatures.addTaigaConifers(this);
// DefaultBiomeFeatures.addDefaultFlowers(this);
DefaultBiomeFeatures.addGrass(this);
DefaultBiomeFeatures.addVeryDenseGrass(this);
// DefaultBiomeFeatures.addMushrooms(this);
// DefaultBiomeFeatures.addReedsAndPumpkins(this);
// DefaultBiomeFeatures.addSprings(this);
DefaultBiomeFeatures.addBerryBushes(this);
DefaultBiomeFeatures.addFreezeTopLayer(this);
this.addSpawn(EntityClassification.CREATURE, new Biome.SpawnListEntry(EntityType.SHEEP, 12, 4, 4));

View File

@ -33,6 +33,9 @@ import net.minecraft.world.biome.Biomes;
import net.minecraft.world.biome.DefaultBiomeFeatures;
import net.minecraft.world.gen.GenerationStage;
import net.minecraft.world.gen.feature.Feature;
import net.minecraft.world.gen.feature.IFeatureConfig;
import net.minecraft.world.gen.feature.structure.MineshaftConfig;
import net.minecraft.world.gen.feature.structure.MineshaftStructure;
import net.minecraft.world.gen.placement.FrequencyConfig;
import net.minecraft.world.gen.placement.HeightWithChanceConfig;
import net.minecraft.world.gen.placement.Placement;
@ -41,7 +44,8 @@ import net.minecraft.world.gen.surfacebuilders.SurfaceBuilder;
public class Marshland extends BiomeVariant {
public Marshland() {
super((new Builder()).surfaceBuilder(SurfaceBuilder.SWAMP, SurfaceBuilder.GRASS_DIRT_GRAVEL_CONFIG).precipitation(RainType.RAIN).category(Category.SWAMP).depth(0.2F).scale(0.2F).temperature(0.8F).downfall(0.4F).waterColor(6388580).waterFogColor(2302743).parent((String) null));
this.setRegistryName("terraforged", "marshland");
this.addStructure(Feature.SWAMP_HUT.withConfiguration(IFeatureConfig.NO_FEATURE_CONFIG));
this.addStructure(Feature.MINESHAFT.withConfiguration(new MineshaftConfig(0.004D, MineshaftStructure.Type.NORMAL)));
DefaultBiomeFeatures.addCarvers(this);
DefaultBiomeFeatures.addStructures(this);
DefaultBiomeFeatures.addMonsterRooms(this);
@ -74,6 +78,7 @@ public class Marshland extends BiomeVariant {
this.addSpawn(EntityClassification.MONSTER, new SpawnListEntry(EntityType.SLIME, 100, 4, 4));
this.addSpawn(EntityClassification.MONSTER, new SpawnListEntry(EntityType.ENDERMAN, 10, 1, 4));
this.addSpawn(EntityClassification.MONSTER, new SpawnListEntry(EntityType.WITCH, 5, 1, 1));
this.setRegistryName("terraforged", "marshland");
}
public int getGrassColor(double p_225528_1_, double p_225528_3_) {

View File

@ -35,6 +35,11 @@ import net.minecraft.world.biome.Biomes;
import net.minecraft.world.biome.DefaultBiomeFeatures;
import net.minecraft.world.chunk.IChunk;
import net.minecraft.world.gen.Heightmap;
import net.minecraft.world.gen.feature.Feature;
import net.minecraft.world.gen.feature.IFeatureConfig;
import net.minecraft.world.gen.feature.structure.MineshaftConfig;
import net.minecraft.world.gen.feature.structure.MineshaftStructure;
import net.minecraft.world.gen.feature.structure.VillageConfig;
import net.minecraft.world.gen.surfacebuilders.DefaultSurfaceBuilder;
import net.minecraft.world.gen.surfacebuilders.SurfaceBuilder;
import net.minecraft.world.gen.surfacebuilders.SurfaceBuilderConfig;
@ -45,26 +50,23 @@ public class SavannaScrub extends BiomeVariant {
public SavannaScrub() {
super((new Biome.Builder()).surfaceBuilder(new Builder(), SurfaceBuilder.GRASS_DIRT_GRAVEL_CONFIG).precipitation(Biome.RainType.NONE).category(Biome.Category.SAVANNA).depth(0.125F).scale(0.05F).temperature(1.2F).downfall(0.0F).waterColor(4159204).waterFogColor(329011).parent((String) null));
this.setRegistryName("terraforged", "savanna_scrub");
this.addStructure(Feature.VILLAGE.withConfiguration(new VillageConfig("village/savanna/town_centers", 6)));
this.addStructure(Feature.PILLAGER_OUTPOST.withConfiguration(IFeatureConfig.NO_FEATURE_CONFIG));
this.addStructure(Feature.MINESHAFT.withConfiguration(new MineshaftConfig(0.004D, MineshaftStructure.Type.NORMAL)));
this.addStructure(Feature.STRONGHOLD.withConfiguration(IFeatureConfig.NO_FEATURE_CONFIG));
DefaultBiomeFeatures.addCarvers(this);
DefaultBiomeFeatures.addStructures(this);
// DefaultBiomeFeatures.addLakes(this);
DefaultBiomeFeatures.addMonsterRooms(this);
DefaultBiomeFeatures.addTallGrass(this);
DefaultBiomeFeatures.addStoneVariants(this);
DefaultBiomeFeatures.addOres(this);
DefaultBiomeFeatures.addSedimentDisks(this);
// DefaultBiomeFeatures.addSavannaTrees(this);
DefaultBiomeFeatures.addExtraDefaultFlowers(this);
// func_222339_L - add grasses - add this a few times since there are no trees
DefaultBiomeFeatures.addGrass(this);
DefaultBiomeFeatures.addVeryDenseGrass(this);
DefaultBiomeFeatures.addMushrooms(this);
DefaultBiomeFeatures.addReedsAndPumpkins(this);
// DefaultBiomeFeatures.addSprings(this);
// DefaultBiomeFeatures.addFreezeTopLayer(this);
this.addSpawn(EntityClassification.CREATURE, new Biome.SpawnListEntry(EntityType.SHEEP, 12, 4, 4));
this.addSpawn(EntityClassification.CREATURE, new Biome.SpawnListEntry(EntityType.PIG, 10, 4, 4));
this.addSpawn(EntityClassification.CREATURE, new Biome.SpawnListEntry(EntityType.CHICKEN, 10, 4, 4));
@ -80,6 +82,7 @@ public class SavannaScrub extends BiomeVariant {
this.addSpawn(EntityClassification.MONSTER, new Biome.SpawnListEntry(EntityType.SLIME, 100, 4, 4));
this.addSpawn(EntityClassification.MONSTER, new Biome.SpawnListEntry(EntityType.ENDERMAN, 10, 1, 4));
this.addSpawn(EntityClassification.MONSTER, new Biome.SpawnListEntry(EntityType.WITCH, 5, 1, 1));
this.setRegistryName("terraforged", "savanna_scrub");
}
@Override

View File

@ -35,6 +35,10 @@ import net.minecraft.world.biome.Biomes;
import net.minecraft.world.biome.DefaultBiomeFeatures;
import net.minecraft.world.chunk.IChunk;
import net.minecraft.world.gen.Heightmap;
import net.minecraft.world.gen.feature.Feature;
import net.minecraft.world.gen.feature.IFeatureConfig;
import net.minecraft.world.gen.feature.structure.MineshaftConfig;
import net.minecraft.world.gen.feature.structure.MineshaftStructure;
import net.minecraft.world.gen.surfacebuilders.DefaultSurfaceBuilder;
import net.minecraft.world.gen.surfacebuilders.SurfaceBuilder;
import net.minecraft.world.gen.surfacebuilders.SurfaceBuilderConfig;
@ -44,24 +48,19 @@ import java.util.Random;
public class ShatteredSavannaScrub extends BiomeVariant {
public ShatteredSavannaScrub() {
super((new Biome.Builder()).surfaceBuilder(new Builder(), SurfaceBuilder.GRASS_DIRT_GRAVEL_CONFIG).precipitation(Biome.RainType.NONE).category(Biome.Category.SAVANNA).depth(0.3625F).scale(1.225F).temperature(1.1F).downfall(0.0F).waterColor(4159204).waterFogColor(329011).parent("terraforged:savanna_scrub"));
this.setRegistryName("terraforged", "shattered_savanna_scrub");
this.addStructure(Feature.MINESHAFT.withConfiguration(new MineshaftConfig(0.004D, MineshaftStructure.Type.NORMAL)));
this.addStructure(Feature.STRONGHOLD.withConfiguration(IFeatureConfig.NO_FEATURE_CONFIG));
DefaultBiomeFeatures.addCarvers(this);
DefaultBiomeFeatures.addStructures(this);
// DefaultBiomeFeatures.addLakes(this);
DefaultBiomeFeatures.addMonsterRooms(this);
DefaultBiomeFeatures.addStoneVariants(this);
DefaultBiomeFeatures.addOres(this);
DefaultBiomeFeatures.addSedimentDisks(this);
// DefaultBiomeFeatures.addShatteredSavannaTrees(this);
DefaultBiomeFeatures.addDefaultFlowers(this);
// func_222314_K - addGrasses - add this a few times since there are no trees
DefaultBiomeFeatures.addGrass(this);
DefaultBiomeFeatures.addVeryDenseGrass(this);
DefaultBiomeFeatures.addMushrooms(this);
DefaultBiomeFeatures.addReedsAndPumpkins(this);
// DefaultBiomeFeatures.addSprings(this);
DefaultBiomeFeatures.addFreezeTopLayer(this);
this.addSpawn(EntityClassification.CREATURE, new Biome.SpawnListEntry(EntityType.SHEEP, 12, 4, 4));
this.addSpawn(EntityClassification.CREATURE, new Biome.SpawnListEntry(EntityType.PIG, 10, 4, 4));
@ -78,6 +77,7 @@ public class ShatteredSavannaScrub extends BiomeVariant {
this.addSpawn(EntityClassification.MONSTER, new Biome.SpawnListEntry(EntityType.SLIME, 100, 4, 4));
this.addSpawn(EntityClassification.MONSTER, new Biome.SpawnListEntry(EntityType.ENDERMAN, 10, 1, 4));
this.addSpawn(EntityClassification.MONSTER, new Biome.SpawnListEntry(EntityType.WITCH, 5, 1, 1));
this.setRegistryName("terraforged", "shattered_savanna_scrub");
}
@Override

View File

@ -31,27 +31,30 @@ import net.minecraft.entity.EntityType;
import net.minecraft.world.biome.Biome;
import net.minecraft.world.biome.Biomes;
import net.minecraft.world.biome.DefaultBiomeFeatures;
import net.minecraft.world.gen.feature.Feature;
import net.minecraft.world.gen.feature.IFeatureConfig;
import net.minecraft.world.gen.feature.structure.MineshaftConfig;
import net.minecraft.world.gen.feature.structure.MineshaftStructure;
import net.minecraft.world.gen.surfacebuilders.SurfaceBuilder;
public class SnowyTaigaScrub extends BiomeVariant {
public SnowyTaigaScrub() {
super((new Builder()).surfaceBuilder(SurfaceBuilder.DEFAULT, SurfaceBuilder.GRASS_DIRT_GRAVEL_CONFIG).precipitation(RainType.SNOW).category(Category.TAIGA).depth(0.2F).scale(0.2F).temperature(-0.5F).downfall(0.4F).waterColor(4020182).waterFogColor(329011).parent((String) null));
this.setRegistryName("terraforged", "snowy_taiga_scrub");
this.addStructure(Feature.IGLOO.withConfiguration(IFeatureConfig.NO_FEATURE_CONFIG));
this.addStructure(Feature.MINESHAFT.withConfiguration(new MineshaftConfig(0.004D, MineshaftStructure.Type.NORMAL)));
this.addStructure(Feature.STRONGHOLD.withConfiguration(IFeatureConfig.NO_FEATURE_CONFIG));
DefaultBiomeFeatures.addCarvers(this);
DefaultBiomeFeatures.addStructures(this);
// DefaultBiomeFeatures.addLakes(this);
DefaultBiomeFeatures.addMonsterRooms(this);
DefaultBiomeFeatures.addTaigaLargeFerns(this);
DefaultBiomeFeatures.addStoneVariants(this);
DefaultBiomeFeatures.addOres(this);
DefaultBiomeFeatures.addSedimentDisks(this);
// DefaultBiomeFeatures.addTaigaConifers(this);
DefaultBiomeFeatures.addDefaultFlowers(this);
DefaultBiomeFeatures.addTaigaGrassAndMushrooms(this);
DefaultBiomeFeatures.addGrass(this);
DefaultBiomeFeatures.addMushrooms(this);
DefaultBiomeFeatures.addReedsAndPumpkins(this);
// DefaultBiomeFeatures.addSprings(this);
DefaultBiomeFeatures.addSparseBerryBushes(this);
DefaultBiomeFeatures.addFreezeTopLayer(this);
this.addSpawn(EntityClassification.CREATURE, new SpawnListEntry(EntityType.SHEEP, 12, 4, 4));
@ -70,6 +73,7 @@ public class SnowyTaigaScrub extends BiomeVariant {
this.addSpawn(EntityClassification.MONSTER, new SpawnListEntry(EntityType.SLIME, 100, 4, 4));
this.addSpawn(EntityClassification.MONSTER, new SpawnListEntry(EntityType.ENDERMAN, 10, 1, 4));
this.addSpawn(EntityClassification.MONSTER, new SpawnListEntry(EntityType.WITCH, 5, 1, 1));
this.setRegistryName("terraforged", "snowy_taiga_scrub");
}
@Override

View File

@ -33,29 +33,29 @@ import net.minecraft.world.IWorldReader;
import net.minecraft.world.biome.Biome;
import net.minecraft.world.biome.Biomes;
import net.minecraft.world.biome.DefaultBiomeFeatures;
import net.minecraft.world.gen.feature.Feature;
import net.minecraft.world.gen.feature.IFeatureConfig;
import net.minecraft.world.gen.feature.structure.MineshaftConfig;
import net.minecraft.world.gen.feature.structure.MineshaftStructure;
import net.minecraft.world.gen.feature.structure.VillageConfig;
import net.minecraft.world.gen.surfacebuilders.SurfaceBuilder;
public class Steppe extends BiomeVariant {
protected Steppe() {
super((new Biome.Builder()).surfaceBuilder(SurfaceBuilder.GIANT_TREE_TAIGA, SurfaceBuilder.GRASS_DIRT_GRAVEL_CONFIG).precipitation(RainType.SNOW).category(Category.SAVANNA).depth(0.2F).scale(0.2F).temperature(0.7F).downfall(0.1F).waterColor(4159204).waterFogColor(329011).parent((String) null));
this.addStructure(Feature.VILLAGE.withConfiguration(new VillageConfig("village/savanna/town_centers", 6)));
this.addStructure(Feature.PILLAGER_OUTPOST.withConfiguration(IFeatureConfig.NO_FEATURE_CONFIG));
this.addStructure(Feature.MINESHAFT.withConfiguration(new MineshaftConfig(0.004D, MineshaftStructure.Type.NORMAL)));
this.addStructure(Feature.STRONGHOLD.withConfiguration(IFeatureConfig.NO_FEATURE_CONFIG));
DefaultBiomeFeatures.addCarvers(this);
DefaultBiomeFeatures.addStructures(this);
// DefaultBiomeFeatures.addLakes(this);
DefaultBiomeFeatures.addMonsterRooms(this);
// DefaultBiomeFeatures.addTaigaRocks(this);
// DefaultBiomeFeatures.addTaigaLargeFerns(this);
DefaultBiomeFeatures.addStoneVariants(this);
DefaultBiomeFeatures.addOres(this);
DefaultBiomeFeatures.addSedimentDisks(this);
// extra grasses as no trees/ferns
DefaultBiomeFeatures.addGrass(this);
DefaultBiomeFeatures.addVeryDenseGrass(this);
// DefaultBiomeFeatures.func_222285_H(this);
// DefaultBiomeFeatures.addDefaultFlowers(this);
// DefaultBiomeFeatures.addMushrooms(this);
// DefaultBiomeFeatures.addReedsAndPumpkins(this);
// DefaultBiomeFeatures.addSprings(this);
DefaultBiomeFeatures.addFreezeTopLayer(this);
this.addSpawn(EntityClassification.CREATURE, new Biome.SpawnListEntry(EntityType.SHEEP, 12, 4, 4));
this.addSpawn(EntityClassification.CREATURE, new Biome.SpawnListEntry(EntityType.PIG, 10, 4, 4));

View File

@ -31,31 +31,33 @@ import net.minecraft.entity.EntityType;
import net.minecraft.world.biome.Biome;
import net.minecraft.world.biome.Biomes;
import net.minecraft.world.biome.DefaultBiomeFeatures;
import net.minecraft.world.gen.feature.Feature;
import net.minecraft.world.gen.feature.IFeatureConfig;
import net.minecraft.world.gen.feature.structure.MineshaftConfig;
import net.minecraft.world.gen.feature.structure.MineshaftStructure;
import net.minecraft.world.gen.feature.structure.VillageConfig;
import net.minecraft.world.gen.surfacebuilders.SurfaceBuilder;
public class TaigaScrub extends BiomeVariant {
public TaigaScrub() {
super((new Builder()).surfaceBuilder(SurfaceBuilder.DEFAULT, SurfaceBuilder.GRASS_DIRT_GRAVEL_CONFIG).precipitation(RainType.RAIN).category(Category.TAIGA).depth(0.2F).scale(0.2F).temperature(0.25F).downfall(0.8F).waterColor(4159204).waterFogColor(329011).parent((String) null));
this.setRegistryName("terraforged", "taiga_scrub");
this.addStructure(Feature.VILLAGE.withConfiguration(new VillageConfig("village/taiga/town_centers", 6)));
this.addStructure(Feature.PILLAGER_OUTPOST.withConfiguration(IFeatureConfig.NO_FEATURE_CONFIG));
this.addStructure(Feature.MINESHAFT.withConfiguration(new MineshaftConfig(0.004D, MineshaftStructure.Type.NORMAL)));
this.addStructure(Feature.STRONGHOLD.withConfiguration(IFeatureConfig.NO_FEATURE_CONFIG));
DefaultBiomeFeatures.addCarvers(this);
DefaultBiomeFeatures.addStructures(this);
// DefaultBiomeFeatures.addLakes(this);
DefaultBiomeFeatures.addMonsterRooms(this);
DefaultBiomeFeatures.addTaigaLargeFerns(this);
DefaultBiomeFeatures.addStoneVariants(this);
DefaultBiomeFeatures.addOres(this);
DefaultBiomeFeatures.addSedimentDisks(this);
// DefaultBiomeFeatures.addTaigaConifers(this);
DefaultBiomeFeatures.addDefaultFlowers(this);
DefaultBiomeFeatures.addGrass(this);
DefaultBiomeFeatures.addVeryDenseGrass(this);
// extra grass since there are no trees
DefaultBiomeFeatures.addGrass(this);
DefaultBiomeFeatures.addGrass(this);
DefaultBiomeFeatures.addReedsAndPumpkins(this);
// DefaultBiomeFeatures.addSprings(this);
DefaultBiomeFeatures.addBerryBushes(this);
DefaultBiomeFeatures.addFreezeTopLayer(this);
this.addSpawn(EntityClassification.CREATURE, new SpawnListEntry(EntityType.SHEEP, 12, 4, 4));
@ -74,6 +76,7 @@ public class TaigaScrub extends BiomeVariant {
this.addSpawn(EntityClassification.MONSTER, new SpawnListEntry(EntityType.SLIME, 100, 4, 4));
this.addSpawn(EntityClassification.MONSTER, new SpawnListEntry(EntityType.ENDERMAN, 10, 1, 4));
this.addSpawn(EntityClassification.MONSTER, new SpawnListEntry(EntityType.WITCH, 5, 1, 1));
this.setRegistryName("terraforged", "taiga_scrub");
}
@Override

View File

@ -0,0 +1,102 @@
package com.terraforged.mod.util;
import net.minecraft.nbt.CompoundNBT;
import net.minecraft.nbt.CompressedStreamTools;
import net.minecraft.nbt.INBT;
import net.minecraft.nbt.ListNBT;
import net.minecraft.nbt.StringNBT;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.HashMap;
public class NBTLeavesFixer {
public static void main(String[] args) {
RuleSet ruleSet = new RuleSet();
ruleSet.put("persistent", new Rule("true", "false"));
String path = "H:\\Projects\\TerraForged\\TerraForgedMod\\src\\main\\resources\\data\\terraforged\\structures\\trees";
visit(new File(path), ruleSet);
}
public static void visit(File file, RuleSet ruleSet) {
if (file.isDirectory()) {
for (File f : file.listFiles()) {
visit(f, ruleSet);
}
} else if (file.getName().endsWith(".nbt")) {
try {
System.out.println("Opening file: " + file);
CompoundNBT value;
INBT result;
try (InputStream in = new FileInputStream(file)) {
value = CompressedStreamTools.readCompressed(in);
result = modify("", value, ruleSet);
if (value == result) {
return;
}
}
System.out.println("Writing file: " + file);
try (OutputStream out = new FileOutputStream(file)) {
CompressedStreamTools.writeCompressed((CompoundNBT) result, out);
}
} catch (IOException e) {
e.printStackTrace();
}
}
}
private static INBT modify(String name, INBT nbt, RuleSet ruleSet) {
if (nbt instanceof CompoundNBT) {
CompoundNBT map = (CompoundNBT) nbt;
boolean change = false;
for (String key : map.keySet()) {
INBT value = map.get(key);
INBT result = modify(key, value, ruleSet);
map.put(key, result);
change |= value != result;
}
return change ? map.copy() : map;
} else if (nbt instanceof ListNBT) {
ListNBT list = (ListNBT) nbt;
boolean change = false;
for (int i = 0; i < list.size(); i++) {
INBT value = list.get(i);
INBT result = modify(name + "[" + i + "]", value, ruleSet);
list.set(i, result);
change |= result != value;
}
return change ? list.copy() : list;
} else {
Rule rule = ruleSet.get(name);
if (rule == null) {
return nbt;
}
if (nbt instanceof StringNBT) {
String value = nbt.getString();
if (value.equals(rule.match)) {
System.out.println(" Replaced value for: " + name);
return StringNBT.valueOf(rule.replace.toString());
}
}
return nbt;
}
}
private static class RuleSet extends HashMap<String, Rule> {}
private static class Rule {
private final Object match;
private final Object replace;
private Rule(Object match, Object replace) {
this.match = match;
this.replace = replace;
}
}
}