-
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.
Signed-off-by: XyperCode <xypercode@ultreon.dev>
- Loading branch information
Showing
47 changed files
with
601 additions
and
174 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
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
7 changes: 7 additions & 0 deletions
7
common/src/main/java/dev/ultreon/mods/xinexlib/client/event/ClientEvent.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,7 @@ | ||
package dev.ultreon.mods.xinexlib.client.event; | ||
|
||
import net.minecraft.client.Minecraft; | ||
|
||
public interface ClientEvent { | ||
Minecraft getClient(); | ||
} |
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
13 changes: 13 additions & 0 deletions
13
common/src/main/java/dev/ultreon/mods/xinexlib/client/event/ClientScreenEvent.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,13 @@ | ||
package dev.ultreon.mods.xinexlib.client.event; | ||
|
||
import net.minecraft.client.Minecraft; | ||
import net.minecraft.client.gui.screens.Screen; | ||
|
||
public interface ClientScreenEvent extends ClientEvent { | ||
Screen getScreen(); | ||
|
||
@Override | ||
default Minecraft getClient() { | ||
return Minecraft.getInstance(); | ||
} | ||
} |
37 changes: 37 additions & 0 deletions
37
common/src/main/java/dev/ultreon/mods/xinexlib/client/event/ClientScreenOpenEvent.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,37 @@ | ||
package dev.ultreon.mods.xinexlib.client.event; | ||
|
||
import dev.ultreon.mods.xinexlib.event.CancelableValue; | ||
import dev.ultreon.mods.xinexlib.event.system.Cancelable; | ||
import net.minecraft.client.gui.screens.Screen; | ||
import org.jetbrains.annotations.Nullable; | ||
|
||
public class ClientScreenOpenEvent implements ClientScreenEvent, CancelableValue<Screen> { | ||
private final Screen screen; | ||
private boolean canceled; | ||
private @Nullable Screen nextScreen; | ||
|
||
public ClientScreenOpenEvent(Screen screen) { | ||
this.screen = screen; | ||
} | ||
|
||
@Override | ||
public Screen getScreen() { | ||
return screen; | ||
} | ||
|
||
@Override | ||
public boolean isCanceled() { | ||
return canceled; | ||
} | ||
|
||
@Override | ||
public void cancel(@Nullable Screen value) { | ||
canceled = true; | ||
nextScreen = value; | ||
} | ||
|
||
@Override | ||
public @Nullable Screen get() { | ||
return nextScreen; | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
common/src/main/java/dev/ultreon/mods/xinexlib/client/event/ClientScreenPostInitEvent.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,17 @@ | ||
package dev.ultreon.mods.xinexlib.client.event; | ||
|
||
import net.minecraft.client.gui.screens.Screen; | ||
|
||
|
||
public class ClientScreenPostInitEvent implements ClientScreenEvent { | ||
private final Screen screen; | ||
|
||
public ClientScreenPostInitEvent(Screen screen) { | ||
this.screen = screen; | ||
} | ||
|
||
@Override | ||
public Screen getScreen() { | ||
return screen; | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
common/src/main/java/dev/ultreon/mods/xinexlib/client/event/ClientScreenPreInitEvent.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,17 @@ | ||
package dev.ultreon.mods.xinexlib.client.event; | ||
|
||
import net.minecraft.client.gui.screens.Screen; | ||
|
||
|
||
public class ClientScreenPreInitEvent implements ClientScreenEvent { | ||
private final Screen screen; | ||
|
||
public ClientScreenPreInitEvent(Screen screen) { | ||
this.screen = screen; | ||
} | ||
|
||
@Override | ||
public Screen getScreen() { | ||
return screen; | ||
} | ||
} |
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
4 changes: 2 additions & 2 deletions
4
common/src/main/java/dev/ultreon/mods/xinexlib/dev/DevEntities.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
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
8 changes: 8 additions & 0 deletions
8
common/src/main/java/dev/ultreon/mods/xinexlib/platform/Mod.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,8 @@ | ||
package dev.ultreon.mods.xinexlib.platform; | ||
|
||
public interface Mod { | ||
String getModId(); | ||
String getName(); | ||
String getVersion(); | ||
String getDescription(); | ||
} |
Oops, something went wrong.