Skip to content

Commit

Permalink
Rename to reflect purpose
Browse files Browse the repository at this point in the history
  • Loading branch information
Griefed committed Nov 7, 2023
1 parent 6d28a12 commit d68310c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
import de.griefed.generation.blocks.BlockDefinitionParser;
import de.griefed.generation.generator.CommonGeneration;
import de.griefed.generation.generator.CommonSubProjectGenerator;
import org.gradle.api.Plugin;
import org.gradle.api.Project;

Expand Down Expand Up @@ -33,7 +33,7 @@ public void apply(Project project) {
String modName = gradleProperties.getProperty("mod_name");

BlockDefinitionParser parser = new BlockDefinitionParser(project, objectMapper);
CommonGeneration common = new CommonGeneration(project.findProject("Common"), modName, parser, objectMapper);
CommonSubProjectGenerator common = new CommonSubProjectGenerator(project.findProject("Common"), modName, parser, objectMapper);
common.run();
} catch (IOException e) {
throw new RuntimeException("Error generating block and item code.", e);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import java.util.regex.Pattern;

@SuppressWarnings("unused")
public abstract class ModloaderGeneration {
public abstract class CodeGenerator {

public static final Pattern GENERATED_CODE_PATTERN = Pattern.compile("/\\*###GENERATED CODE - DO NOT EDIT - MANUALLY EDITED CODE WILL BE LOST###\\*/.*/\\*###GENERATED CODE - DO NOT EDIT - MANUALLY EDITED CODE WILL BE LOST###\\*/", Pattern.DOTALL);
public static final Pattern LANG_REPLACE = Pattern.compile("\"DO\\.NOT\\.EDIT\\.MANUALLY\\.BEGIN\": \"BEGIN\".*\"DO\\.NOT\\.EDIT\\.MANUALLY\\.END\": \"END\"", Pattern.DOTALL);
Expand Down Expand Up @@ -66,7 +66,7 @@ public abstract class ModloaderGeneration {
private final File assetsDirectory;
private final File translationsFile;

protected ModloaderGeneration(Project project, String modName, BlockDefinitionParser parser, ObjectMapper objectMapper) {
protected CodeGenerator(Project project, String modName, BlockDefinitionParser parser, ObjectMapper objectMapper) {
this.project = project;
this.blockDefinitionParser = parser;
this.modName = modName;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@

import java.io.IOException;

public class CommonGeneration extends ModloaderGeneration implements CodeGeneration {
public CommonGeneration(Project project, String modName, BlockDefinitionParser parser, ObjectMapper objectMapper) {
public class CommonSubProjectGenerator extends CodeGenerator implements CodeGeneration {
public CommonSubProjectGenerator(Project project, String modName, BlockDefinitionParser parser, ObjectMapper objectMapper) {
super(project, modName, parser, objectMapper);
}

Expand Down

0 comments on commit d68310c

Please sign in to comment.