-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add argument for aptitudes command, titles prefix, kubejs new e…
…vent. fix: scholar skill not disabling correctly, convergence item list performance issues.
- Loading branch information
Showing
16 changed files
with
179 additions
and
12 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
1.1.2 | ||
1.1.3 |
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
21 changes: 21 additions & 0 deletions
21
src/main/java/com/seniors/justlevelingfork/integration/KubeJSIntegration.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,21 @@ | ||
package com.seniors.justlevelingfork.integration; | ||
|
||
import com.seniors.justlevelingfork.kubejs.events.CustomEvents; | ||
import com.seniors.justlevelingfork.kubejs.events.LevelUpEvent; | ||
import com.seniors.justlevelingfork.registry.aptitude.Aptitude; | ||
import net.minecraft.world.entity.player.Player; | ||
import net.minecraftforge.fml.ModList; | ||
|
||
public class KubeJSIntegration { | ||
|
||
public static boolean isModLoaded() { | ||
return ModList.get().isLoaded("kubejs"); | ||
} | ||
|
||
public static boolean postLevelUpEvent(Player player, Aptitude aptitude) { | ||
LevelUpEvent event = new LevelUpEvent(player, aptitude); | ||
CustomEvents.APTITUDE_LEVELUP.post(event); | ||
return event.getCancelled(); | ||
} | ||
|
||
} |
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
10 changes: 10 additions & 0 deletions
10
src/main/java/com/seniors/justlevelingfork/kubejs/events/CustomEvents.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,10 @@ | ||
package com.seniors.justlevelingfork.kubejs.events; | ||
|
||
import dev.latvian.mods.kubejs.event.EventGroup; | ||
import dev.latvian.mods.kubejs.event.EventHandler; | ||
|
||
public interface CustomEvents { | ||
EventGroup GROUP = EventGroup.of("JLForkEvents"); | ||
|
||
EventHandler APTITUDE_LEVELUP = GROUP.client("aptitudeLevelUp", () -> LevelUpEvent.class); | ||
} |
33 changes: 33 additions & 0 deletions
33
src/main/java/com/seniors/justlevelingfork/kubejs/events/LevelUpEvent.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,33 @@ | ||
package com.seniors.justlevelingfork.kubejs.events; | ||
|
||
import com.seniors.justlevelingfork.registry.aptitude.Aptitude; | ||
import dev.latvian.mods.kubejs.event.EventJS; | ||
import net.minecraft.world.entity.player.Player; | ||
|
||
public class LevelUpEvent extends EventJS { | ||
private final Player player; | ||
private final Aptitude aptitude; | ||
|
||
private boolean cancelled = false; | ||
|
||
public LevelUpEvent(Player player, Aptitude aptitude) { | ||
this.player = player; | ||
this.aptitude = aptitude; | ||
} | ||
|
||
public Player getPlayer() { | ||
return player; | ||
} | ||
|
||
public Aptitude getAptitude(){ | ||
return aptitude; | ||
} | ||
|
||
public boolean getCancelled(){ | ||
return cancelled; | ||
} | ||
|
||
public void setCancelled(boolean cancelled) { | ||
this.cancelled = cancelled; | ||
} | ||
} |
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
Oops, something went wrong.