generated from Crystal-Nest/cobweb-mod-template
-
-
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
bcc25af
commit 26e3032
Showing
4 changed files
with
127 additions
and
67 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
64 changes: 64 additions & 0 deletions
64
common/src/main/java/it/crystalnest/fancy_entity_renderer/entity/player/state/Rotation.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,64 @@ | ||
package it.crystalnest.fancy_entity_renderer.entity.player.state; | ||
|
||
import java.util.Objects; | ||
|
||
public class Rotation { | ||
private float x; | ||
private float y; | ||
private float z; | ||
|
||
public Rotation(float x, float y, float z) { | ||
this.x = x; | ||
this.y = y; | ||
this.z = z; | ||
} | ||
|
||
public Rotation() { | ||
this(0, 0, 0); | ||
} | ||
|
||
public float getX() { | ||
return x; | ||
} | ||
|
||
public void setX(float x) { | ||
this.x = x; | ||
} | ||
|
||
public float getY() { | ||
return y; | ||
} | ||
|
||
public void setY(float y) { | ||
this.y = y; | ||
} | ||
|
||
public float getZ() { | ||
return z; | ||
} | ||
|
||
public void setZ(float z) { | ||
this.z = z; | ||
} | ||
|
||
@Override | ||
public boolean equals(Object o) { | ||
if (this == o) { | ||
return true; | ||
} | ||
if (!(o instanceof Rotation rotation)) { | ||
return false; | ||
} | ||
return Float.compare(x, rotation.x) == 0 && Float.compare(y, rotation.y) == 0 && Float.compare(z, rotation.z) == 0; | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return Objects.hash(x, y, z); | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "Rotation{x=" + x + ", y=" + y + ", z=" + z + "}"; | ||
} | ||
} |