working copy and paste functionalities

This commit is contained in:
2023-04-15 23:00:41 +02:00
parent b24fefa290
commit d8684f1fc7
6 changed files with 90 additions and 3 deletions
@@ -30,7 +30,7 @@ public class Clipboard {
}
public void setBaseLocation(Location baseLocation) {
this.baseLocation = baseLocation;
this.baseLocation = baseLocation.toBlockLocation();
this.baseLocationVector = baseLocation.toVector();
}
@@ -54,7 +54,7 @@ public class Clipboard {
* Rotates clipboard by specified degrees around the base location.
* @param angle angle in degrees
*/
public void rotate(int angle) {
public void rotate(double angle) {
for (Map.Entry<Vector, BlockState> entry : this.blocks.entrySet()) {
Vector relativeLocation = entry.getKey();
relativeLocation.rotateAroundAxis(baseLocationVector, angle);