renames
This commit is contained in:
@@ -6,10 +6,10 @@ public static List<string> FindAllFiles(string directoryPath)
|
|||||||
|
|
||||||
var replacements = new[]
|
var replacements = new[]
|
||||||
{
|
{
|
||||||
new { Old = "customcursor", New = "template" },
|
new { Old = "com.example", New = "io.github.cooldev" },
|
||||||
new { Old = "Custom Cursor", New = "Template" },
|
new { Old = "template", New = "coolmod" },
|
||||||
new { Old = "CustomCursor", New = "TempLate" },
|
new { Old = "Template", New = "Cool Mod" },
|
||||||
new { Old = "io.github.jumperonjava.customcursor", New = "io.github.example" }
|
new { Old = "TempLate", New = "CoolMod" }
|
||||||
};
|
};
|
||||||
|
|
||||||
var files = FindAllFiles(Directory.GetCurrentDirectory());
|
var files = FindAllFiles(Directory.GetCurrentDirectory());
|
||||||
@@ -22,14 +22,25 @@ foreach(var file in files)
|
|||||||
continue;
|
continue;
|
||||||
if (file.Contains(".git"))
|
if (file.Contains(".git"))
|
||||||
continue;
|
continue;
|
||||||
|
if (file.Contains(".gradle"))
|
||||||
|
continue;
|
||||||
|
if (file.Contains("build"))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
|
||||||
var fileContent = File.ReadAllText(file);
|
var fileContent = File.ReadAllText(file);
|
||||||
var newFile = file;
|
var oldFile = file.Replace("\\","/");
|
||||||
|
var newFile = oldFile;
|
||||||
foreach (var replacement in replacements)
|
foreach (var replacement in replacements)
|
||||||
{
|
{
|
||||||
fileContent = fileContent.Replace(replacement.Old, replacement.New);
|
fileContent = fileContent.Replace(replacement.Old, replacement.New);
|
||||||
newFile = newFile.Replace(replacement.Old.Replace(".","/"), replacement.New.Replace(".","/"));
|
newFile = newFile.Replace(replacement.Old.Replace(".","/"), replacement.New.Replace(".","/"));
|
||||||
|
|
||||||
|
Console.WriteLine(replacement.Old.Replace(".","/")+" -> "+replacement.New.Replace(".","/"));
|
||||||
|
|
||||||
}
|
}
|
||||||
File.Delete(file);
|
Console.WriteLine($"Moving \n\t< {oldFile} \n\t> {newFile}");
|
||||||
|
File.Delete(oldFile);
|
||||||
|
Directory.CreateDirectory(Path.GetDirectoryName(newFile));
|
||||||
File.WriteAllText(newFile,fileContent);
|
File.WriteAllText(newFile,fileContent);
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package io.github.jumperonjava.template;
|
package com.example.template;
|
||||||
|
|
||||||
import net.minecraft.client.gui.screen.Screen;
|
import net.minecraft.client.gui.screen.Screen;
|
||||||
import net.minecraft.text.Text;
|
import net.minecraft.text.Text;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package io.github.jumperonjava.template;
|
package com.example.template;
|
||||||
|
|
||||||
public interface ModPlatform {
|
public interface ModPlatform {
|
||||||
String getModloader();
|
String getModloader();
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package io.github.jumperonjava.template;
|
package com.example.template;
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
package io.github.jumperonjava.template.mixin;
|
package com.example.template.mixin;
|
||||||
|
|
||||||
import io.github.jumperonjava.template.TempLateInit;
|
import com.example.template.TempLateInit;
|
||||||
import net.minecraft.client.gui.screen.TitleScreen;
|
import net.minecraft.client.gui.screen.TitleScreen;
|
||||||
import org.spongepowered.asm.mixin.Mixin;
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
import org.spongepowered.asm.mixin.injection.At;
|
import org.spongepowered.asm.mixin.injection.At;
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
//? if fabric {
|
//? if fabric {
|
||||||
/*package io.github.jumperonjava.customcursor.platforms.fabric;
|
/*package com.example.platforms.fabric;
|
||||||
|
|
||||||
import com.terraformersmc.modmenu.api.ConfigScreenFactory;
|
import com.terraformersmc.modmenu.api.ConfigScreenFactory;
|
||||||
import com.terraformersmc.modmenu.api.ModMenuApi;
|
import com.terraformersmc.modmenu.api.ModMenuApi;
|
||||||
import io.github.jumperonjava.customcursor.ConfigScreen;
|
import com.example.template.ConfigScreen;
|
||||||
|
|
||||||
public class ModMenuIntegration implements ModMenuApi {
|
public class ModMenuIntegration implements ModMenuApi {
|
||||||
public ConfigScreenFactory<?> getModConfigScreenFactory() {
|
public ConfigScreenFactory<?> getModConfigScreenFactory() {
|
||||||
@@ -1,15 +1,15 @@
|
|||||||
//? if fabric {
|
//? if fabric {
|
||||||
/*package io.github.jumperonjava.customcursor.platforms.fabric;
|
/*package com.example.platforms.fabric;
|
||||||
|
|
||||||
import io.github.jumperonjava.customcursor.ModPlatform;
|
import com.example.template.ModPlatform;
|
||||||
import net.fabricmc.api.ModInitializer;
|
import net.fabricmc.api.ModInitializer;
|
||||||
import io.github.jumperonjava.customcursor.CustomCursorInit;
|
import com.example.template.TempLateInit;
|
||||||
import net.fabricmc.loader.api.FabricLoader;
|
import net.fabricmc.loader.api.FabricLoader;
|
||||||
|
|
||||||
public class CustomCursorFabric implements ModInitializer {
|
public class TempLateFabric implements ModInitializer {
|
||||||
@Override
|
@Override
|
||||||
public void onInitialize() {
|
public void onInitialize() {
|
||||||
CustomCursorInit.entrypoint(new FabricPlatform());
|
TempLateInit.entrypoint(new FabricPlatform());
|
||||||
}
|
}
|
||||||
public static class FabricPlatform implements ModPlatform{
|
public static class FabricPlatform implements ModPlatform{
|
||||||
|
|
||||||
@@ -1,17 +1,17 @@
|
|||||||
//? if forge {
|
//? if forge {
|
||||||
/*package io.github.jumperonjava.customcursor.platforms.forge;
|
/*package com.example.platforms.forge;
|
||||||
|
|
||||||
import io.github.jumperonjava.customcursor.ConfigScreen;
|
import com.example.template.ConfigScreen;
|
||||||
import io.github.jumperonjava.customcursor.CustomCursorInit;
|
import com.example.template.TempLateInit;
|
||||||
import io.github.jumperonjava.customcursor.ModPlatform;
|
import com.example.template.ModPlatform;
|
||||||
import net.minecraftforge.common.MinecraftForge;
|
import net.minecraftforge.common.MinecraftForge;
|
||||||
import net.minecraftforge.fml.ModList;
|
import net.minecraftforge.fml.ModList;
|
||||||
import net.minecraftforge.fml.common.Mod;
|
import net.minecraftforge.fml.common.Mod;
|
||||||
|
|
||||||
@Mod("customcursor")
|
@Mod("template")
|
||||||
public class CustomCursorForge {
|
public class TempLateForge {
|
||||||
public CustomCursorForge() {
|
public TempLateForge() {
|
||||||
CustomCursorInit.entrypoint(new ForgePlatform());
|
TempLateInit.entrypoint(new ForgePlatform());
|
||||||
MinecraftForge.registerConfigScreen(ConfigScreen::createCursorEditScreen);
|
MinecraftForge.registerConfigScreen(ConfigScreen::createCursorEditScreen);
|
||||||
}
|
}
|
||||||
public static class ForgePlatform implements ModPlatform {
|
public static class ForgePlatform implements ModPlatform {
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
//? if neoforge {
|
//? if neoforge {
|
||||||
package io.github.jumperonjava.customcursor.platforms.neoforge;
|
package com.example.template.platforms.neoforge;
|
||||||
|
|
||||||
import io.github.jumperonjava.customcursor.ConfigScreen;
|
import com.example.template.ConfigScreen;
|
||||||
import io.github.jumperonjava.customcursor.CustomCursorInit;
|
import com.example.template.TempLateInit;
|
||||||
import io.github.jumperonjava.customcursor.ModPlatform;
|
import com.example.template.ModPlatform;
|
||||||
import net.minecraft.client.gui.screen.Screen;
|
import net.minecraft.client.gui.screen.Screen;
|
||||||
import net.neoforged.fml.ModList;
|
import net.neoforged.fml.ModList;
|
||||||
import net.neoforged.fml.ModLoadingContext;
|
import net.neoforged.fml.ModLoadingContext;
|
||||||
@@ -13,10 +13,10 @@ import net.neoforged.neoforge.client.ConfigScreenHandler;
|
|||||||
//?} else {
|
//?} else {
|
||||||
/*import net.neoforged.neoforge.client.gui.IConfigScreenFactory;
|
/*import net.neoforged.neoforge.client.gui.IConfigScreenFactory;
|
||||||
*///?}
|
*///?}
|
||||||
@Mod("customcursor")
|
@Mod("template")
|
||||||
public class CustomCursorNeoForge {
|
public class TempLateNeoForge {
|
||||||
public CustomCursorNeoForge() {
|
public TempLateNeoForge() {
|
||||||
CustomCursorInit.entrypoint(new NeoForgePlatform());
|
TempLateInit.entrypoint(new NeoForgePlatform());
|
||||||
ModLoadingContext.get().registerExtensionPoint(
|
ModLoadingContext.get().registerExtensionPoint(
|
||||||
//? if <1.21 {
|
//? if <1.21 {
|
||||||
ConfigScreenHandler.ConfigScreenFactory.class,
|
ConfigScreenHandler.ConfigScreenFactory.class,
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package io.github.jumperonjava.customcursor.util;
|
package com.example.template.util;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.FileOutputStream;
|
import java.io.FileOutputStream;
|
||||||
@@ -1,19 +1,19 @@
|
|||||||
modLoader = "javafml"
|
modLoader = "javafml"
|
||||||
loaderVersion = "*"
|
loaderVersion = "*"
|
||||||
license = "LGPLv3"
|
license = "LGPLv3"
|
||||||
issueTrackerURL="https://JavaJumper/CustomCursor/issues"
|
issueTrackerURL="https://JavaJumper/TempLate/issues"
|
||||||
|
|
||||||
[[mods]]
|
[[mods]]
|
||||||
modId = "customcursor"
|
modId = "template"
|
||||||
version = "${version}"
|
version = "${version}"
|
||||||
displayName = "${name}"
|
displayName = "${name}"
|
||||||
authors = "JavaJumper"
|
authors = "JavaJumper"
|
||||||
description = ""
|
description = ""
|
||||||
logoFile = "assets/customcursor/icon.png"
|
logoFile = "assets/template/icon.png"
|
||||||
logoBlur = false
|
logoBlur = false
|
||||||
|
|
||||||
[[mixins]]
|
[[mixins]]
|
||||||
config = "customcursor-common.mixins.json"
|
config = "template-common.mixins.json"
|
||||||
|
|
||||||
[[mixins]]
|
[[mixins]]
|
||||||
config = "customcursor-neoforge.mixins.json"
|
config = "template-neoforge.mixins.json"
|
||||||
@@ -1,19 +1,19 @@
|
|||||||
modLoader = "javafml"
|
modLoader = "javafml"
|
||||||
loaderVersion = "*"
|
loaderVersion = "*"
|
||||||
license = "LGPLv3"
|
license = "LGPLv3"
|
||||||
issueTrackerURL="https://JavaJumper/CustomCursor/issues"
|
issueTrackerURL="https://JavaJumper/TempLate/issues"
|
||||||
|
|
||||||
[[mods]]
|
[[mods]]
|
||||||
modId = "customcursor"
|
modId = "template"
|
||||||
version = "${version}"
|
version = "${version}"
|
||||||
displayName = "${name}"
|
displayName = "${name}"
|
||||||
authors = "JavaJumper"
|
authors = "JavaJumper"
|
||||||
description = ""
|
description = ""
|
||||||
logoFile = "assets/customcursor/icon.png"
|
logoFile = "assets/template/icon.png"
|
||||||
logoBlur = false
|
logoBlur = false
|
||||||
|
|
||||||
[[mixins]]
|
[[mixins]]
|
||||||
config = "customcursor-common.mixins.json"
|
config = "template-common.mixins.json"
|
||||||
|
|
||||||
[[mixins]]
|
[[mixins]]
|
||||||
config = "customcursor-neoforge.mixins.json"
|
config = "template-neoforge.mixins.json"
|
||||||
@@ -1,3 +1,3 @@
|
|||||||
{
|
{
|
||||||
"accessWidener": "customcursor.accesswidener"
|
"accessWidener": "template.accesswidener"
|
||||||
}
|
}
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 11 KiB |
@@ -1,4 +0,0 @@
|
|||||||
{
|
|
||||||
"customcursor.confirm": "Confirm",
|
|
||||||
"customcursor.cancel": "Cancel"
|
|
||||||
}
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 594 B |
Binary file not shown.
|
Before Width: | Height: | Size: 163 B |
4
src/main/resources/assets/template/lang/en_us.json
Normal file
4
src/main/resources/assets/template/lang/en_us.json
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"template.confirm": "Confirm",
|
||||||
|
"template.cancel": "Cancel"
|
||||||
|
}
|
||||||
Binary file not shown.
BIN
src/main/resources/assets/template/textures/gui/pointer.png
Normal file
BIN
src/main/resources/assets/template/textures/gui/pointer.png
Normal file
Binary file not shown.
@@ -14,15 +14,15 @@
|
|||||||
"environment": "*",
|
"environment": "*",
|
||||||
"entrypoints": {
|
"entrypoints": {
|
||||||
"main": [
|
"main": [
|
||||||
"io.github.jumperonjava.customcursor.platforms.fabric.CustomCursorFabric"
|
"com.example.platforms.fabric.TempLateFabric"
|
||||||
],
|
],
|
||||||
"modmenu": [
|
"modmenu": [
|
||||||
"io.github.jumperonjava.customcursor.platforms.fabric.ModMenuIntegration"
|
"com.example.platforms.fabric.ModMenuIntegration"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"mixins": [
|
"mixins": [
|
||||||
"customcursor-common.mixins.json",
|
"template-common.mixins.json",
|
||||||
"customcursor-fabric.mixins.json"
|
"template-fabric.mixins.json"
|
||||||
],
|
],
|
||||||
"depends": {
|
"depends": {
|
||||||
"fabricloader": ">=0.15",
|
"fabricloader": ">=0.15",
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
{
|
{
|
||||||
"required": true,
|
"required": true,
|
||||||
"package": "io.github.jumperonjava.customcursor.platforms.neoforge.mixin",
|
"package": "com.example.mixin",
|
||||||
"compatibilityLevel": "JAVA_17",
|
"compatibilityLevel": "JAVA_17",
|
||||||
"mixins": [
|
"mixins": [
|
||||||
|
"com.example.template.mixin.ExampleMixin"
|
||||||
],
|
],
|
||||||
"injectors": {
|
"injectors": {
|
||||||
"defaultRequire": 1
|
"defaultRequire": 1
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"required": true,
|
"required": true,
|
||||||
"package": "io.github.jumperonjava.customcursor.platforms.forge.mixin",
|
"package": "com.example.platforms.fabric.mixin",
|
||||||
"compatibilityLevel": "JAVA_17",
|
"compatibilityLevel": "JAVA_17",
|
||||||
"mixins": [
|
"mixins": [
|
||||||
],
|
],
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"required": true,
|
"required": true,
|
||||||
"package": "io.github.jumperonjava.customcursor.platforms.fabric.mixin",
|
"package": "com.example.platforms.forge.mixin",
|
||||||
"compatibilityLevel": "JAVA_17",
|
"compatibilityLevel": "JAVA_17",
|
||||||
"mixins": [
|
"mixins": [
|
||||||
],
|
],
|
||||||
@@ -1,9 +1,8 @@
|
|||||||
{
|
{
|
||||||
"required": true,
|
"required": true,
|
||||||
"package": "io.github.jumperonjava.customcursor.mixin",
|
"package": "com.example.platforms.neoforge.mixin",
|
||||||
"compatibilityLevel": "JAVA_17",
|
"compatibilityLevel": "JAVA_17",
|
||||||
"mixins": [
|
"mixins": [
|
||||||
"ExampleMixin"
|
|
||||||
],
|
],
|
||||||
"injectors": {
|
"injectors": {
|
||||||
"defaultRequire": 1
|
"defaultRequire": 1
|
||||||
Reference in New Issue
Block a user