Skip to content

Commit

Permalink
Fix git ignore
Browse files Browse the repository at this point in the history
  • Loading branch information
GT3CH1 committed Apr 10, 2024
1 parent 54aedb4 commit 03e5c7b
Show file tree
Hide file tree
Showing 15 changed files with 2,148 additions and 3 deletions.
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,5 @@ bin/
# fabric

run/

.factorypath
**/mod/**

gemclient-core/src/main/kotlin/com/peasenet/main/Mods.kt
100 changes: 100 additions & 0 deletions src/main/java/com/peasenet/gui/mod/GuiMod.java
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;

}
}
45 changes: 45 additions & 0 deletions src/main/kotlin/com/peasenet/gui/mod/GuiCombat.kt
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
)
35 changes: 35 additions & 0 deletions src/main/kotlin/com/peasenet/gui/mod/GuiESP.kt
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)
35 changes: 35 additions & 0 deletions src/main/kotlin/com/peasenet/gui/mod/GuiMisc.kt
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)
Loading

0 comments on commit 03e5c7b

Please sign in to comment.