break;
case VAR_SHAPE3D:
if (value instanceof String) {
String newShape = world.checkTurtleShapeName((String) value);
if (newShape == null) {
throw new AgentException
("\"" + (String) value + "\" is not a currently defined shape");
}
shape(newShape);
} else {
wrongTypeForVariable(AgentVariables.getImplicitTurtleVariables(true)[vn],
String.class, value);
}
break;
case VAR_LABEL3D:
label(value);
break;
case VAR_LABELCOLOR3D:
if (value instanceof Number) {
labelColor(((Number) value).doubleValue());
} else if (value instanceof LogoList) {
labelColor((LogoList) value, VAR_LABELCOLOR3D);
} else {
wrongTypeForVariable(AgentVariables.getImplicitTurtleVariables(true)[vn],
Double.class, value);
}
break;
case VAR_BREED3D:
if (value instanceof AgentSet) {
AgentSet breed = (AgentSet) value;
if (breed != world.turtles() && !world.isBreed(breed)) {
throw new AgentException(I18N.errorsJ().get("org.nlogo.agent.Turtle.cantSetBreedToNonBreedAgentSet"));
}
setBreed(breed);
} else {
wrongTypeForVariable(AgentVariables.getImplicitTurtleVariables(true)[vn],
AgentSet.class, value);
}
break;
case VAR_HIDDEN3D:
if (value instanceof Boolean) {
hidden(((Boolean) value).booleanValue());
} else {
wrongTypeForVariable(AgentVariables.getImplicitTurtleVariables(true)[vn],
Boolean.class, value);
}
break;
case VAR_SIZE3D:
if (value instanceof Number) {
size(((Number) value).doubleValue());
} else {
wrongTypeForVariable(AgentVariables.getImplicitTurtleVariables(true)[vn],
Double.class, value);
}
break;
case VAR_PENMODE3D:
if (value instanceof String) {
penMode((String) value);
} else {
wrongTypeForVariable(AgentVariables.getImplicitTurtleVariables(true)[vn],
String.class, value);
}
break;
case VAR_PENSIZE3D:
if (value instanceof Number) {
penSize(((Number) value).doubleValue());
} else {
wrongTypeForVariable(AgentVariables.getImplicitTurtleVariables(true)[vn],
Double.class, value);
}
break;
case VAR_WHO3D:
throw new AgentException("you can't change a turtle's ID number");
case VAR_PITCH3D:
if (value instanceof Number) {
pitch(((Number) value).doubleValue());
} else {