-
-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add integration for Origins mod climbing power
- Loading branch information
Showing
4 changed files
with
37 additions
and
1 deletion.
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
19 changes: 19 additions & 0 deletions
19
common/src/main/java/org/vivecraft/mod_compat_vr/origins/OriginsHelper.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,19 @@ | ||
package org.vivecraft.mod_compat_vr.origins; | ||
|
||
import java.util.List; | ||
|
||
import org.vivecraft.client.Xplat; | ||
import io.github.apace100.apoli.component.PowerHolderComponent; | ||
import io.github.apace100.apoli.power.ClimbingPower; | ||
import net.minecraft.world.entity.LivingEntity; | ||
|
||
public class OriginsHelper { | ||
public static boolean isLoaded() { | ||
return Xplat.isModLoaded("origins"); | ||
} | ||
|
||
public static boolean hasClimbingPower(LivingEntity entity) { | ||
List<ClimbingPower> powers = PowerHolderComponent.KEY.get(entity).getPowers(ClimbingPower.class, true); | ||
return !powers.isEmpty(); | ||
} | ||
} |