for (int x = 0; x < fHeight; x++) {
GridCoordinate xy = new GridCoordinate(x, y);
if (traits(xy).contains("redPyramid")) {
// Check whether a logic has been placed here
Effect e = gm.getFirstEntityOfTypeAt(xy, Effect.class);
if (e == null) {
try {
Logic l = new Effect();
JSONObject json = logic.exportToJSON();
json.put("xy", (x * 32) + " " + (y * 32));
l.importFromJSON(json);
placeLogic(l);
} catch (Exception e2) {
System.err.println("Error creating virtual red pyramid logic at " + xy);
System.err.println(e2.getMessage());
}