1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2025-10-30 13:13:00 +00:00

Java 8. Java 8. Does whatever Java 8 can.

Default methods, everywhere.
Arrow types, switch on strings.
Lambdas!
Here comes Java 8.
This commit is contained in:
SquidDev
2017-06-12 21:08:35 +01:00
parent 08099f08f2
commit d29ffed383
76 changed files with 747 additions and 665 deletions

View File

@@ -74,7 +74,9 @@ public interface IPocketUpgrade
* @param peripheral The peripheral for this upgrade.
* @see #createPeripheral(IPocketAccess)
*/
void update( @Nonnull IPocketAccess access, @Nullable IPeripheral peripheral );
default void update( @Nonnull IPocketAccess access, @Nullable IPeripheral peripheral )
{
}
/**
* Called when the pocket computer is right clicked.
@@ -87,5 +89,8 @@ public interface IPocketUpgrade
* access the GUI.
* @see #createPeripheral(IPocketAccess)
*/
boolean onRightClick( @Nonnull World world, @Nonnull IPocketAccess access, @Nullable IPeripheral peripheral );
default boolean onRightClick( @Nonnull World world, @Nonnull IPocketAccess access, @Nullable IPeripheral peripheral )
{
return false;
}
}