mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-04-05 23:36:12 +00:00
Cleanup sources
This commit is contained in:
@@ -159,10 +159,7 @@ public class B {
|
||||
|
||||
if (bx instanceof Leaves && IrisSettings.get().getGenerator().preventLeafDecay) {
|
||||
((Leaves) bx).setPersistent(true);
|
||||
}
|
||||
|
||||
else if(bx instanceof Leaves)
|
||||
{
|
||||
} else if (bx instanceof Leaves) {
|
||||
((Leaves) bx).setPersistent(false);
|
||||
}
|
||||
|
||||
|
||||
@@ -36,64 +36,44 @@ public class IrisProjectRepo {
|
||||
@Builder.Default
|
||||
private String tag = "";
|
||||
|
||||
public static IrisProjectRepo from(String g)
|
||||
{
|
||||
public static IrisProjectRepo from(String g) {
|
||||
// https://github.com/IrisDimensions/overworld
|
||||
if(g.startsWith("https://github.com/"))
|
||||
{
|
||||
if (g.startsWith("https://github.com/")) {
|
||||
String sub = g.split("\\Qgithub.com/\\E")[1];
|
||||
IrisProjectRepo r = IrisProjectRepo.builder()
|
||||
.user(sub.split("\\Q/\\E")[0])
|
||||
.repo(sub.split("\\Q/\\E")[1]).build();
|
||||
|
||||
if(g.contains("/tree/"))
|
||||
{
|
||||
if (g.contains("/tree/")) {
|
||||
r.setBranch(g.split("/tree/")[1]);
|
||||
}
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
else if(g.contains("/"))
|
||||
{
|
||||
} else if (g.contains("/")) {
|
||||
String[] f = g.split("\\Q/\\E");
|
||||
|
||||
if(f.length == 1)
|
||||
{
|
||||
if (f.length == 1) {
|
||||
return from(g);
|
||||
}
|
||||
|
||||
else if(f.length == 2)
|
||||
{
|
||||
} else if (f.length == 2) {
|
||||
return IrisProjectRepo.builder()
|
||||
.user(f[0])
|
||||
.repo(f[1])
|
||||
.build();
|
||||
}
|
||||
|
||||
else if(f.length >= 3)
|
||||
{
|
||||
} else if (f.length >= 3) {
|
||||
IrisProjectRepo r = IrisProjectRepo.builder()
|
||||
.user(f[0])
|
||||
.repo(f[1])
|
||||
.build();
|
||||
|
||||
if(f[2].startsWith("#"))
|
||||
{
|
||||
if (f[2].startsWith("#")) {
|
||||
r.setTag(f[2].substring(1));
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
} else {
|
||||
r.setBranch(f[2]);
|
||||
}
|
||||
|
||||
return r;
|
||||
}
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
} else {
|
||||
return IrisProjectRepo.builder()
|
||||
.user("IrisDimensions")
|
||||
.repo(g)
|
||||
@@ -104,10 +84,8 @@ public class IrisProjectRepo {
|
||||
return null;
|
||||
}
|
||||
|
||||
public String toURL()
|
||||
{
|
||||
if(!tag.trim().isEmpty())
|
||||
{
|
||||
public String toURL() {
|
||||
if (!tag.trim().isEmpty()) {
|
||||
return "https://codeload.github.com/" + user + "/" + repo + "/zip/refs/tags/" + tag;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user