This repository has been archived by the owner on Jun 3, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add the patchwork-god-classes module (#127)
* Add the patchwork-event-dispatcher module * patchwork-event-dispatcher -> patchwork-god-classes
- Loading branch information
Showing
9 changed files
with
152 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# patchwork-god-classes | ||
|
||
Implementation of ForgeHooks, ForgeHooksClient, ForgeEventFactory, and BasicEventHooks that dispatches to different patchwork modules. | ||
|
||
## Reasoning | ||
|
||
Forge uses these classes from inside their patches in order to keep the size of their patches down. | ||
Patchwork keeps its hooks seperated between modules, however, some mods also use these classes. | ||
Therefore, this module exists to dispatch calls to these classes to the disperate modules that actually implement the relevant methods. | ||
|
||
## TODO | ||
* Implement the methods on these classes that are actually already implemented in Patchwork. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
archivesBaseName = "patchwork-god-classes" | ||
version = getSubprojectVersion(project, "0.1.0") | ||
|
||
dependencies { | ||
compile project(path: ':patchwork-fml', configuration: 'dev') | ||
} |
27 changes: 27 additions & 0 deletions
27
patchwork-god-classes/src/main/java/net/minecraftforge/client/ForgeHooksClient.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* | ||
* Minecraft Forge, Patchwork Project | ||
* Copyright (c) 2016-2020, 2019-2020 | ||
* | ||
* This library 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 version 2.1 | ||
* of the License. | ||
* | ||
* This library 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 library; if not, write to the Free Software | ||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||
*/ | ||
|
||
package net.minecraftforge.client; | ||
|
||
/* | ||
* Note: this class is intended for mod use only, to dispatch to the implementations kept in their own modules. | ||
* Do not keep implementation details here, methods should be thin wrappers around methods in other modules. | ||
*/ | ||
public class ForgeHooksClient { | ||
} |
27 changes: 27 additions & 0 deletions
27
patchwork-god-classes/src/main/java/net/minecraftforge/common/ForgeHooks.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* | ||
* Minecraft Forge, Patchwork Project | ||
* Copyright (c) 2016-2020, 2019-2020 | ||
* | ||
* This library 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 version 2.1 | ||
* of the License. | ||
* | ||
* This library 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 library; if not, write to the Free Software | ||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||
*/ | ||
|
||
package net.minecraftforge.common; | ||
|
||
/* | ||
* Note: this class is intended for mod use only, to dispatch to the implementations kept in their own modules. | ||
* Do not keep implementation details here, methods should be thin wrappers around methods in other modules. | ||
*/ | ||
public class ForgeHooks { | ||
} |
27 changes: 27 additions & 0 deletions
27
patchwork-god-classes/src/main/java/net/minecraftforge/event/ForgeEventFactory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* | ||
* Minecraft Forge, Patchwork Project | ||
* Copyright (c) 2016-2020, 2019-2020 | ||
* | ||
* This library 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 version 2.1 | ||
* of the License. | ||
* | ||
* This library 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 library; if not, write to the Free Software | ||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||
*/ | ||
|
||
package net.minecraftforge.event; | ||
|
||
/* | ||
* Note: this class is intended for mod use only, to dispatch to the implementations kept in their own modules. | ||
* Do not keep implementation details here, methods should be thin wrappers around methods in other modules. | ||
*/ | ||
public class ForgeEventFactory { | ||
} |
27 changes: 27 additions & 0 deletions
27
patchwork-god-classes/src/main/java/net/minecraftforge/fml/hooks/BasicEventHooks.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* | ||
* Minecraft Forge, Patchwork Project | ||
* Copyright (c) 2016-2020, 2019-2020 | ||
* | ||
* This library 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 version 2.1 | ||
* of the License. | ||
* | ||
* This library 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 library; if not, write to the Free Software | ||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||
*/ | ||
|
||
package net.minecraftforge.fml.hooks; | ||
|
||
/* | ||
* Note: this class is intended for mod use only, to dispatch to the implementations kept in their own modules. | ||
* Do not keep implementation details here, methods should be thin wrappers around methods in other modules. | ||
*/ | ||
public class BasicEventHooks { | ||
} |
Binary file added
BIN
+22.2 KB
patchwork-god-classes/src/main/resources/assets.patchwork-god-classes/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"schemaVersion": 1, | ||
"id": "patchwork-god-classes", | ||
"name": "Patchwork God Classes", | ||
"version": "${version}", | ||
"description": "Implements ForgeHooks, ForgeEventFactory, and more.", | ||
"environment": "*", | ||
"license": "LGPL-2.1-only", | ||
"icon": "assets/patchwork-god-classes/icon.png", | ||
"contact": { | ||
"issues": "https://github.com/PatchworkMC/patchwork-api/issues", | ||
"sources": "https://github.com/PatchworkMC/patchwork-api" | ||
}, | ||
"authors": [ | ||
"PatchworkMC" | ||
], | ||
"depends": { | ||
"fabricloader": ">=0.8.4", | ||
"patchwork-fml": "*" | ||
}, | ||
"custom": { | ||
"modmenu:api": true, | ||
"modmenu:parent": "patchwork" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters