-
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.
- Loading branch information
1 parent
8ccfa89
commit 82e593f
Showing
8 changed files
with
119 additions
and
22 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
6 changes: 4 additions & 2 deletions
6
src/main/java/com/github/mori01231/lifecore/block/CustomBlockState.kt
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
38 changes: 38 additions & 0 deletions
38
src/main/java/com/github/mori01231/lifecore/util/AxisX.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,38 @@ | ||
package com.github.mori01231.lifecore.util; | ||
|
||
import org.bukkit.block.BlockFace; | ||
import org.jetbrains.annotations.Contract; | ||
import org.jetbrains.annotations.NotNull; | ||
|
||
public enum AxisX { | ||
SOUTH(270), | ||
WEST(0), | ||
NORTH(90), | ||
EAST(180); | ||
|
||
private final int yaw; | ||
|
||
AxisX(int yaw) { | ||
this.yaw = yaw; | ||
} | ||
|
||
public int getYaw() { | ||
return yaw; | ||
} | ||
|
||
@Contract(pure = true) | ||
public @NotNull BlockFace getBlockFace() { | ||
switch (this) { | ||
case SOUTH: | ||
return BlockFace.SOUTH; | ||
case WEST: | ||
return BlockFace.WEST; | ||
case NORTH: | ||
return BlockFace.NORTH; | ||
case EAST: | ||
return BlockFace.EAST; | ||
default: | ||
throw new AssertionError(); | ||
} | ||
} | ||
} |
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