mirror of
https://github.com/zDevelopers/ImageOnMap.git
synced 2024-11-25 11:35:35 +01:00
Fixed a rotation bug on floor/ceilling map
This commit is contained in:
parent
89123da386
commit
9f2c63ed3b
@ -226,32 +226,39 @@ abstract public class SplatterMapManager {
|
||||
}
|
||||
//Rotation management relative to player rotation the default position is North, when on ceiling we flipped the rotation
|
||||
frame.setItem(new ItemStackBuilder(Material.FILLED_MAP).nbt(ImmutableMap.of("map", id)).craftItem());
|
||||
frame.setRotation(Rotation.CLOCKWISE);
|
||||
switch(bf) {
|
||||
case NORTH:
|
||||
if(frame.getFacing()==BlockFace.DOWN){
|
||||
rot = rot.rotateClockwise();
|
||||
rot = rot.rotateClockwise();
|
||||
}
|
||||
frame.setRotation(rot);
|
||||
break;
|
||||
case EAST:
|
||||
rot = rot.rotateClockwise();
|
||||
frame.setRotation(rot);
|
||||
break;
|
||||
case SOUTH:
|
||||
if(frame.getFacing()==BlockFace.UP){
|
||||
rot = rot.rotateClockwise();
|
||||
rot = rot.rotateClockwise();
|
||||
}
|
||||
frame.setRotation(rot);
|
||||
break;
|
||||
case WEST:
|
||||
rot = rot.rotateCounterClockwise();
|
||||
frame.setRotation(rot);
|
||||
break;
|
||||
if(i==0){//First map need to be rotate one time CounterClockwise
|
||||
rot=rot.rotateCounterClockwise();
|
||||
}
|
||||
|
||||
switch (bf) {
|
||||
case NORTH:
|
||||
if (frame.getFacing() == BlockFace.DOWN) {
|
||||
rot = rot.rotateClockwise();
|
||||
rot = rot.rotateClockwise();
|
||||
}
|
||||
frame.setRotation(rot);
|
||||
break;
|
||||
case EAST:
|
||||
rot = rot.rotateClockwise();
|
||||
frame.setRotation(rot);
|
||||
break;
|
||||
case SOUTH:
|
||||
if (frame.getFacing() == BlockFace.UP) {
|
||||
rot = rot.rotateClockwise();
|
||||
rot = rot.rotateClockwise();
|
||||
}
|
||||
frame.setRotation(rot);
|
||||
break;
|
||||
case WEST:
|
||||
rot = rot.rotateCounterClockwise();
|
||||
frame.setRotation(rot);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
MapInitEvent.initMap(id);
|
||||
i++;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user