From ae4f703fb4f4b1443ecbca99107dccc25fcdfc06 Mon Sep 17 00:00:00 2001 From: macuguita Date: Thu, 8 Jan 2026 04:18:15 +0100 Subject: [PATCH] add copytight headers --- build.neoforge.gradle.kts | 14 +- src/main/java/com/macuguita/lib/MacuLib.java | 20 ++ src/main/java/com/macuguita/lib/Platform.java | 20 ++ .../lib/fabric/FabricClientEntrypoint.java | 20 ++ .../lib/fabric/FabricEntrypoint.java | 20 ++ .../lib/fabric/FabricPlatformImpl.java | 20 ++ .../macuguita/lib/fabric/package-info.java | 22 +- .../lib/fabric/reg/FabricGuitaRegistry.java | 20 ++ .../fabric/reg/FabricGuitaRegistryEntry.java | 20 ++ .../lib/fabric/reg/package-info.java | 22 +- .../lib/neoforge/NeoForgePlatformImpl.java | 20 ++ .../lib/neoforge/NeoforgeEntrypoint.java | 20 ++ .../NeoForgeClientNetworkBootstrap.java | 20 ++ .../network/NeoForgeNetworkBootstrap.java | 22 +- .../lib/neoforge/network/package-info.java | 24 ++ .../macuguita/lib/neoforge/package-info.java | 22 +- .../neoforge/reg/NeoForgeGuitaRegistry.java | 20 ++ .../reg/NeoForgeGuitaRegistryEntry.java | 20 ++ .../lib/neoforge/reg/package-info.java | 22 +- .../macuguita/lib/network/NetworkManager.java | 210 ++++++++++++------ .../macuguita/lib/network/package-info.java | 24 ++ .../java/com/macuguita/lib/package-info.java | 22 +- .../macuguita/lib/reg/GuitaRegistries.java | 49 +++- .../com/macuguita/lib/reg/GuitaRegistry.java | 72 ++++++ .../macuguita/lib/reg/GuitaRegistryChild.java | 26 ++- .../lib/reg/GuitaRegistryEntries.java | 24 +- .../macuguita/lib/reg/GuitaRegistryEntry.java | 47 +++- .../com/macuguita/lib/reg/package-info.java | 22 +- .../com/macuguita/mixin/PlayerInfoMixin.java | 20 ++ .../com/macuguita/supporters/CapeManager.java | 20 ++ .../com/macuguita/supporters/CapeUtil.java | 20 ++ .../com/macuguita/supporters/RoleChecker.java | 20 ++ .../macuguita/supporters/package-info.java | 22 +- .../com/macuguita/libtest/PingC2SPacket.java | 20 ++ .../com/macuguita/libtest/PingS2CPacket.java | 20 ++ .../java/com/macuguita/libtest/TestMod.java | 20 ++ .../libtest/client/TestModClient.java | 20 ++ .../fabric/FabricClientEntrypoint.java | 22 +- .../libtest/fabric/FabricEntrypoint.java | 22 +- .../libtest/fabric/package-info.java | 22 +- .../libtest/neoforge/NeoforgeEntrypoint.java | 20 ++ .../libtest/neoforge/package-info.java | 22 +- .../com/macuguita/libtest/package-info.java | 22 +- versions/26.1-neoforge/gradle.properties | 6 +- 44 files changed, 1107 insertions(+), 95 deletions(-) create mode 100644 src/main/java/com/macuguita/lib/neoforge/network/package-info.java create mode 100644 src/main/java/com/macuguita/lib/network/package-info.java diff --git a/build.neoforge.gradle.kts b/build.neoforge.gradle.kts index 29d8c20..b88050f 100644 --- a/build.neoforge.gradle.kts +++ b/build.neoforge.gradle.kts @@ -142,11 +142,12 @@ neoForge { register("clientMacuguita") { gameDirectory = file("run/") client() - programArguments.add("--username=macuguita") - programArguments.add("--uuid=0e56050b-ee27-478a-a345-d2b384919081") sourceSet = sourceSets["main"] loadedMods.set(listOf(mods[property("mod.id") as String])) + + programArguments.add("--username=macuguita") + programArguments.add("--uuid=0e56050b-ee27-478a-a345-d2b384919081") } register("server") { gameDirectory = file("run/") @@ -154,11 +155,14 @@ neoForge { sourceSet = sourceSets["main"] loadedMods.set(listOf(mods[property("mod.id") as String])) + + programArguments.add("--nogui") } register("testmodClient") { gameDirectory = file("run") client() + sourceSet = sourceSets["testmod"] loadedMods.set( listOf( @@ -167,10 +171,10 @@ neoForge { ) ) } - register("testmodServer") { gameDirectory = file("run") server() + sourceSet = sourceSets["testmod"] loadedMods.set( listOf( @@ -178,6 +182,8 @@ neoForge { mods["macu_lib_tests"] ) ) + + programArguments.add("--nogui") } } sourceSets["main"].resources.srcDir("src/main/generated") @@ -271,4 +277,4 @@ publishing { repositories { mavenLocal() } -} \ No newline at end of file +} diff --git a/src/main/java/com/macuguita/lib/MacuLib.java b/src/main/java/com/macuguita/lib/MacuLib.java index 03e7306..a2e5fd9 100644 --- a/src/main/java/com/macuguita/lib/MacuLib.java +++ b/src/main/java/com/macuguita/lib/MacuLib.java @@ -1,3 +1,23 @@ +/* + * macu_lib + * Copyright (C) 2026 macuguita + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this program; if not, see + * . + * + */ + package com.macuguita.lib; import com.macuguita.supporters.RoleChecker; diff --git a/src/main/java/com/macuguita/lib/Platform.java b/src/main/java/com/macuguita/lib/Platform.java index 63f4135..fc13530 100644 --- a/src/main/java/com/macuguita/lib/Platform.java +++ b/src/main/java/com/macuguita/lib/Platform.java @@ -1,3 +1,23 @@ +/* + * macu_lib + * Copyright (C) 2026 macuguita + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this program; if not, see + * . + * + */ + package com.macuguita.lib; diff --git a/src/main/java/com/macuguita/lib/fabric/FabricClientEntrypoint.java b/src/main/java/com/macuguita/lib/fabric/FabricClientEntrypoint.java index 49ff8f7..4a89e3f 100644 --- a/src/main/java/com/macuguita/lib/fabric/FabricClientEntrypoint.java +++ b/src/main/java/com/macuguita/lib/fabric/FabricClientEntrypoint.java @@ -1,3 +1,23 @@ +/* + * macu_lib + * Copyright (C) 2026 macuguita + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this program; if not, see + * . + * + */ + package com.macuguita.lib.fabric; //? fabric { diff --git a/src/main/java/com/macuguita/lib/fabric/FabricEntrypoint.java b/src/main/java/com/macuguita/lib/fabric/FabricEntrypoint.java index 0ad69d5..a7b9b07 100644 --- a/src/main/java/com/macuguita/lib/fabric/FabricEntrypoint.java +++ b/src/main/java/com/macuguita/lib/fabric/FabricEntrypoint.java @@ -1,3 +1,23 @@ +/* + * macu_lib + * Copyright (C) 2026 macuguita + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this program; if not, see + * . + * + */ + package com.macuguita.lib.fabric; //? fabric { diff --git a/src/main/java/com/macuguita/lib/fabric/FabricPlatformImpl.java b/src/main/java/com/macuguita/lib/fabric/FabricPlatformImpl.java index e3315d2..c2ce71e 100644 --- a/src/main/java/com/macuguita/lib/fabric/FabricPlatformImpl.java +++ b/src/main/java/com/macuguita/lib/fabric/FabricPlatformImpl.java @@ -1,3 +1,23 @@ +/* + * macu_lib + * Copyright (C) 2026 macuguita + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this program; if not, see + * . + * + */ + package com.macuguita.lib.fabric; //? fabric { diff --git a/src/main/java/com/macuguita/lib/fabric/package-info.java b/src/main/java/com/macuguita/lib/fabric/package-info.java index 163fc5b..6f12ce2 100644 --- a/src/main/java/com/macuguita/lib/fabric/package-info.java +++ b/src/main/java/com/macuguita/lib/fabric/package-info.java @@ -1,4 +1,24 @@ +/* + * macu_lib + * Copyright (C) 2026 macuguita + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this program; if not, see + * . + * + */ + @NullMarked package com.macuguita.lib.fabric; -import org.jspecify.annotations.NullMarked; \ No newline at end of file +import org.jspecify.annotations.NullMarked; diff --git a/src/main/java/com/macuguita/lib/fabric/reg/FabricGuitaRegistry.java b/src/main/java/com/macuguita/lib/fabric/reg/FabricGuitaRegistry.java index 5896735..446754f 100644 --- a/src/main/java/com/macuguita/lib/fabric/reg/FabricGuitaRegistry.java +++ b/src/main/java/com/macuguita/lib/fabric/reg/FabricGuitaRegistry.java @@ -1,3 +1,23 @@ +/* + * macu_lib + * Copyright (C) 2026 macuguita + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this program; if not, see + * . + * + */ + package com.macuguita.lib.fabric.reg; //? fabric { diff --git a/src/main/java/com/macuguita/lib/fabric/reg/FabricGuitaRegistryEntry.java b/src/main/java/com/macuguita/lib/fabric/reg/FabricGuitaRegistryEntry.java index 2eb6505..947c4b2 100644 --- a/src/main/java/com/macuguita/lib/fabric/reg/FabricGuitaRegistryEntry.java +++ b/src/main/java/com/macuguita/lib/fabric/reg/FabricGuitaRegistryEntry.java @@ -1,3 +1,23 @@ +/* + * macu_lib + * Copyright (C) 2026 macuguita + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this program; if not, see + * . + * + */ + package com.macuguita.lib.fabric.reg; //? fabric { diff --git a/src/main/java/com/macuguita/lib/fabric/reg/package-info.java b/src/main/java/com/macuguita/lib/fabric/reg/package-info.java index 9624741..e2d9ee2 100644 --- a/src/main/java/com/macuguita/lib/fabric/reg/package-info.java +++ b/src/main/java/com/macuguita/lib/fabric/reg/package-info.java @@ -1,4 +1,24 @@ +/* + * macu_lib + * Copyright (C) 2026 macuguita + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this program; if not, see + * . + * + */ + @NullMarked package com.macuguita.lib.fabric.reg; -import org.jspecify.annotations.NullMarked; \ No newline at end of file +import org.jspecify.annotations.NullMarked; diff --git a/src/main/java/com/macuguita/lib/neoforge/NeoForgePlatformImpl.java b/src/main/java/com/macuguita/lib/neoforge/NeoForgePlatformImpl.java index 27958b7..e394fe3 100644 --- a/src/main/java/com/macuguita/lib/neoforge/NeoForgePlatformImpl.java +++ b/src/main/java/com/macuguita/lib/neoforge/NeoForgePlatformImpl.java @@ -1,3 +1,23 @@ +/* + * macu_lib + * Copyright (C) 2026 macuguita + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this program; if not, see + * . + * + */ + package com.macuguita.lib.neoforge; //? neoforge { diff --git a/src/main/java/com/macuguita/lib/neoforge/NeoforgeEntrypoint.java b/src/main/java/com/macuguita/lib/neoforge/NeoforgeEntrypoint.java index d27f913..dbe5048 100644 --- a/src/main/java/com/macuguita/lib/neoforge/NeoforgeEntrypoint.java +++ b/src/main/java/com/macuguita/lib/neoforge/NeoforgeEntrypoint.java @@ -1,3 +1,23 @@ +/* + * macu_lib + * Copyright (C) 2026 macuguita + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this program; if not, see + * . + * + */ + package com.macuguita.lib.neoforge; //? neoforge { diff --git a/src/main/java/com/macuguita/lib/neoforge/network/NeoForgeClientNetworkBootstrap.java b/src/main/java/com/macuguita/lib/neoforge/network/NeoForgeClientNetworkBootstrap.java index 64798a6..e4633fd 100644 --- a/src/main/java/com/macuguita/lib/neoforge/network/NeoForgeClientNetworkBootstrap.java +++ b/src/main/java/com/macuguita/lib/neoforge/network/NeoForgeClientNetworkBootstrap.java @@ -1,3 +1,23 @@ +/* + * macu_lib + * Copyright (C) 2026 macuguita + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this program; if not, see + * . + * + */ + package com.macuguita.lib.neoforge.network; //? neoforge { diff --git a/src/main/java/com/macuguita/lib/neoforge/network/NeoForgeNetworkBootstrap.java b/src/main/java/com/macuguita/lib/neoforge/network/NeoForgeNetworkBootstrap.java index 031e837..dd5c0e8 100644 --- a/src/main/java/com/macuguita/lib/neoforge/network/NeoForgeNetworkBootstrap.java +++ b/src/main/java/com/macuguita/lib/neoforge/network/NeoForgeNetworkBootstrap.java @@ -1,3 +1,23 @@ +/* + * macu_lib + * Copyright (C) 2026 macuguita + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this program; if not, see + * . + * + */ + package com.macuguita.lib.neoforge.network; //? neoforge { @@ -62,4 +82,4 @@ public final class NeoForgeNetworkBootstrap { ); } } -*///?} \ No newline at end of file +*///?} diff --git a/src/main/java/com/macuguita/lib/neoforge/network/package-info.java b/src/main/java/com/macuguita/lib/neoforge/network/package-info.java new file mode 100644 index 0000000..9ad2c32 --- /dev/null +++ b/src/main/java/com/macuguita/lib/neoforge/network/package-info.java @@ -0,0 +1,24 @@ +/* + * macu_lib + * Copyright (C) 2026 macuguita + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this program; if not, see + * . + * + */ + +@NullMarked +package com.macuguita.lib.neoforge.network; + +import org.jspecify.annotations.NullMarked; diff --git a/src/main/java/com/macuguita/lib/neoforge/package-info.java b/src/main/java/com/macuguita/lib/neoforge/package-info.java index 1dc6f13..33626e5 100644 --- a/src/main/java/com/macuguita/lib/neoforge/package-info.java +++ b/src/main/java/com/macuguita/lib/neoforge/package-info.java @@ -1,4 +1,24 @@ +/* + * macu_lib + * Copyright (C) 2026 macuguita + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this program; if not, see + * . + * + */ + @NullMarked package com.macuguita.lib.neoforge; -import org.jspecify.annotations.NullMarked; \ No newline at end of file +import org.jspecify.annotations.NullMarked; diff --git a/src/main/java/com/macuguita/lib/neoforge/reg/NeoForgeGuitaRegistry.java b/src/main/java/com/macuguita/lib/neoforge/reg/NeoForgeGuitaRegistry.java index 35a1a88..892e6f2 100644 --- a/src/main/java/com/macuguita/lib/neoforge/reg/NeoForgeGuitaRegistry.java +++ b/src/main/java/com/macuguita/lib/neoforge/reg/NeoForgeGuitaRegistry.java @@ -1,3 +1,23 @@ +/* + * macu_lib + * Copyright (C) 2026 macuguita + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this program; if not, see + * . + * + */ + package com.macuguita.lib.neoforge.reg; //? neoforge { diff --git a/src/main/java/com/macuguita/lib/neoforge/reg/NeoForgeGuitaRegistryEntry.java b/src/main/java/com/macuguita/lib/neoforge/reg/NeoForgeGuitaRegistryEntry.java index cdd8966..d3c76cf 100644 --- a/src/main/java/com/macuguita/lib/neoforge/reg/NeoForgeGuitaRegistryEntry.java +++ b/src/main/java/com/macuguita/lib/neoforge/reg/NeoForgeGuitaRegistryEntry.java @@ -1,3 +1,23 @@ +/* + * macu_lib + * Copyright (C) 2026 macuguita + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this program; if not, see + * . + * + */ + package com.macuguita.lib.neoforge.reg; //? neoforge { diff --git a/src/main/java/com/macuguita/lib/neoforge/reg/package-info.java b/src/main/java/com/macuguita/lib/neoforge/reg/package-info.java index 248b5c5..e3a8ed4 100644 --- a/src/main/java/com/macuguita/lib/neoforge/reg/package-info.java +++ b/src/main/java/com/macuguita/lib/neoforge/reg/package-info.java @@ -1,4 +1,24 @@ +/* + * macu_lib + * Copyright (C) 2026 macuguita + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this program; if not, see + * . + * + */ + @NullMarked package com.macuguita.lib.neoforge.reg; -import org.jspecify.annotations.NullMarked; \ No newline at end of file +import org.jspecify.annotations.NullMarked; diff --git a/src/main/java/com/macuguita/lib/network/NetworkManager.java b/src/main/java/com/macuguita/lib/network/NetworkManager.java index 064549c..ab12095 100644 --- a/src/main/java/com/macuguita/lib/network/NetworkManager.java +++ b/src/main/java/com/macuguita/lib/network/NetworkManager.java @@ -1,3 +1,23 @@ +/* + * macu_lib + * Copyright (C) 2026 macuguita + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this program; if not, see + * . + * + */ + package com.macuguita.lib.network; import com.macuguita.lib.Platform; @@ -6,80 +26,134 @@ import net.minecraft.network.codec.StreamCodec; import net.minecraft.network.protocol.common.custom.CustomPacketPayload; import net.minecraft.server.level.ServerPlayer; +import org.jetbrains.annotations.ApiStatus; + import java.util.ArrayList; import java.util.List; import java.util.function.BiConsumer; import java.util.function.Consumer; import java.util.function.Supplier; +/** + * Utility class for managing custom network packets between client and server. + *

+ * Provides methods to register handlers for client-to-server (C2S) and + * server-to-client (S2C) packets, as well as sending packets in both directions. + *

+ * Example usage (from a mod initialization class): + *

{@code
+ * // Registering a C2S packet
+ * NetworkManager.registerC2S(MyPacket.TYPE, MyPacket.CODEC, (pkt, player) -> {
+ *     // Handle packet received on server
+ * });
+ *
+ * // Sending an S2C packet
+ * NetworkManager.sendS2C(player, new MyPacket(...));
+ * }
+ */ public final class NetworkManager { - private static final List> C2S = new ArrayList<>(); - private static final List> S2C = new ArrayList<>(); - - private NetworkManager() {} - - /* ---------------- C2S ---------------- */ - - public static void registerC2S( - CustomPacketPayload.Type type, - StreamCodec codec, - Supplier> handlerSupplier - ) { - C2SRegistration reg = new C2SRegistration<>(type, codec, handlerSupplier); - C2S.add(reg); - Platform.INSTANCE.registerC2S(reg); - } - - public static void registerC2S( - CustomPacketPayload.Type type, - StreamCodec codec, - BiConsumer handlerSupplier - ) { - registerC2S(type, codec, () -> handlerSupplier); - } - - public static void sendC2S(CustomPacketPayload payload) { - Platform.INSTANCE.sendToServer(payload); - } - - /* ---------------- S2C ---------------- */ - - public static void registerS2C( - CustomPacketPayload.Type type, - StreamCodec codec, - Supplier> handlerSupplier - ) { - S2CRegistration reg = new S2CRegistration<>(type, codec, handlerSupplier); - S2C.add(reg); - Platform.INSTANCE.registerS2C(reg); - } - - public static void registerS2C( - CustomPacketPayload.Type type, - StreamCodec codec, - Consumer handlerSupplier - ) { - registerS2C(type, codec, () -> handlerSupplier); - } - - public static void sendS2C(ServerPlayer player, CustomPacketPayload payload) { - Platform.INSTANCE.sendToPlayer(player, payload); - } - - /* ---------------- TYPES ---------------- */ - - public record C2SRegistration( - CustomPacketPayload.Type type, - StreamCodec codec, - Supplier> handlerSupplier - ) { - } - - public record S2CRegistration( - CustomPacketPayload.Type type, - StreamCodec codec, - Supplier> handlerSupplier - ) { - } + private static final List> C2S = new ArrayList<>(); + private static final List> S2C = new ArrayList<>(); + + private NetworkManager() {} + + /** + * Registers a client-to-server packet (C2S) with a lazily-supplied handler. + * + * @param type The {@link CustomPacketPayload.Type} of the packet. + * @param codec The {@link StreamCodec} used to serialize and deserialize the packet. + * @param handlerSupplier A {@link Supplier} of a {@link BiConsumer} handling the packet + * on the server. The BiConsumer receives the packet and the sending {@link ServerPlayer}. + * @param The type of the packet. + */ + public static void registerC2S( + CustomPacketPayload.Type type, + StreamCodec codec, + Supplier> handlerSupplier + ) { + C2SRegistration reg = new C2SRegistration<>(type, codec, handlerSupplier); + C2S.add(reg); + Platform.INSTANCE.registerC2S(reg); + } + + /** + * Registers a client-to-server packet (C2S) with a direct handler. + *

+ * This is a convenience overload of {@link #registerC2S(CustomPacketPayload.Type, StreamCodec, Supplier)}. + */ + public static void registerC2S( + CustomPacketPayload.Type type, + StreamCodec codec, + BiConsumer handlerSupplier + ) { + registerC2S(type, codec, () -> handlerSupplier); + } + + /** + * Sends a packet from the client to the server. + * + * @param payload The {@link CustomPacketPayload} to send. + */ + public static void sendC2S(CustomPacketPayload payload) { + Platform.INSTANCE.sendToServer(payload); + } + + /** + * Registers a server-to-client packet (S2C) with a lazily-supplied handler. + * + * @param type The {@link CustomPacketPayload.Type} of the packet. + * @param codec The {@link StreamCodec} used to serialize and deserialize the packet. + * @param handlerSupplier A {@link Supplier} of a {@link Consumer} handling the packet + * on the client. + * @param The type of the packet. + */ + public static void registerS2C( + CustomPacketPayload.Type type, + StreamCodec codec, + Supplier> handlerSupplier + ) { + S2CRegistration reg = new S2CRegistration<>(type, codec, handlerSupplier); + S2C.add(reg); + Platform.INSTANCE.registerS2C(reg); + } + + /** + * Registers a server-to-client packet (S2C) with a direct handler. + *

+ * Convenience overload of {@link #registerS2C(CustomPacketPayload.Type, StreamCodec, Supplier)}. + */ + public static void registerS2C( + CustomPacketPayload.Type type, + StreamCodec codec, + Consumer handlerSupplier + ) { + registerS2C(type, codec, () -> handlerSupplier); + } + + /** + * Sends a packet from the server to a specific player. + * + * @param player The {@link ServerPlayer} to receive the packet. + * @param payload The {@link CustomPacketPayload} to send. + */ + public static void sendS2C(ServerPlayer player, CustomPacketPayload payload) { + Platform.INSTANCE.sendToPlayer(player, payload); + } + + // Represents a registration of a client-to-server packet. + @ApiStatus.Internal + public record C2SRegistration( + CustomPacketPayload.Type type, + StreamCodec codec, + Supplier> handlerSupplier + ) {} + + // Represents a registration of a server-to-client packet. + @ApiStatus.Internal + public record S2CRegistration( + CustomPacketPayload.Type type, + StreamCodec codec, + Supplier> handlerSupplier + ) {} } diff --git a/src/main/java/com/macuguita/lib/network/package-info.java b/src/main/java/com/macuguita/lib/network/package-info.java new file mode 100644 index 0000000..553c257 --- /dev/null +++ b/src/main/java/com/macuguita/lib/network/package-info.java @@ -0,0 +1,24 @@ +/* + * macu_lib + * Copyright (C) 2026 macuguita + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this program; if not, see + * . + * + */ + +@NullMarked +package com.macuguita.lib.network; + +import org.jspecify.annotations.NullMarked; diff --git a/src/main/java/com/macuguita/lib/package-info.java b/src/main/java/com/macuguita/lib/package-info.java index 9b65c9a..71af986 100644 --- a/src/main/java/com/macuguita/lib/package-info.java +++ b/src/main/java/com/macuguita/lib/package-info.java @@ -1,4 +1,24 @@ +/* + * macu_lib + * Copyright (C) 2026 macuguita + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this program; if not, see + * . + * + */ + @NullMarked package com.macuguita.lib; -import org.jspecify.annotations.NullMarked; \ No newline at end of file +import org.jspecify.annotations.NullMarked; diff --git a/src/main/java/com/macuguita/lib/reg/GuitaRegistries.java b/src/main/java/com/macuguita/lib/reg/GuitaRegistries.java index 1b41d38..5914fe6 100644 --- a/src/main/java/com/macuguita/lib/reg/GuitaRegistries.java +++ b/src/main/java/com/macuguita/lib/reg/GuitaRegistries.java @@ -1,15 +1,62 @@ +/* + * macu_lib + * Copyright (C) 2026 macuguita + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this program; if not, see + * . + * + */ + package com.macuguita.lib.reg; import com.macuguita.lib.Platform; - import net.minecraft.core.Registry; +/** + * Utility class for creating and managing {@link GuitaRegistry} instances. + *

+ * Provides methods to create standard or child registries, making it easier + * to group registry entries and integrate with Minecraft registries. + */ public class GuitaRegistries { + /** + * Creates a **child registry** of the given parent {@link GuitaRegistry}. + *

+ * Entries added to this child registry are automatically added to the parent, + * which is useful for logically grouping registry entries without duplicating code. + * + * @param parent The parent {@link GuitaRegistry} to which this child will belong. + * @param The type of entries stored in the registry. + * @return A new {@link GuitaRegistry} instance representing the child registry. + */ public static GuitaRegistry create(GuitaRegistry parent) { return new GuitaRegistryChild<>(parent); } + /** + * Creates a new {@link GuitaRegistry} for a given Minecraft {@link Registry}. + *

+ * This allows mod-specific registries to be created that integrate with + * Minecraft's built-in registries while keeping entries namespaced to the mod. + * + * @param registry The Minecraft {@link Registry} to wrap, e.g., from + * {@link net.minecraft.core.registries.BuiltInRegistries}. + * @param id The namespace of the mod creating this registry. + * @param The type of entries stored in the registry. + * @return A new {@link GuitaRegistry} instance. + */ public static GuitaRegistry create(Registry registry, String id) { return Platform.INSTANCE.createGuitaRegistry(registry, id); } diff --git a/src/main/java/com/macuguita/lib/reg/GuitaRegistry.java b/src/main/java/com/macuguita/lib/reg/GuitaRegistry.java index d7b357c..132ce1f 100644 --- a/src/main/java/com/macuguita/lib/reg/GuitaRegistry.java +++ b/src/main/java/com/macuguita/lib/reg/GuitaRegistry.java @@ -1,3 +1,23 @@ +/* + * macu_lib + * Copyright (C) 2026 macuguita + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this program; if not, see + * . + * + */ + package com.macuguita.lib.reg; import java.util.Collection; @@ -7,24 +27,76 @@ import java.util.stream.Stream; import org.jetbrains.annotations.ApiStatus; import org.jspecify.annotations.Nullable; +/** + * Represents a generic registry for storing and managing objects of type {@code T}. + *

+ * Registries can hold entries that are lazily initialized via {@link Supplier} and can + * be iterated over or streamed. This interface is designed to be used by mod frameworks + * and libraries to organize game objects, items, or other data types. + * + * @param The type of object stored in this registry. + */ @ApiStatus.NonExtendable public interface GuitaRegistry { + /** + * Returns the namespace of this registry, if available. + *

+ * This is typically used to identify the mod or library that owns the registry. + * + * @return The registry namespace, or {@code null} if not set. + */ default @Nullable String namespace() { return null; } + /** + * Registers a new entry in this registry. + *

+ * The entry is associated with the given {@code id} and lazily supplied via + * the provided {@link Supplier}. + * + * @param id The name for this entry (e.g., {@code "item_name"}). + * @param supplier A {@link Supplier} that provides the object when needed. + * @param The type of the entry, which must extend {@code T}. + * @return A {@link GuitaRegistryEntry} representing the newly registered entry. + */ GuitaRegistryEntry register(String id, Supplier supplier); + /** + * Returns a {@link Collection} of all entries in this registry. + * + * @return A collection of {@link GuitaRegistryEntry} objects. + */ Collection> getEntries(); + /** + * Returns a {@link Stream} of all registry entries. + *

+ * This is a convenient method for functional operations on registry entries. + * + * @return A {@link Stream} of {@link GuitaRegistryEntry} objects. + */ default Stream> stream() { return getEntries().stream(); } + /** + * Returns a {@link Stream} of the actual objects bound to the registry entries. + *

+ * This is equivalent to mapping {@link GuitaRegistryEntry#get()} over the registry entries. + * + * @return A {@link Stream} of objects of type {@code T}. + */ default Stream boundStream() { return stream().map(GuitaRegistryEntry::get); } + /** + * Initializes the registry. + *

+ * This method should be called after all entries are registered, and will register + * these items into Minecraft. + */ void init(); } diff --git a/src/main/java/com/macuguita/lib/reg/GuitaRegistryChild.java b/src/main/java/com/macuguita/lib/reg/GuitaRegistryChild.java index b44d024..328e473 100644 --- a/src/main/java/com/macuguita/lib/reg/GuitaRegistryChild.java +++ b/src/main/java/com/macuguita/lib/reg/GuitaRegistryChild.java @@ -1,13 +1,36 @@ +/* + * macu_lib + * Copyright (C) 2026 macuguita + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this program; if not, see + * . + * + */ + package com.macuguita.lib.reg; import java.util.Collection; import java.util.function.Supplier; +import org.jetbrains.annotations.ApiStatus; import org.jspecify.annotations.Nullable; +@ApiStatus.Internal public class GuitaRegistryChild implements GuitaRegistry { - + // Backing parent registry private final GuitaRegistry parent; + // Entries registered in this child private final GuitaRegistryEntries entries = new GuitaRegistryEntries<>(); public GuitaRegistryChild(GuitaRegistry parent) { @@ -31,6 +54,5 @@ public class GuitaRegistryChild implements GuitaRegistry { @Override public void init() { - //NO-OP } } diff --git a/src/main/java/com/macuguita/lib/reg/GuitaRegistryEntries.java b/src/main/java/com/macuguita/lib/reg/GuitaRegistryEntries.java index 2f6543d..a592b34 100644 --- a/src/main/java/com/macuguita/lib/reg/GuitaRegistryEntries.java +++ b/src/main/java/com/macuguita/lib/reg/GuitaRegistryEntries.java @@ -1,12 +1,35 @@ +/* + * macu_lib + * Copyright (C) 2026 macuguita + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this program; if not, see + * . + * + */ + package com.macuguita.lib.reg; import java.util.ArrayList; import java.util.List; import com.google.common.collect.ImmutableList; +import org.jetbrains.annotations.ApiStatus; +@ApiStatus.Internal public class GuitaRegistryEntries { + // Internal list of registry entries private final List> entries = new ArrayList<>(); @SuppressWarnings("unchecked") @@ -18,5 +41,4 @@ public class GuitaRegistryEntries { public List> getEntries() { return ImmutableList.copyOf(entries); } - } diff --git a/src/main/java/com/macuguita/lib/reg/GuitaRegistryEntry.java b/src/main/java/com/macuguita/lib/reg/GuitaRegistryEntry.java index 01a6bf1..c86d0c2 100644 --- a/src/main/java/com/macuguita/lib/reg/GuitaRegistryEntry.java +++ b/src/main/java/com/macuguita/lib/reg/GuitaRegistryEntry.java @@ -1,17 +1,58 @@ +/* + * macu_lib + * Copyright (C) 2026 macuguita + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this program; if not, see + * . + * + */ + package com.macuguita.lib.reg; import java.util.function.Supplier; - import net.minecraft.resources.Identifier; - import org.jetbrains.annotations.ApiStatus; +/** + * Represents a single entry in a {@link GuitaRegistry}. + *

+ * Each entry wraps an object of type {@code T} and provides a unique {@link Identifier}. + * Registry entries are lazily initialized via {@link #get()} and can be used in streams + * or added to other registries. + * + * @param The type of object stored in this registry entry. + */ @ApiStatus.NonExtendable public interface GuitaRegistryEntry extends Supplier { + /** + * Returns the object stored in this registry entry. + *

+ * This may trigger lazy initialization depending on the implementation. + * + * @return The object of type {@code T} contained in this entry. + */ @Override T get(); + /** + * Returns the unique identifier for this registry entry. + *

+ * The identifier is typically namespaced (e.g., {@code "modid:item_name"}) and + * corresponds to the ID used when registering the entry. + * + * @return The {@link Identifier} for this entry. + */ Identifier getId(); - } diff --git a/src/main/java/com/macuguita/lib/reg/package-info.java b/src/main/java/com/macuguita/lib/reg/package-info.java index 7b6cdbf..bb114c8 100644 --- a/src/main/java/com/macuguita/lib/reg/package-info.java +++ b/src/main/java/com/macuguita/lib/reg/package-info.java @@ -1,4 +1,24 @@ +/* + * macu_lib + * Copyright (C) 2026 macuguita + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this program; if not, see + * . + * + */ + @NullMarked package com.macuguita.lib.reg; -import org.jspecify.annotations.NullMarked; \ No newline at end of file +import org.jspecify.annotations.NullMarked; diff --git a/src/main/java/com/macuguita/mixin/PlayerInfoMixin.java b/src/main/java/com/macuguita/mixin/PlayerInfoMixin.java index 6edd3cc..6ae7d74 100644 --- a/src/main/java/com/macuguita/mixin/PlayerInfoMixin.java +++ b/src/main/java/com/macuguita/mixin/PlayerInfoMixin.java @@ -1,3 +1,23 @@ +/* + * macu_lib + * Copyright (C) 2026 macuguita + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this program; if not, see + * . + * + */ + package com.macuguita.mixin; import java.util.UUID; diff --git a/src/main/java/com/macuguita/supporters/CapeManager.java b/src/main/java/com/macuguita/supporters/CapeManager.java index d8b37ad..8fb3998 100644 --- a/src/main/java/com/macuguita/supporters/CapeManager.java +++ b/src/main/java/com/macuguita/supporters/CapeManager.java @@ -1,3 +1,23 @@ +/* + * macu_lib + * Copyright (C) 2026 macuguita + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this program; if not, see + * . + * + */ + package com.macuguita.supporters; import java.util.UUID; diff --git a/src/main/java/com/macuguita/supporters/CapeUtil.java b/src/main/java/com/macuguita/supporters/CapeUtil.java index 6144996..8e68a48 100644 --- a/src/main/java/com/macuguita/supporters/CapeUtil.java +++ b/src/main/java/com/macuguita/supporters/CapeUtil.java @@ -1,3 +1,23 @@ +/* + * macu_lib + * Copyright (C) 2026 macuguita + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this program; if not, see + * . + * + */ + package com.macuguita.supporters; import java.io.InputStream; diff --git a/src/main/java/com/macuguita/supporters/RoleChecker.java b/src/main/java/com/macuguita/supporters/RoleChecker.java index 3ae34b5..c71728d 100644 --- a/src/main/java/com/macuguita/supporters/RoleChecker.java +++ b/src/main/java/com/macuguita/supporters/RoleChecker.java @@ -1,3 +1,23 @@ +/* + * macu_lib + * Copyright (C) 2026 macuguita + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this program; if not, see + * . + * + */ + package com.macuguita.supporters; import java.io.BufferedReader; diff --git a/src/main/java/com/macuguita/supporters/package-info.java b/src/main/java/com/macuguita/supporters/package-info.java index 9d9e1cb..81082f8 100644 --- a/src/main/java/com/macuguita/supporters/package-info.java +++ b/src/main/java/com/macuguita/supporters/package-info.java @@ -1,4 +1,24 @@ +/* + * macu_lib + * Copyright (C) 2026 macuguita + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this program; if not, see + * . + * + */ + @NullMarked package com.macuguita.supporters; -import org.jspecify.annotations.NullMarked; \ No newline at end of file +import org.jspecify.annotations.NullMarked; diff --git a/src/testmod/java/com/macuguita/libtest/PingC2SPacket.java b/src/testmod/java/com/macuguita/libtest/PingC2SPacket.java index dd09225..3bf779f 100644 --- a/src/testmod/java/com/macuguita/libtest/PingC2SPacket.java +++ b/src/testmod/java/com/macuguita/libtest/PingC2SPacket.java @@ -1,3 +1,23 @@ +/* + * macu_lib + * Copyright (C) 2026 macuguita + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this program; if not, see + * . + * + */ + package com.macuguita.libtest; import net.minecraft.network.RegistryFriendlyByteBuf; diff --git a/src/testmod/java/com/macuguita/libtest/PingS2CPacket.java b/src/testmod/java/com/macuguita/libtest/PingS2CPacket.java index 14fdeea..0da1b9e 100644 --- a/src/testmod/java/com/macuguita/libtest/PingS2CPacket.java +++ b/src/testmod/java/com/macuguita/libtest/PingS2CPacket.java @@ -1,3 +1,23 @@ +/* + * macu_lib + * Copyright (C) 2026 macuguita + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this program; if not, see + * . + * + */ + package com.macuguita.libtest; import net.minecraft.network.RegistryFriendlyByteBuf; diff --git a/src/testmod/java/com/macuguita/libtest/TestMod.java b/src/testmod/java/com/macuguita/libtest/TestMod.java index 35417c6..11de365 100644 --- a/src/testmod/java/com/macuguita/libtest/TestMod.java +++ b/src/testmod/java/com/macuguita/libtest/TestMod.java @@ -1,3 +1,23 @@ +/* + * macu_lib + * Copyright (C) 2026 macuguita + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this program; if not, see + * . + * + */ + package com.macuguita.libtest; import com.macuguita.lib.network.NetworkManager; diff --git a/src/testmod/java/com/macuguita/libtest/client/TestModClient.java b/src/testmod/java/com/macuguita/libtest/client/TestModClient.java index 6fd3b34..39ddef9 100644 --- a/src/testmod/java/com/macuguita/libtest/client/TestModClient.java +++ b/src/testmod/java/com/macuguita/libtest/client/TestModClient.java @@ -1,3 +1,23 @@ +/* + * macu_lib + * Copyright (C) 2026 macuguita + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this program; if not, see + * . + * + */ + package com.macuguita.libtest.client; import com.macuguita.lib.network.NetworkManager; diff --git a/src/testmod/java/com/macuguita/libtest/fabric/FabricClientEntrypoint.java b/src/testmod/java/com/macuguita/libtest/fabric/FabricClientEntrypoint.java index 0106792..cc46cf3 100644 --- a/src/testmod/java/com/macuguita/libtest/fabric/FabricClientEntrypoint.java +++ b/src/testmod/java/com/macuguita/libtest/fabric/FabricClientEntrypoint.java @@ -1,3 +1,23 @@ +/* + * macu_lib + * Copyright (C) 2026 macuguita + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this program; if not, see + * . + * + */ + package com.macuguita.libtest.fabric; //? fabric { @@ -10,4 +30,4 @@ public class FabricClientEntrypoint implements ClientModInitializer { TestModClient.init(); } } -//?} \ No newline at end of file +//?} diff --git a/src/testmod/java/com/macuguita/libtest/fabric/FabricEntrypoint.java b/src/testmod/java/com/macuguita/libtest/fabric/FabricEntrypoint.java index c8c9e1c..ccc5f0f 100644 --- a/src/testmod/java/com/macuguita/libtest/fabric/FabricEntrypoint.java +++ b/src/testmod/java/com/macuguita/libtest/fabric/FabricEntrypoint.java @@ -1,3 +1,23 @@ +/* + * macu_lib + * Copyright (C) 2026 macuguita + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this program; if not, see + * . + * + */ + package com.macuguita.libtest.fabric; //? fabric { @@ -10,4 +30,4 @@ public class FabricEntrypoint implements ModInitializer { TestMod.init(); } } -//?} \ No newline at end of file +//?} diff --git a/src/testmod/java/com/macuguita/libtest/fabric/package-info.java b/src/testmod/java/com/macuguita/libtest/fabric/package-info.java index 91e303f..454c6b9 100644 --- a/src/testmod/java/com/macuguita/libtest/fabric/package-info.java +++ b/src/testmod/java/com/macuguita/libtest/fabric/package-info.java @@ -1,4 +1,24 @@ +/* + * macu_lib + * Copyright (C) 2026 macuguita + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this program; if not, see + * . + * + */ + @NullMarked package com.macuguita.libtest.fabric; -import org.jspecify.annotations.NullMarked; \ No newline at end of file +import org.jspecify.annotations.NullMarked; diff --git a/src/testmod/java/com/macuguita/libtest/neoforge/NeoforgeEntrypoint.java b/src/testmod/java/com/macuguita/libtest/neoforge/NeoforgeEntrypoint.java index 185919d..5e54636 100644 --- a/src/testmod/java/com/macuguita/libtest/neoforge/NeoforgeEntrypoint.java +++ b/src/testmod/java/com/macuguita/libtest/neoforge/NeoforgeEntrypoint.java @@ -1,3 +1,23 @@ +/* + * macu_lib + * Copyright (C) 2026 macuguita + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this program; if not, see + * . + * + */ + package com.macuguita.libtest.neoforge; //? neoforge { diff --git a/src/testmod/java/com/macuguita/libtest/neoforge/package-info.java b/src/testmod/java/com/macuguita/libtest/neoforge/package-info.java index 1b161d1..e1992e7 100644 --- a/src/testmod/java/com/macuguita/libtest/neoforge/package-info.java +++ b/src/testmod/java/com/macuguita/libtest/neoforge/package-info.java @@ -1,4 +1,24 @@ +/* + * macu_lib + * Copyright (C) 2026 macuguita + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this program; if not, see + * . + * + */ + @NullMarked package com.macuguita.libtest.neoforge; -import org.jspecify.annotations.NullMarked; \ No newline at end of file +import org.jspecify.annotations.NullMarked; diff --git a/src/testmod/java/com/macuguita/libtest/package-info.java b/src/testmod/java/com/macuguita/libtest/package-info.java index 0fea10b..d0fc611 100644 --- a/src/testmod/java/com/macuguita/libtest/package-info.java +++ b/src/testmod/java/com/macuguita/libtest/package-info.java @@ -1,4 +1,24 @@ +/* + * macu_lib + * Copyright (C) 2026 macuguita + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this program; if not, see + * . + * + */ + @NullMarked package com.macuguita.libtest; -import org.jspecify.annotations.NullMarked; \ No newline at end of file +import org.jspecify.annotations.NullMarked; diff --git a/versions/26.1-neoforge/gradle.properties b/versions/26.1-neoforge/gradle.properties index 54a980d..0f4ff31 100644 --- a/versions/26.1-neoforge/gradle.properties +++ b/versions/26.1-neoforge/gradle.properties @@ -1,9 +1,9 @@ -deps.minecraft=26.1-snapshot-1 -deps.neoforge=26.1.0.0-alpha.4+snapshot-1 +deps.minecraft=26.1-snapshot-2 +deps.neoforge=26.1.0.0-alpha.5+snapshot-2 #deps.parchment=1.21.10:2025.10.12 #publish.additionalVersions=1.21.9 mod.mc_dep_forgelike=[1.21.11, ] #deps.yacl=3.8.0+1.21.9 -#deps.mcqoy=yHGo6VsD \ No newline at end of file +#deps.mcqoy=yHGo6VsD -- knotmirror 0.0.1