-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
2,148 additions
and
3 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 |
---|---|---|
|
@@ -31,8 +31,5 @@ bin/ | |
# fabric | ||
|
||
run/ | ||
|
||
.factorypath | ||
**/mod/** | ||
|
||
gemclient-core/src/main/kotlin/com/peasenet/main/Mods.kt |
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,100 @@ | ||
/* | ||
* Copyright (c) 2022. Gavin Pease and contributors. | ||
* | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and | ||
* associated documentation files (the "Software"), to deal in the Software without restriction, including | ||
* without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies | ||
* of the Software, and to permit persons to whom the Software is furnished to do so, subject to the | ||
* following conditions: | ||
* The above copyright notice and this permission notice shall be included in all copies or substantial | ||
* portions of the Software. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, | ||
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR | ||
* PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE | ||
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT | ||
* OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
* OTHER DEALINGS IN THE SOFTWARE. | ||
*/ | ||
|
||
package com.peasenet.gui.mod; | ||
|
||
import com.peasenet.gavui.GuiScroll; | ||
import com.peasenet.gavui.math.BoxF; | ||
import com.peasenet.gavui.math.PointF; | ||
import com.peasenet.mods.ModCategory; | ||
import net.minecraft.text.Text; | ||
|
||
/** | ||
* A class that allows for the creation of a GuiScroll element given a mod category. | ||
* @author GT3CH1 | ||
* @version 07-17-2023 | ||
*/ | ||
public class GuiMod extends GuiScroll { | ||
|
||
/** | ||
* The position for the GuiScroll element. | ||
*/ | ||
private final PointF position; | ||
|
||
/** | ||
* The width of the GuiScroll element. | ||
*/ | ||
private final int width; | ||
|
||
/** | ||
* The height of the GuiScroll element. | ||
*/ | ||
private final int height; | ||
|
||
/** | ||
* The title of the GuiScroll element. | ||
*/ | ||
private final Text title; | ||
|
||
/** | ||
* The category of the mod(s). | ||
*/ | ||
private final ModCategory category; | ||
|
||
/** | ||
* The maximum number of children for the GuiScroll element to be shown on one page. | ||
*/ | ||
private final int maxChildren; | ||
|
||
/** | ||
* Creates a new GuiScroll element given a position, width, height, title, and category. The maximum number of children is set to 6. | ||
* @param position - The position for the GuiScroll element. | ||
* @param width - The width of the GuiScroll element. | ||
* @param height - The height of the GuiScroll element. | ||
* @param title - The title of the GuiScroll element. | ||
* @param category - The category of the mod(s). | ||
*/ | ||
GuiMod(PointF position, int width, int height, Text title, ModCategory category) { | ||
this(position, width, height, title, category, 6); | ||
} | ||
|
||
|
||
/** | ||
* Creates a new GuiScroll element given a position, width, height, title, category, and maximum number of children. | ||
* @param position - The position for the GuiScroll element. | ||
* @param width - The width of the GuiScroll element. | ||
* @param height - The height of the GuiScroll element. | ||
* @param title - The title of the GuiScroll element. | ||
* @param category - The category of the mod(s). | ||
* @param maxChildren - The maximum number of children for the GuiScroll element to be shown on one page. | ||
*/ | ||
GuiMod(PointF position, int width, int height, Text title, ModCategory category, int maxChildren) { | ||
super(position, width, height, title, maxChildren, ModGuiUtil.getGuiToggleFromCategory( | ||
category, | ||
new BoxF(position, width, height) | ||
)); | ||
this.position = position; | ||
this.width = width; | ||
this.height = height; | ||
this.title = title; | ||
this.category = category; | ||
this.maxChildren = maxChildren; | ||
|
||
} | ||
} |
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,45 @@ | ||
/* | ||
* MIT License | ||
* | ||
* Copyright (c) 2022-2024. | ||
* | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy | ||
* of this software and associated documentation files (the "Software"), to deal | ||
* in the Software without restriction, including without limitation the rights | ||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
* copies of the Software, and to permit persons to whom the Software is | ||
* furnished to do so, subject to the following conditions: | ||
* | ||
* The above copyright notice and this permission notice shall be included in all | ||
* copies or substantial portions of the Software. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
* SOFTWARE. | ||
*/ | ||
package com.peasenet.gui.mod | ||
|
||
import com.peasenet.gavui.math.PointF | ||
import com.peasenet.mods.ModCategory | ||
import net.minecraft.text.Text | ||
|
||
/** | ||
* @author gt3ch1 | ||
* @version 03-02-2023 | ||
* Creates a new gui for combat mods as a dropdown. | ||
*/ | ||
class GuiCombat | ||
( | ||
position: PointF = PointF(100f, 20f), | ||
width: Int = 75, | ||
height: Int = 10, | ||
text: Text = Text.translatable("gavinsmod.gui.combat"), | ||
category: ModCategory = ModCategory.COMBAT, | ||
maxChildren: Int = 4 | ||
) : GuiMod( | ||
position, width, height, text, category, maxChildren | ||
) |
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,35 @@ | ||
/* | ||
* MIT License | ||
* | ||
* Copyright (c) 2022-2024. | ||
* | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy | ||
* of this software and associated documentation files (the "Software"), to deal | ||
* in the Software without restriction, including without limitation the rights | ||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
* copies of the Software, and to permit persons to whom the Software is | ||
* furnished to do so, subject to the following conditions: | ||
* | ||
* The above copyright notice and this permission notice shall be included in all | ||
* copies or substantial portions of the Software. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
* SOFTWARE. | ||
*/ | ||
package com.peasenet.gui.mod | ||
|
||
import com.peasenet.gavui.math.PointF | ||
import com.peasenet.mods.ModCategory | ||
import net.minecraft.text.Text | ||
|
||
/** | ||
* @author gt3ch1 | ||
* @version 03-02-2023 | ||
* Creates a new gui for ESP mods as a drop-down. | ||
*/ | ||
class GuiESP : GuiMod(PointF(10f, 120f), 100, 10, Text.translatable("gavinsmod.gui.esps"), ModCategory.ESP) |
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,35 @@ | ||
/* | ||
* MIT License | ||
* | ||
* Copyright (c) 2022-2024. | ||
* | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy | ||
* of this software and associated documentation files (the "Software"), to deal | ||
* in the Software without restriction, including without limitation the rights | ||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
* copies of the Software, and to permit persons to whom the Software is | ||
* furnished to do so, subject to the following conditions: | ||
* | ||
* The above copyright notice and this permission notice shall be included in all | ||
* copies or substantial portions of the Software. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
* SOFTWARE. | ||
*/ | ||
package com.peasenet.gui.mod | ||
|
||
import com.peasenet.gavui.math.PointF | ||
import com.peasenet.mods.ModCategory | ||
import net.minecraft.text.Text | ||
|
||
/** | ||
* @author gt3ch1 | ||
* @version 03-02-2023 | ||
* Creates a new gui for miscellaneous mods as a dropdown. | ||
*/ | ||
class GuiMisc : GuiMod(PointF(180f, 20f), 95, 10, Text.translatable("gavinsmod.gui.misc"), ModCategory.MISC, 4) |
Oops, something went wrong.