-
Notifications
You must be signed in to change notification settings - Fork 6
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
Showing
6 changed files
with
105 additions
and
51 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
23 changes: 17 additions & 6 deletions
23
src/main/java/dev/enjarai/minitardis/component/TardisControl.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
24 changes: 24 additions & 0 deletions
24
src/main/java/dev/enjarai/minitardis/component/screen/ScreenApp.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,24 @@ | ||
package dev.enjarai.minitardis.component.screen; | ||
|
||
import com.mojang.serialization.Codec; | ||
import eu.pb4.mapcanvas.api.core.DrawableCanvas; | ||
import net.minecraft.util.Identifier; | ||
|
||
import java.util.Map; | ||
import java.util.function.Supplier; | ||
|
||
public interface ScreenApp { | ||
Map<Identifier, Codec<? extends ScreenApp>> ALL = Map.of( | ||
|
||
); | ||
Map<Identifier, Supplier<? extends ScreenApp>> CONSTRUCTORS = Map.of( | ||
|
||
); | ||
Codec<ScreenApp> CODEC = Identifier.CODEC.dispatch(ScreenApp::id, ALL::get); | ||
|
||
void draw(DrawableCanvas canvas); | ||
|
||
boolean onClick(int x, int y); | ||
|
||
Identifier id(); | ||
} |
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