-
-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add ISpectacleBlock API so that addon mods can have their blocks high…
…lighted by players wearing spectacles
- Loading branch information
1 parent
d8f07d2
commit 78b55db
Showing
6 changed files
with
39 additions
and
8 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package forestry.api.core; | ||
|
||
import net.minecraft.world.entity.player.Player; | ||
|
||
/** | ||
* Implement this interface on your block entities so that players wearing Spectacles can see them more easily. | ||
*/ | ||
public interface ISpectacleBlock { | ||
/** | ||
* Determines whether a highlight should be drawn around this block. | ||
* | ||
* @param player The player wearing spectacles. | ||
* @return {@code true} if a highlighted bounding box should be drawn around this block, {@code false} otherwise. | ||
*/ | ||
default boolean isHighlighted(Player player) { | ||
return true; | ||
} | ||
} |
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