-
Notifications
You must be signed in to change notification settings - Fork 17
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
1 parent
5fb3f01
commit 3ee6633
Showing
14 changed files
with
128 additions
and
112 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
plugins { | ||
id "java" | ||
id "eclipse" | ||
id "maven-publish" | ||
} | ||
|
||
sourceCompatibility = targetCompatibility = 1.8 | ||
compileJava { | ||
sourceCompatibility = targetCompatibility = 1.8 | ||
} |
40 changes: 40 additions & 0 deletions
40
common/src/main/java/io/github/zekerzhayard/forgewrapper/util/CheckedLambdaUtil.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,40 @@ | ||
package io.github.zekerzhayard.forgewrapper.util; | ||
|
||
import java.util.function.BiConsumer; | ||
import java.util.function.Consumer; | ||
|
||
public class CheckedLambdaUtil { | ||
public static <T> Consumer<T> wrapConsumer(CheckedConsumer<T> consumer) { | ||
return consumer; | ||
} | ||
|
||
public static <T, U> BiConsumer<T, U> wrapBiConsumer(CheckedBiConsumer<T, U> biconsumer) { | ||
return biconsumer; | ||
} | ||
|
||
public interface CheckedConsumer<T> extends Consumer<T> { | ||
void checkedAccept(T t) throws Throwable; | ||
|
||
@Override | ||
default void accept(T t) { | ||
try { | ||
this.checkedAccept(t); | ||
} catch (Throwable th) { | ||
throw new RuntimeException(th); | ||
} | ||
} | ||
} | ||
|
||
public interface CheckedBiConsumer<T, U> extends BiConsumer<T, U> { | ||
void checkedAccept(T t, U u) throws Throwable; | ||
|
||
@Override | ||
default void accept(T t, U u) { | ||
try { | ||
this.checkedAccept(t, u); | ||
} catch (Throwable th) { | ||
throw new RuntimeException(th); | ||
} | ||
} | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
|
||
org.gradle.daemon = false | ||
|
||
fw_version = 1.5.1 | ||
fw_version = 1.5.2 |
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 |
---|---|---|
|
@@ -26,3 +26,7 @@ configurations { | |
} | ||
} | ||
} | ||
|
||
dependencies { | ||
compileOnly project(":common") | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
rootProject.name = 'ForgeWrapper' | ||
|
||
include 'common' | ||
include 'converter' | ||
include 'jigsaw' | ||
include 'legacy' |
Oops, something went wrong.