use of com.microsoft.Malmo.Schemas.BlockSpec in project malmo by Microsoft.
the class AgentQuitFromTouchingBlockTypeImplementation method parseParameters.
@Override
public boolean parseParameters(Object params) {
if (params == null || !(params instanceof AgentQuitFromTouchingBlockType))
return false;
this.params = (AgentQuitFromTouchingBlockType) params;
// Flatten all the possible block type names for ease of matching later:
this.blockTypeNames = new ArrayList<String>();
for (BlockSpec bs : this.params.getBlock()) {
for (BlockType bt : bs.getType()) {
Block b = Block.getBlockFromName(bt.value());
this.blockTypeNames.add(b.getUnlocalizedName().toLowerCase());
}
}
return true;
}
Aggregations