Fixed drones repairing incorrect blocks

This commit is contained in:
Anuken 2018-08-15 16:28:00 -04:00
parent 3746344cba
commit 8dbd0a6130

View File

@ -329,6 +329,10 @@ public class Drone extends FlyingUnit implements BuilderTrait{
public void update(){
super.update();
if(target != null && target.getTeam() != team){
target = null;
}
if(Net.client() && state.is(repair) && target instanceof TileEntity){
TileEntity entity = (TileEntity) target;
entity.health += type.healSpeed * Timers.delta();