From 279042b987ad265f98a468d9de958d989a210c9f Mon Sep 17 00:00:00 2001 From: Chaoscaot Date: Mon, 17 Jul 2023 15:55:06 +0200 Subject: [PATCH] Add Copyright & Rename Package --- .../advancedscripts/AdvancedScripts.java | 29 +++++++++++++ .../lexer/ScriptColorizer.java | 21 +++++++++- .../steamwar/advancedscripts/lexer/Token.java | 40 ++++++++++++++++++ .../lexer/TokenTypeColors.java | 41 +++++++++++++++++++ .../mixin/ClientPlayerEntityMixin.java | 23 ++++++++++- .../advancedscripts/mixin/KeyboardMixin.java | 33 ++++++++------- .../screen/ScriptEditScreen.java | 29 ++++++++++--- .../advancedscripts/AdvancedScripts.java | 26 ------------ .../advancedscripts/lexer/Token.java | 21 ---------- .../lexer/TokenTypeColors.java | 22 ---------- .../resources/advancedscripts.mixins.json | 2 +- src/main/resources/fabric.mod.json | 2 +- 12 files changed, 194 insertions(+), 95 deletions(-) create mode 100644 src/main/java/de/steamwar/advancedscripts/AdvancedScripts.java rename src/main/java/de/{zonlykroks => steamwar}/advancedscripts/lexer/ScriptColorizer.java (83%) create mode 100644 src/main/java/de/steamwar/advancedscripts/lexer/Token.java create mode 100644 src/main/java/de/steamwar/advancedscripts/lexer/TokenTypeColors.java rename src/main/java/de/{zonlykroks => steamwar}/advancedscripts/mixin/ClientPlayerEntityMixin.java (51%) rename src/main/java/de/{zonlykroks => steamwar}/advancedscripts/mixin/KeyboardMixin.java (61%) rename src/main/java/de/{zonlykroks => steamwar}/advancedscripts/screen/ScriptEditScreen.java (95%) delete mode 100644 src/main/java/de/zonlykroks/advancedscripts/AdvancedScripts.java delete mode 100644 src/main/java/de/zonlykroks/advancedscripts/lexer/Token.java delete mode 100644 src/main/java/de/zonlykroks/advancedscripts/lexer/TokenTypeColors.java diff --git a/src/main/java/de/steamwar/advancedscripts/AdvancedScripts.java b/src/main/java/de/steamwar/advancedscripts/AdvancedScripts.java new file mode 100644 index 0000000..240e73d --- /dev/null +++ b/src/main/java/de/steamwar/advancedscripts/AdvancedScripts.java @@ -0,0 +1,29 @@ +/* + * This file is a part of the SteamWar software. + * + * Copyright (C) 2023 SteamWar.de-Serverteam + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package de.steamwar.advancedscripts; + +import net.fabricmc.api.ClientModInitializer; + +public class AdvancedScripts implements ClientModInitializer { + + @Override + public void onInitializeClient() { + } +} diff --git a/src/main/java/de/zonlykroks/advancedscripts/lexer/ScriptColorizer.java b/src/main/java/de/steamwar/advancedscripts/lexer/ScriptColorizer.java similarity index 83% rename from src/main/java/de/zonlykroks/advancedscripts/lexer/ScriptColorizer.java rename to src/main/java/de/steamwar/advancedscripts/lexer/ScriptColorizer.java index a224f8b..dc78d4d 100644 --- a/src/main/java/de/zonlykroks/advancedscripts/lexer/ScriptColorizer.java +++ b/src/main/java/de/steamwar/advancedscripts/lexer/ScriptColorizer.java @@ -1,4 +1,23 @@ -package de.zonlykroks.advancedscripts.lexer; +/* + * This file is a part of the SteamWar software. + * + * Copyright (C) 2023 SteamWar.de-Serverteam + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package de.steamwar.advancedscripts.lexer; import java.util.ArrayList; import java.util.List; diff --git a/src/main/java/de/steamwar/advancedscripts/lexer/Token.java b/src/main/java/de/steamwar/advancedscripts/lexer/Token.java new file mode 100644 index 0000000..58f764c --- /dev/null +++ b/src/main/java/de/steamwar/advancedscripts/lexer/Token.java @@ -0,0 +1,40 @@ +/* + * This file is a part of the SteamWar software. + * + * Copyright (C) 2023 SteamWar.de-Serverteam + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package de.steamwar.advancedscripts.lexer; + +public class Token { + public static final Token SPACE = new Token(" ", 0xFFFFFFFF); + + public final String text; + public final int color; + + public Token(String text, int color) { + this.text = text; + this.color = color; + } + + @Override + public String toString() { + return "Token{" + + "text='" + text + '\'' + + ", color=" + color + + '}'; + } +} diff --git a/src/main/java/de/steamwar/advancedscripts/lexer/TokenTypeColors.java b/src/main/java/de/steamwar/advancedscripts/lexer/TokenTypeColors.java new file mode 100644 index 0000000..6510fb0 --- /dev/null +++ b/src/main/java/de/steamwar/advancedscripts/lexer/TokenTypeColors.java @@ -0,0 +1,41 @@ +/* + * This file is a part of the SteamWar software. + * + * Copyright (C) 2023 SteamWar.de-Serverteam + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package de.steamwar.advancedscripts.lexer; + +public class TokenTypeColors { + + private TokenTypeColors() { + throw new IllegalStateException("Utility class"); + } + + public static final int BACKGROUND = 0xFF1E1F22; + public static final int SELECTION = 0xFF23437F; + public static final int OTHER = 0xFFFFFFFF; + + public static final int ERROR = 0xFFAA0000; + + public static final int VARIABLE = 0xFFFFFFFF; + public static final int COMMENT = 0xFF656565; + public static final int CONSTANT = 0x3F6EC6; + + public static final int NUMBER = 0xFF61839F; + public static final int BOOLEAN = 0xFF925F35; + public static final int STRING = 0x6a8759; +} diff --git a/src/main/java/de/zonlykroks/advancedscripts/mixin/ClientPlayerEntityMixin.java b/src/main/java/de/steamwar/advancedscripts/mixin/ClientPlayerEntityMixin.java similarity index 51% rename from src/main/java/de/zonlykroks/advancedscripts/mixin/ClientPlayerEntityMixin.java rename to src/main/java/de/steamwar/advancedscripts/mixin/ClientPlayerEntityMixin.java index 4c00782..11b0a25 100644 --- a/src/main/java/de/zonlykroks/advancedscripts/mixin/ClientPlayerEntityMixin.java +++ b/src/main/java/de/steamwar/advancedscripts/mixin/ClientPlayerEntityMixin.java @@ -1,6 +1,25 @@ -package de.zonlykroks.advancedscripts.mixin; +/* + * This file is a part of the SteamWar software. + * + * Copyright (C) 2023 SteamWar.de-Serverteam + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ -import de.zonlykroks.advancedscripts.screen.ScriptEditScreen; +package de.steamwar.advancedscripts.mixin; + +import de.steamwar.advancedscripts.screen.ScriptEditScreen; import net.minecraft.client.MinecraftClient; import net.minecraft.client.network.ClientPlayerEntity; import net.minecraft.item.ItemStack; diff --git a/src/main/java/de/zonlykroks/advancedscripts/mixin/KeyboardMixin.java b/src/main/java/de/steamwar/advancedscripts/mixin/KeyboardMixin.java similarity index 61% rename from src/main/java/de/zonlykroks/advancedscripts/mixin/KeyboardMixin.java rename to src/main/java/de/steamwar/advancedscripts/mixin/KeyboardMixin.java index acdec70..5d0d666 100644 --- a/src/main/java/de/zonlykroks/advancedscripts/mixin/KeyboardMixin.java +++ b/src/main/java/de/steamwar/advancedscripts/mixin/KeyboardMixin.java @@ -1,20 +1,23 @@ /* - This file is a part of the SteamWar software. + * This file is a part of the SteamWar software. + * + * Copyright (C) 2023 SteamWar.de-Serverteam + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ - Copyright (C) 2020 SteamWar.de-Serverteam - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Affero General Public License for more details. - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see . -*/ - -package de.zonlykroks.advancedscripts.mixin; +package de.steamwar.advancedscripts.mixin; import io.netty.buffer.Unpooled; import net.minecraft.client.Keyboard; diff --git a/src/main/java/de/zonlykroks/advancedscripts/screen/ScriptEditScreen.java b/src/main/java/de/steamwar/advancedscripts/screen/ScriptEditScreen.java similarity index 95% rename from src/main/java/de/zonlykroks/advancedscripts/screen/ScriptEditScreen.java rename to src/main/java/de/steamwar/advancedscripts/screen/ScriptEditScreen.java index 044b8ff..07afe06 100644 --- a/src/main/java/de/zonlykroks/advancedscripts/screen/ScriptEditScreen.java +++ b/src/main/java/de/steamwar/advancedscripts/screen/ScriptEditScreen.java @@ -1,13 +1,30 @@ -package de.zonlykroks.advancedscripts.screen; +/* + * This file is a part of the SteamWar software. + * + * Copyright (C) 2023 SteamWar.de-Serverteam + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package de.steamwar.advancedscripts.screen; import com.mojang.blaze3d.systems.RenderSystem; -import de.zonlykroks.advancedscripts.lexer.ScriptColorizer; -import de.zonlykroks.advancedscripts.lexer.Token; -import de.zonlykroks.advancedscripts.lexer.TokenTypeColors; +import de.steamwar.advancedscripts.lexer.TokenTypeColors; +import de.steamwar.advancedscripts.lexer.ScriptColorizer; +import de.steamwar.advancedscripts.lexer.Token; import net.minecraft.client.font.TextHandler; import net.minecraft.client.gui.DrawableHelper; -import net.minecraft.client.gui.Element; -import net.minecraft.client.gui.Selectable; import net.minecraft.client.gui.screen.Screen; import net.minecraft.client.gui.screen.ingame.BookEditScreen; import net.minecraft.client.gui.screen.ingame.BookScreen; diff --git a/src/main/java/de/zonlykroks/advancedscripts/AdvancedScripts.java b/src/main/java/de/zonlykroks/advancedscripts/AdvancedScripts.java deleted file mode 100644 index 6882751..0000000 --- a/src/main/java/de/zonlykroks/advancedscripts/AdvancedScripts.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - This file is a part of the SteamWar software. - - Copyright (C) 2020 SteamWar.de-Serverteam - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Affero General Public License for more details. - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see . -*/ - -package de.zonlykroks.advancedscripts; - -import net.fabricmc.api.ClientModInitializer; - -public class AdvancedScripts implements ClientModInitializer { - - @Override - public void onInitializeClient() { - } -} diff --git a/src/main/java/de/zonlykroks/advancedscripts/lexer/Token.java b/src/main/java/de/zonlykroks/advancedscripts/lexer/Token.java deleted file mode 100644 index 98c8f95..0000000 --- a/src/main/java/de/zonlykroks/advancedscripts/lexer/Token.java +++ /dev/null @@ -1,21 +0,0 @@ -package de.zonlykroks.advancedscripts.lexer; - -public class Token { - public static final Token SPACE = new Token(" ", 0xFFFFFFFF); - - public final String text; - public final int color; - - public Token(String text, int color) { - this.text = text; - this.color = color; - } - - @Override - public String toString() { - return "Token{" + - "text='" + text + '\'' + - ", color=" + color + - '}'; - } -} diff --git a/src/main/java/de/zonlykroks/advancedscripts/lexer/TokenTypeColors.java b/src/main/java/de/zonlykroks/advancedscripts/lexer/TokenTypeColors.java deleted file mode 100644 index 00738fe..0000000 --- a/src/main/java/de/zonlykroks/advancedscripts/lexer/TokenTypeColors.java +++ /dev/null @@ -1,22 +0,0 @@ -package de.zonlykroks.advancedscripts.lexer; - -public class TokenTypeColors { - - private TokenTypeColors() { - throw new IllegalStateException("Utility class"); - } - - public static final int BACKGROUND = 0xFF1E1F22; - public static final int SELECTION = 0xFF23437F; - public static final int OTHER = 0xFFFFFFFF; - - public static final int ERROR = 0xFFAA0000; - - public static final int VARIABLE = 0xFFFFFFFF; - public static final int COMMENT = 0xFF656565; - public static final int CONSTANT = 0x3F6EC6; - - public static final int NUMBER = 0xFF61839F; - public static final int BOOLEAN = 0xFF925F35; - public static final int STRING = 0x6a8759; -} diff --git a/src/main/resources/advancedscripts.mixins.json b/src/main/resources/advancedscripts.mixins.json index b1b182d..a455d4c 100644 --- a/src/main/resources/advancedscripts.mixins.json +++ b/src/main/resources/advancedscripts.mixins.json @@ -1,7 +1,7 @@ { "required": true, "minVersion": "0.8", - "package": "de.zonlykroks.advancedscripts.mixin", + "package": "de.steamwar.advancedscripts.mixin", "compatibilityLevel": "JAVA_17", "mixins": [ ], diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index e1004dd..097be61 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -14,7 +14,7 @@ "environment": "client", "entrypoints": { "client": [ - "de.zonlykroks.advancedscripts.AdvancedScripts" + "de.steamwar.advancedscripts.AdvancedScripts" ] }, "mixins": [