Merge pull request #2397 from MatthiasMann/lights2

allow WirelessChargedLocation to be created while the TileEntity is not ...
This commit is contained in:
tterrag1098 committed 2015-04-29 17:21:58 -04:00
commit 54af4e99f3
1 file changed
+5 -1
@@ -19,7 +19,11 @@ public class WirelessChargedLocation {
public WirelessChargedLocation(TileEntity te) {
this.te = te;
this.chargers = new ArrayList<IWirelessCharger>();
updateChargers();
/* Set lastChangeCount to one less than the current change count so that
the charger list is updated on first use (unless ~4B changes happen in between).
Do this instead directly updating so that WirelessChargedLocation can be used
while the TileEntity is still in construction (or loading). */
this.lastChangeCount = WirelessChargerController.instance.getChangeCount() - 1;
}
private void updateChargers() {