Skip to content

Commit 5683822

Browse files
committed
Initial Commit
0 parents  commit 5683822

File tree

11 files changed

+369
-0
lines changed

11 files changed

+369
-0
lines changed

.gitignore

Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
# User-specific stuff
2+
.idea/
3+
4+
*.iml
5+
*.ipr
6+
*.iws
7+
8+
# IntelliJ
9+
out/
10+
# mpeltonen/sbt-idea plugin
11+
.idea_modules/
12+
13+
# JIRA plugin
14+
atlassian-ide-plugin.xml
15+
16+
# Compiled class file
17+
*.class
18+
19+
# Log file
20+
*.log
21+
22+
# BlueJ files
23+
*.ctxt
24+
25+
# Package Files #
26+
*.jar
27+
*.war
28+
*.nar
29+
*.ear
30+
*.zip
31+
*.tar.gz
32+
*.rar
33+
34+
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
35+
hs_err_pid*
36+
37+
*~
38+
39+
# temporary files which can be created if a process still has a handle open of a deleted file
40+
.fuse_hidden*
41+
42+
# KDE directory preferences
43+
.directory
44+
45+
# Linux trash folder which might appear on any partition or disk
46+
.Trash-*
47+
48+
# .nfs files are created when an open file is removed but is still being accessed
49+
.nfs*
50+
51+
# General
52+
.DS_Store
53+
.AppleDouble
54+
.LSOverride
55+
56+
# Icon must end with two \r
57+
Icon
58+
59+
# Thumbnails
60+
._*
61+
62+
# Files that might appear in the root of a volume
63+
.DocumentRevisions-V100
64+
.fseventsd
65+
.Spotlight-V100
66+
.TemporaryItems
67+
.Trashes
68+
.VolumeIcon.icns
69+
.com.apple.timemachine.donotpresent
70+
71+
# Directories potentially created on remote AFP share
72+
.AppleDB
73+
.AppleDesktop
74+
Network Trash Folder
75+
Temporary Items
76+
.apdisk
77+
78+
# Windows thumbnail cache files
79+
Thumbs.db
80+
Thumbs.db:encryptable
81+
ehthumbs.db
82+
ehthumbs_vista.db
83+
84+
# Dump file
85+
*.stackdump
86+
87+
# Folder config file
88+
[Dd]esktop.ini
89+
90+
# Recycle Bin used on file shares
91+
$RECYCLE.BIN/
92+
93+
# Windows Installer files
94+
*.cab
95+
*.msi
96+
*.msix
97+
*.msm
98+
*.msp
99+
100+
# Windows shortcuts
101+
*.lnk
102+
103+
.gradle
104+
build/
105+
106+
# Ignore Gradle GUI config
107+
gradle-app.setting
108+
109+
# Cache of project
110+
.gradletasknamecache
111+
112+
**/build/
113+
114+
# Common working directory
115+
run/
116+
117+
# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
118+
!gradle-wrapper.jar

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2023 Erdragh
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in
13+
all copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
THE SOFTWARE.

build.gradle

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
plugins {
2+
id 'fabric-loom' version '1.1-SNAPSHOT'
3+
id 'maven-publish'
4+
}
5+
6+
version = project.mod_version
7+
group = project.maven_group
8+
9+
repositories {
10+
maven {
11+
url "https://cursemaven.com"
12+
content {
13+
includeGroup "curse.maven"
14+
}
15+
}
16+
maven { url "https://maven.shedaniel.me/" }
17+
maven { url "https://maven.terraformersmc.com/releases/" }
18+
}
19+
20+
dependencies {
21+
// To change the versions see the gradle.properties file
22+
minecraft "com.mojang:minecraft:${project.minecraft_version}"
23+
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
24+
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
25+
26+
// Fabric API. This is technically optional, but you probably want it anyway.
27+
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
28+
29+
modImplementation "curse.maven:ad_astra-635042:4390099"
30+
modImplementation "curse.maven:cloth_config-348521:3972425"
31+
modImplementation "curse.maven:tech_reborn-233564:4145507"
32+
modImplementation "curse.maven:reborn_core-237903:4145508"
33+
34+
modImplementation('teamreborn:energy:2.3.0')
35+
}
36+
37+
processResources {
38+
inputs.property "version", project.version
39+
filteringCharset "UTF-8"
40+
41+
filesMatching("fabric.mod.json") {
42+
expand "version": project.version
43+
}
44+
}
45+
46+
def targetJavaVersion = 17
47+
tasks.withType(JavaCompile).configureEach {
48+
// ensure that the encoding is set to UTF-8, no matter what the system default is
49+
// this fixes some edge cases with special characters not displaying correctly
50+
// see http://yodaconditions.net/blog/fix-for-java-file-encoding-problems-with-gradle.html
51+
// If Javadoc is generated, this must be specified in that task too.
52+
it.options.encoding = "UTF-8"
53+
if (targetJavaVersion >= 10 || JavaVersion.current().isJava10Compatible()) {
54+
it.options.release = targetJavaVersion
55+
}
56+
}
57+
58+
java {
59+
def javaVersion = JavaVersion.toVersion(targetJavaVersion)
60+
if (JavaVersion.current() < javaVersion) {
61+
toolchain.languageVersion = JavaLanguageVersion.of(targetJavaVersion)
62+
}
63+
archivesBaseName = project.archives_base_name
64+
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
65+
// if it is present.
66+
// If you remove this line, sources will not be generated.
67+
withSourcesJar()
68+
}
69+
70+
jar {
71+
from("LICENSE") {
72+
rename { "${it}_${project.archivesBaseName}" }
73+
}
74+
}
75+
76+
// configure the maven publication
77+
publishing {
78+
publications {
79+
mavenJava(MavenPublication) {
80+
from components.java
81+
}
82+
}
83+
84+
// See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing.
85+
repositories {
86+
// Add repositories to publish to here.
87+
// Notice: This block does NOT have the same function as the block in the top level.
88+
// The repositories here will be used for publishing your artifact, not for
89+
// retrieving dependencies.
90+
}
91+
}

gradle.properties

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Done to increase the memory available to gradle.
2+
org.gradle.jvmargs=-Xmx4G
3+
# Fabric Properties
4+
# check these on https://modmuss50.me/fabric.html
5+
minecraft_version=1.18.2
6+
yarn_mappings=1.18.2+build.4
7+
loader_version=0.14.17
8+
# Mod Properties
9+
mod_version=1.0-SNAPSHOT
10+
maven_group=com.github.erdragh
11+
archives_base_name=jet_suit_additions
12+
# Dependencies
13+
# check this on https://modmuss50.me/fabric.html
14+
fabric_version=0.75.1+1.18.2
15+
16+
ad_astra_version=1.0.6
17+
18+
# Dependencies
19+
modmenu_version=3.2.5
20+
cloth_config_version=6.4.90
21+
emi_version = 0.3.4+1.18.2
22+
rei_version=8.3.588
23+
techreborn_energy_version=2.2.0
24+
patchouli_version=1.18.2-71.1-FABRIC
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip

settings.gradle

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
pluginManagement {
2+
repositories {
3+
maven {
4+
name = 'Fabric'
5+
url = 'https://maven.fabricmc.net/'
6+
}
7+
gradlePluginPortal()
8+
}
9+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
package com.github.erdragh.jet_suit_additions;
2+
3+
import net.fabricmc.api.ModInitializer;
4+
5+
public class JetSuitAdditions implements ModInitializer {
6+
7+
public static final String MODID = "jet_suit_additions";
8+
9+
@java.lang.Override
10+
public void onInitialize() {
11+
}
12+
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
package com.github.erdragh.jet_suit_additions.client;
2+
3+
import com.github.erdragh.jet_suit_additions.JetSuitAdditions;
4+
import net.fabricmc.api.ClientModInitializer;
5+
import net.fabricmc.api.EnvType;
6+
import net.fabricmc.api.Environment;
7+
import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientTickEvents;
8+
import net.fabricmc.fabric.api.client.keybinding.v1.KeyBindingHelper;
9+
import net.minecraft.client.option.KeyBinding;
10+
import net.minecraft.client.util.InputUtil;
11+
import net.minecraft.text.Text;
12+
import org.lwjgl.glfw.GLFW;
13+
14+
@Environment(EnvType.CLIENT)
15+
public class JetSuitAdditionsClient implements ClientModInitializer {
16+
17+
public static final String KEY_CATEGORY = JetSuitAdditions.MODID + ".key_category";
18+
19+
public static KeyBinding jetSuitToggle;
20+
21+
@Override
22+
public void onInitializeClient() {
23+
jetSuitToggle = KeyBindingHelper.registerKeyBinding(new KeyBinding(JetSuitAdditions.MODID + ".key.toggle_jet_suit", InputUtil.Type.KEYSYM, GLFW.GLFW_KEY_COMMA, KEY_CATEGORY));
24+
25+
ClientTickEvents.END_CLIENT_TICK.register(client -> {
26+
while (jetSuitToggle.wasPressed()) {
27+
client.player.sendMessage(Text.of("FUCK"), false);
28+
}
29+
});
30+
}
31+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
package com.github.erdragh.jet_suit_additions.mixin;
2+
3+
import com.github.alexnijjar.ad_astra.items.armour.JetSuit;
4+
import net.minecraft.entity.player.PlayerEntity;
5+
import net.minecraft.item.ItemStack;
6+
import org.spongepowered.asm.mixin.Mixin;
7+
import org.spongepowered.asm.mixin.injection.At;
8+
import org.spongepowered.asm.mixin.injection.Inject;
9+
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
10+
11+
@Mixin(JetSuit.class)
12+
public class JetSuitMixin {
13+
@Inject(at = @At("HEAD"), method = "fly", cancellable = true)
14+
public void fly(PlayerEntity player, ItemStack stack, CallbackInfo ci) {
15+
System.out.println("Jet Suit Fly");
16+
ci.cancel();
17+
}
18+
}

src/main/resources/fabric.mod.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"schemaVersion": 1,
3+
"id": "jet_suit_additions",
4+
"version": "${version}",
5+
"name": "Jet Suit Additions",
6+
"description": "Custom Additions to the Jet Suit from Ad Astra.",
7+
"authors": [
8+
"Erdragh"
9+
],
10+
"contact": {},
11+
"license": "MIT",
12+
"icon": "assets/jet_suit_additions/icon.png",
13+
"environment": "*",
14+
"entrypoints": {
15+
"client": [
16+
"com.github.erdragh.jet_suit_additions.client.JetSuitAdditionsClient"
17+
],
18+
"main": [
19+
"com.github.erdragh.jet_suit_additions.JetSuitAdditions"
20+
]
21+
},
22+
"mixins": [
23+
"jet_suit_additions.mixins.json"
24+
],
25+
"depends": {
26+
"fabricloader": ">=0.14.17",
27+
"fabric": "*",
28+
"minecraft": "1.18.2"
29+
}
30+
}

0 commit comments

Comments
 (0)