generated from TeamGensouSpark/LunarCapitalFramework
-
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.
🐛 Fix Sometime will not drop power normally
- Loading branch information
Showing
5 changed files
with
135 additions
and
7 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,91 @@ | ||
{ | ||
// 使用 IntelliSense 了解相关属性。 | ||
// 悬停以查看现有属性的描述。 | ||
// 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"type": "java", | ||
"name": "Current File", | ||
"request": "launch", | ||
"mainClass": "${file}" | ||
}, | ||
{ | ||
"type": "java", | ||
"name": "GradleStart", | ||
"request": "launch", | ||
"mainClass": "GradleStart", | ||
"projectName": "kekkai" | ||
}, | ||
{ | ||
"type": "java", | ||
"name": "GradleStartServer", | ||
"request": "launch", | ||
"mainClass": "GradleStartServer", | ||
"projectName": "kekkai" | ||
}, | ||
{ | ||
"type": "java", | ||
"name": "Player", | ||
"request": "launch", | ||
"mainClass": "ibxm.Player", | ||
"projectName": "kekkai" | ||
}, | ||
{ | ||
"type": "java", | ||
"name": "Main", | ||
"request": "launch", | ||
"mainClass": "net.minecraft.client.main.Main", | ||
"projectName": "kekkai" | ||
}, | ||
{ | ||
"type": "java", | ||
"name": "MinecraftServer", | ||
"request": "launch", | ||
"mainClass": "net.minecraft.server.MinecraftServer", | ||
"projectName": "kekkai" | ||
}, | ||
{ | ||
"type": "java", | ||
"name": "AccessTransformer", | ||
"request": "launch", | ||
"mainClass": "net.minecraftforge.fml.common.asm.transformers.AccessTransformer", | ||
"projectName": "kekkai" | ||
}, | ||
{ | ||
"type": "java", | ||
"name": "MarkerTransformer", | ||
"request": "launch", | ||
"mainClass": "net.minecraftforge.fml.common.asm.transformers.MarkerTransformer", | ||
"projectName": "kekkai" | ||
}, | ||
{ | ||
"type": "java", | ||
"name": "GenDiffSet", | ||
"request": "launch", | ||
"mainClass": "net.minecraftforge.fml.common.patcher.GenDiffSet", | ||
"projectName": "kekkai" | ||
}, | ||
{ | ||
"type": "java", | ||
"name": "ServerLaunchWrapper", | ||
"request": "launch", | ||
"mainClass": "net.minecraftforge.fml.relauncher.ServerLaunchWrapper", | ||
"projectName": "kekkai" | ||
}, | ||
{ | ||
"type": "java", | ||
"name": "Delta", | ||
"request": "launch", | ||
"mainClass": "net.minecraftforge.fml.repackage.com.nothome.delta.Delta", | ||
"projectName": "kekkai" | ||
}, | ||
{ | ||
"type": "java", | ||
"name": "GDiffPatcher", | ||
"request": "launch", | ||
"mainClass": "net.minecraftforge.fml.repackage.com.nothome.delta.GDiffPatcher", | ||
"projectName": "kekkai" | ||
} | ||
] | ||
} |
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
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
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
29 changes: 29 additions & 0 deletions
29
src/main/java/io/github/teamgensouspark/kekkai/utils/ModCompat.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,29 @@ | ||
package io.github.teamgensouspark.kekkai.utils; | ||
|
||
import net.minecraftforge.fml.common.Loader; | ||
|
||
public class ModCompat { | ||
public ModResource resource; | ||
private String modid; | ||
|
||
public ModCompat(String modid) { | ||
resource = new ModResource(modid); | ||
this.modid = modid; | ||
} | ||
|
||
public boolean isLoaded() { | ||
return Loader.isModLoaded(modid); | ||
} | ||
|
||
public void ifLoadedThen(Runnable F) { | ||
if (isLoaded()) { | ||
F.run(); | ||
} | ||
} | ||
|
||
public void ifNotLoadedThen(Runnable F) { | ||
if (!isLoaded()) { | ||
F.run(); | ||
} | ||
} | ||
} |