Add BlockRotateEvent (#8577)
* feat: Add BuildRotateEvent * fix: Fix invalid argument * fix: Goofy aaah static imports * chore: Update ConfigEvent doc + Add forgotten annotation * chore: Remove final keyword * fix: Remove rotation validation in Build#beginPlace * Already covered by client snapshots * fix: Remove useless imports
This commit is contained in:
@@ -77,10 +77,12 @@ public class Build{
|
||||
//auto-rotate the block to the correct orientation and bail out
|
||||
if(tile.team() == team && tile.block == result && tile.build != null && tile.block.quickRotate){
|
||||
if(unit != null && unit.getControllerName() != null) tile.build.lastAccessed = unit.getControllerName();
|
||||
int previous = tile.build.rotation;
|
||||
tile.build.rotation = Mathf.mod(rotation, 4);
|
||||
tile.build.updateProximity();
|
||||
tile.build.noSleep();
|
||||
Fx.rotateBlock.at(tile.build.x, tile.build.y, tile.build.block.size);
|
||||
Events.fire(new BuildRotateEvent(tile.build, unit, previous));
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user