fix robot crash post-refactor

This commit is contained in:
asiekierka 2015-04-10 16:01:45 +02:00
parent a364104d47
commit 4fc8db5339
3 changed files with 13 additions and 4 deletions

View file

@ -101,7 +101,7 @@ public class DockingStation {
robotTaking = robot;
robotTakingId = robot.getRobotId();
getPipe().scheduleRenderUpdate();
registry.markDirty();
registry.registryMarkDirty();
robot.setMainStation(this);
registry.take(this, robot.getRobotId());
@ -118,7 +118,7 @@ public class DockingStation {
robotTaking = robot;
robotTakingId = robot.getRobotId();
getPipe().scheduleRenderUpdate();
registry.markDirty();
registry.registryMarkDirty();
registry.take(this, robot.getRobotId());
return true;
@ -131,7 +131,7 @@ public class DockingStation {
if (robotTaking == robot && !linkIsMain) {
IRobotRegistry registry = RobotManager.registryProvider.getRegistry(world);
unsafeRelease(robot);
registry.markDirty();
registry.registryMarkDirty();
registry.release(this, robot.getRobotId());
}
}

View file

@ -56,5 +56,5 @@ public interface IRobotRegistry {
void readFromNBT(NBTTagCompound nbt);
void markDirty();
void registryMarkDirty();
}

View file

@ -359,4 +359,13 @@ public class RobotRegistry extends WorldSavedData implements IRobotRegistry {
}
}
}
/**
* This function is a wrapper for markDirty(), done this way due to
* obfuscation issues.
*/
@Override
public void registryMarkDirty() {
markDirty();
}
}